5 #define PPP_PSEUDO_IP "10.64.64.64"
6 #define PPP_PSEUDO_NM "255.255.255.255"
7 #define PPP_PSEUDO_GW "10.112.112.112"
10 // extern int diag_led(int type, int act);
11 // extern int C_led(int i);
12 // extern int get_single_ip(char *ipaddr, int which);
13 // extern char *get_mac_from_ip(char *ip);
14 // extern struct dns_lists *get_dns_list(int no);
15 // extern char *get_wan_face(void);
16 // extern int check_wan_link(int num);
17 // extern char *get_complete_lan_ip(char *ip);
18 // extern int get_int_len(int num);
19 // extern int file_to_buf(char *path, char *buf, int len);
20 // int buf_to_file(char *path, char *buf);
21 // extern pid_t* find_pid_by_name( char* pidName);
22 // extern int find_pid_by_ps(char* pidName);
23 // extern int *find_all_pid_by_ps(char* pidName);
25 // extern long convert_ver(char *ver);
26 // extern int check_flash(void);
27 // extern int check_now_boot(void);
28 // extern int check_hw_type(void);
29 // extern int is_exist(char *filename);
31 // extern void encode(char *buf, int len);
32 // extern void decode(char *buf, int len);
34 // extern int set_register_value(unsigned short port_addr, unsigned short option_content);
35 // extern unsigned long get_register_value(unsigned short id, unsigned short num);
37 // struct wl_assoc_mac * get_wl_assoc_mac(int *c);
56 // enum { UNKNOWN_BOOT = -1, PMON_BOOT, CFE_BOOT };
58 // enum { BCM4702_CHIP, BCM4712_CHIP, BCM5325E_CHIP, BCM4704_BCM5325F_CHIP, BCM5352E_CHIP, NO_DEFINE_CHIP };
60 // enum { FIRST, SECOND };
62 // enum { SYSLOG_LOG=1, SYSLOG_DEBUG, CONSOLE_ONLY, LOG_CONSOLE, DEBUG_CONSOLE };
76 #define ACTION_FILE "/tmp/action"
77 #define ACTION(cmd) buf_to_file(ACTION_FILE, cmd)
78 extern int check_action(void);
84 char dns_server[4][16];
92 #define PROTO_STATIC 1
97 #define PROTO_EARTHLINK 6
98 #define PROTO_ERROR -1
103 #define split(word, wordlist, next, delim) \
104 for (next = wordlist, \
105 strncpy(word, next, sizeof(word)), \
106 word[(next=strstr(next, delim)) ? strstr(word, delim) - word : sizeof(word) - 1] = '\0', \
107 next = next ? next + sizeof(delim) - 1 : NULL ; \
109 next = next ? : "", \
110 strncpy(word, next, sizeof(word)), \
111 word[(next=strstr(next, delim)) ? strstr(word, delim) - word : sizeof(word) - 1] = '\0', \
112 next = next ? next + sizeof(delim) - 1 : NULL)
114 #define STRUCT_LEN(name) sizeof(name)/sizeof(name[0])