4 Copyright (C) 2006-2008 Jonathan Zarate
25 #include <tomato_profile.h>
26 #include <tomato_config.h>
32 // #define BLACKHOLE // for testing
35 #define _dprintf(args...) do { } while(0)
36 // #define _dprintf cprintf
40 extern void exec_service(const char *action
);
41 extern void common_redirect(void);
43 extern const char *resmsg_get(void);
44 extern void resmsg_set(const char *msg
);
45 extern int resmsg_fread(const char *fname
);
50 extern void asp_nvram(int argc
, char **argv
);
51 extern void asp_nvramseq(int argc
, char **argv
);
52 extern void asp_nv(int argc
, char **argv
);
55 extern int wait_file_exists(const char *name
, int max
, int invert
);
56 extern char *js_string(const char *s
);
57 extern char *html_string(const char *s
);
58 extern char *unix_string(const char *s
);
59 extern char *reltime(char *buf
, time_t t
);
60 extern int get_client_info(char *mac
, char *ifname
);
62 extern void asp_lipp(int argc
, char **argv
);
63 extern void asp_activeroutes(int argc
, char **argv
);
64 extern void asp_cgi_get(int argc
, char **argv
);
65 extern void asp_time(int argc
, char **argv
);
66 extern void asp_wanup(int argc
, char **argv
);
67 extern void asp_wanstatus(int argc
, char **argv
);
68 extern void asp_link_uptime(int argc
, char **argv
);
69 extern void asp_bandwidth(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 asp_sysinfo(int argc
, char **argv
);
76 extern void asp_statfs(int argc
, char **argv
);
77 extern void asp_notice(int argc
, char **argv
);
78 extern void wo_wakeup(char *url
);
79 extern void asp_dns(int argc
, char **argv
);
80 extern void wo_resolve(char *url
);
83 extern void asp_usbdevices(int argc
, char **argv
);
84 extern void wo_usbcommand(char *url
);
87 extern void asp_arplist(int argc
, char **argv
);
88 extern void asp_devlist(int argc
, char **argv
);
91 extern void asp_ctcount(int argc
, char **argv
);
92 extern void asp_ctdump(int argc
, char **argv
);
93 extern void asp_qrate(int argc
, char **argv
);
94 extern void asp_layer7(int argc
, char **argv
);
95 extern void wo_expct(char *url
);
98 extern void asp_wlscan(int argc
, char **argv
);
99 extern void asp_wlradio(int argc
, char **argv
);
100 extern void wo_wlradio(char *url
);
101 extern void asp_wlnoise(int argc
, char **argv
);
102 extern void asp_wlcrssi(int argc
, char **argv
);
103 extern void wo_wlmnoise(char *url
);
104 extern void asp_wlclient(int argc
, char **argv
);
105 extern void asp_wlchannel(int argc
, char **argv
);
108 extern void asp_dhcpc_time(int argc
, char **argv
);
109 extern void wo_dhcpd(char *url
);
110 extern void wo_dhcpc(char *url
);
113 extern void asp_build_time(int argc
, char **argv
);
114 extern void asp_version(int argc
, char **argv
);
117 extern void wo_trace(char *url
);
118 extern void wo_ping(char *url
);
121 extern void wo_viewlog(char *url
);
122 extern void wo_syslog(char *url
);
125 extern void asp_ddnsx(int argc
, char **argv
);
126 extern void asp_ddnsx_ip(int argc
, char **argv
);
127 extern void asp_ddnsx_msg(int argc
, char **argv
);
130 extern void prepare_upgrade(void);
131 extern void wi_upgrade(char *url
, int len
, char *boundary
);
132 extern void wo_flash(char *url
);
135 extern void wo_backup(char *url
);
136 extern void wi_restore(char *url
, int len
, char *boundary
);
137 extern void wo_restore(char *url
);
138 extern void wo_defaults(char *url
);
141 extern void wo_asp(char *path
);
144 extern void wi_blackhole(char *url
, int len
, char *boundary
);
147 extern void asp_upnpinfo(int argc
, char **argv
);
148 extern void wo_upnp(char *url
);
151 extern void wo_bwmbackup(char *url
);
152 extern void wi_bwmrestore(char *url
, int len
, char *boundary
);
153 extern void wo_bwmrestore(char *url
);
154 extern void asp_netdev(int argc
, char **argv
);
159 extern void asp_sharelist(int argc
, char **argv
);
160 extern void wo_umount(char *url
);
161 extern void wo_usb(char *url
);