Merge Tomato 1.27
[tomato.git] / release / src / router / httpd / tomato.h
bloba62834be02468ab1a21797d6369d644c6ad73b7c
1 /*
3 Tomato Firmware
4 Copyright (C) 2006-2009 Jonathan Zarate
6 */
8 #ifndef __TOMATO_H_
9 #define __TOMATO_H_
11 #include <stdio.h>
12 #include <stdlib.h>
13 #include <string.h>
14 #include <unistd.h>
15 #include <typedefs.h>
16 #include <syslog.h>
17 #include <signal.h>
19 #include <bcmutils.h>
20 #include <bcmnvram.h>
21 #include <utils.h>
22 #include <shutils.h>
23 #include <shared.h>
25 #include <tomato_profile.h>
26 #include <tomato_config.h>
29 #include "httpd.h"
32 #define USE_MINIUPNPD
33 // #define BLACKHOLE // for testing
36 #define _dprintf(args...) do { } while(0)
37 // #define _dprintf cprintf
39 extern int rboot;
41 extern void exec_service(const char *action);
42 extern void wi_generic(char *url, int len, char *boundary);
43 extern void common_redirect(void);
45 extern const char *resmsg_get(void);
46 extern void resmsg_set(const char *msg);
47 extern int resmsg_fread(const char *fname);
51 // nvram.c
52 extern void asp_nvram(int argc, char **argv);
53 extern void asp_nvramseq(int argc, char **argv);
54 extern void asp_nv(int argc, char **argv);
56 // misc.c
57 extern char *js_string(const char *s);
58 extern char *html_string(const char *s);
59 extern char *unix_string(const char *s);
60 extern char *reltime(char *buf, time_t t);
61 extern int get_client_info(char *mac, char *ifname);
63 extern void asp_lipp(int argc, char **argv);
64 extern void asp_activeroutes(int argc, char **argv);
65 extern void asp_cgi_get(int argc, char **argv);
66 extern void asp_time(int argc, char **argv);
67 extern void asp_wanup(int argc, char **argv);
68 extern void asp_wanstatus(int argc, char **argv);
69 extern void asp_link_uptime(int argc, char **argv);
70 extern void asp_rrule(int argc, char **argv);
71 extern void asp_compmac(int argc, char **argv);
72 extern void asp_ident(int argc, char **argv);
73 extern void asp_lanip(int argc, char **argv);
74 extern void asp_psup(int argc, char **argv);
75 extern void wo_vpn_status(char *url);
76 extern void asp_sysinfo(int argc, char **argv);
77 extern void asp_statfs(int argc, char **argv);
78 extern void asp_notice(int argc, char **argv);
79 extern void wo_wakeup(char *url);
80 extern void asp_dns(int argc, char **argv);
81 extern void wo_resolve(char *url);
83 // devlist.c
84 extern void asp_arplist(int argc, char **argv);
85 extern void asp_devlist(int argc, char **argv);
87 // ctnf.c
88 extern void asp_ctcount(int argc, char **argv);
89 extern void asp_ctdump(int argc, char **argv);
90 extern void asp_qrate(int argc, char **argv);
91 extern void asp_layer7(int argc, char **argv);
92 extern void wo_expct(char *url);
94 // wl.c
95 extern void asp_wlscan(int argc, char **argv);
96 extern void asp_wlradio(int argc, char **argv);
97 extern void wo_wlradio(char *url);
98 extern void asp_wlnoise(int argc, char **argv);
99 extern void asp_wlcrssi(int argc, char **argv);
100 extern void wo_wlmnoise(char *url);
101 extern void asp_wlclient(int argc, char **argv);
102 extern void asp_wlchannel(int argc, char **argv);
104 // dhcp.c
105 extern void asp_dhcpc_time(int argc, char **argv);
106 extern void wo_dhcpd(char *url);
107 extern void wo_dhcpc(char *url);
109 // version.c
110 extern void asp_build_time(int argc, char **argv);
111 extern void asp_version(int argc, char **argv);
113 // traceping.c
114 extern void wo_trace(char *url);
115 extern void wo_ping(char *url);
117 // log.c
118 extern void wo_viewlog(char *url);
119 extern void wo_syslog(char *url);
121 // ddns.c
122 extern void asp_ddnsx(int argc, char **argv);
123 extern void asp_ddnsx_ip(int argc, char **argv);
124 extern void asp_ddnsx_msg(int argc, char **argv);
126 // upgrade.c
127 extern void prepare_upgrade(void);
128 extern void wi_upgrade(char *url, int len, char *boundary);
129 extern void wo_flash(char *url);
131 // config.c
132 extern void wo_backup(char *url);
133 extern void wi_restore(char *url, int len, char *boundary);
134 extern void wo_restore(char *url);
135 extern void wo_defaults(char *url);
137 // parser.c
138 extern void wo_asp(char *path);
140 // blackhole.c
141 extern void wi_blackhole(char *url, int len, char *boundary);
143 // upnp.c
144 extern void asp_upnpinfo(int argc, char **argv);
145 extern void wo_upnp(char *url);
147 // bwm.c
148 extern void wo_bwmbackup(char *url);
149 extern void wi_bwmrestore(char *url, int len, char *boundary);
150 extern void wo_bwmrestore(char *url);
151 extern void asp_netdev(int argc, char **argv);
152 extern void asp_bandwidth(int argc, char **argv);
155 #if TOMATO_SL
156 // share.c
157 extern void asp_sharelist(int argc, char **argv);
158 extern void wo_umount(char *url);
159 extern void wo_usb(char *url);
160 #endif
163 #endif