usbmodeswitch: Updated to v.1.2.6 from shibby's branch.
[tomato.git] / release / src / router / udpxy / mkpg.h
blob9a7dae52ecdaacdf7b00fc6710cc22371d3e2585
1 /* @(#) HTML-page generation methods
3 * Copyright 2008-2011 Pavel V. Cherenkov (pcherenkov@gmail.com) (pcherenkov@gmail.com)
5 * This file is part of udpxy.
7 * udpxy is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
12 * udpxy is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with udpxy. If not, see <http://www.gnu.org/licenses/>.
21 #ifndef UDPXY_MKPG_H_0115081656
22 #define UDPXY_MKPG_H_0115081656
24 #include <sys/types.h>
25 #include "ctx.h"
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
31 /* generate service's (HTML) status page
33 * @param ctx server context
34 * @param buf destination buffer
35 * @param len destination buffer's length
36 * @param options options as a bitset of flags
38 * @return 0 if success, len gets updated with page text's size
39 * -1 in case of failure
42 #define MSO_HTTP_HEADER 1 /* prepend page with HTTP header */
43 #define MSO_SKIP_CLIENTS 2 /* do not output client info */
44 #define MSO_RESTART 4 /* use restart-page format */
47 int
48 mk_status_page( const struct server_ctx* ctx,
49 char* buf, size_t* len, int options );
52 #ifdef __cplusplus
54 #endif
56 #endif /* UDPXY_MKPG_H_0115081656 */
58 /* __EOF__ */