patch-pppd_pppd_h 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532
  1. --- ppp-2.4.5.orig/pppd/pppd.h 2009-11-16 23:26:07.000000000 +0100
  2. +++ ppp-2.4.5/pppd/pppd.h 2014-03-17 16:13:14.000000000 +0100
  3. @@ -198,7 +198,7 @@ struct epdisc {
  4. #define EPD_MAGIC 4
  5. #define EPD_PHONENUM 5
  6. -typedef void (*notify_func) __P((void *, int));
  7. +typedef void (*notify_func) (void *, int);
  8. struct notifier {
  9. struct notifier *next;
  10. @@ -392,35 +392,35 @@ extern int option_priority; /* priority
  11. struct protent {
  12. u_short protocol; /* PPP protocol number */
  13. /* Initialization procedure */
  14. - void (*init) __P((int unit));
  15. + void (*init) (int unit);
  16. /* Process a received packet */
  17. - void (*input) __P((int unit, u_char *pkt, int len));
  18. + void (*input) (int unit, u_char *pkt, int len);
  19. /* Process a received protocol-reject */
  20. - void (*protrej) __P((int unit));
  21. + void (*protrej) (int unit);
  22. /* Lower layer has come up */
  23. - void (*lowerup) __P((int unit));
  24. + void (*lowerup) (int unit);
  25. /* Lower layer has gone down */
  26. - void (*lowerdown) __P((int unit));
  27. + void (*lowerdown) (int unit);
  28. /* Open the protocol */
  29. - void (*open) __P((int unit));
  30. + void (*open) (int unit);
  31. /* Close the protocol */
  32. - void (*close) __P((int unit, char *reason));
  33. + void (*close) (int unit, char *reason);
  34. /* Print a packet in readable form */
  35. - int (*printpkt) __P((u_char *pkt, int len,
  36. + int (*printpkt) (u_char *pkt, int len,
  37. void (*printer) __P((void *, char *, ...)),
  38. - void *arg));
  39. + void *arg);
  40. /* Process a received data packet */
  41. - void (*datainput) __P((int unit, u_char *pkt, int len));
  42. + void (*datainput) (int unit, u_char *pkt, int len);
  43. bool enabled_flag; /* 0 iff protocol is disabled */
  44. char *name; /* Text name of protocol */
  45. char *data_name; /* Text name of corresponding data protocol */
  46. option_t *options; /* List of command-line options */
  47. /* Check requested options, assign defaults */
  48. - void (*check_options) __P((void));
  49. + void (*check_options) (void);
  50. /* Configure interface for demand-dial */
  51. - int (*demand_conf) __P((int unit));
  52. + int (*demand_conf) (int unit);
  53. /* Say whether to bring up link for this pkt */
  54. - int (*active_pkt) __P((u_char *pkt, int len));
  55. + int (*active_pkt) (u_char *pkt, int len);
  56. };
  57. /* Table of pointers to supported protocols */
  58. @@ -437,25 +437,25 @@ struct channel {
  59. /* set of options for this channel */
  60. option_t *options;
  61. /* find and process a per-channel options file */
  62. - void (*process_extra_options) __P((void));
  63. + void (*process_extra_options) (void);
  64. /* check all the options that have been given */
  65. - void (*check_options) __P((void));
  66. + void (*check_options) (void);
  67. /* get the channel ready to do PPP, return a file descriptor */
  68. - int (*connect) __P((void));
  69. + int (*connect) (void);
  70. /* we're finished with the channel */
  71. - void (*disconnect) __P((void));
  72. + void (*disconnect) (void);
  73. /* put the channel into PPP `mode' */
  74. - int (*establish_ppp) __P((int));
  75. + int (*establish_ppp) (int);
  76. /* take the channel out of PPP `mode', restore loopback if demand */
  77. - void (*disestablish_ppp) __P((int));
  78. + void (*disestablish_ppp) (int);
  79. /* set the transmit-side PPP parameters of the channel */
  80. - void (*send_config) __P((int, u_int32_t, int, int));
  81. + void (*send_config) (int, u_int32_t, int, int);
  82. /* set the receive-side PPP parameters of the channel */
  83. - void (*recv_config) __P((int, u_int32_t, int, int));
  84. + void (*recv_config) (int, u_int32_t, int, int);
  85. /* cleanup on error or normal exit */
  86. - void (*cleanup) __P((void));
  87. + void (*cleanup) (void);
  88. /* close the device, called in children after fork */
  89. - void (*close) __P((void));
  90. + void (*close) (void);
  91. };
  92. extern struct channel *the_channel;
  93. @@ -465,117 +465,117 @@ extern struct channel *the_channel;
  94. */
  95. /* Procedures exported from main.c. */
  96. -void set_ifunit __P((int)); /* set stuff that depends on ifunit */
  97. -void detach __P((void)); /* Detach from controlling tty */
  98. -void die __P((int)); /* Cleanup and exit */
  99. -void quit __P((void)); /* like die(1) */
  100. -void novm __P((char *)); /* Say we ran out of memory, and die */
  101. -void timeout __P((void (*func)(void *), void *arg, int s, int us));
  102. +void set_ifunit (int); /* set stuff that depends on ifunit */
  103. +void detach (void); /* Detach from controlling tty */
  104. +void die (int); /* Cleanup and exit */
  105. +void quit (void); /* like die(1) */
  106. +void novm (char *); /* Say we ran out of memory, and die */
  107. +void timeout (void (*func)(void *), void *arg, int s, int us);
  108. /* Call func(arg) after s.us seconds */
  109. -void untimeout __P((void (*func)(void *), void *arg));
  110. +void untimeout (void (*func)(void *), void *arg);
  111. /* Cancel call to func(arg) */
  112. -void record_child __P((int, char *, void (*) (void *), void *, int));
  113. -pid_t safe_fork __P((int, int, int)); /* Fork & close stuff in child */
  114. -int device_script __P((char *cmd, int in, int out, int dont_wait));
  115. +void record_child (int, char *, void (*) (void *), void *, int);
  116. +pid_t safe_fork (int, int, int); /* Fork & close stuff in child */
  117. +int device_script (char *cmd, int in, int out, int dont_wait);
  118. /* Run `cmd' with given stdin and stdout */
  119. -pid_t run_program __P((char *prog, char **args, int must_exist,
  120. - void (*done)(void *), void *arg, int wait));
  121. +pid_t run_program (char *prog, char **args, int must_exist,
  122. + void (*done)(void *), void *arg, int wait);
  123. /* Run program prog with args in child */
  124. -void reopen_log __P((void)); /* (re)open the connection to syslog */
  125. -void print_link_stats __P((void)); /* Print stats, if available */
  126. -void reset_link_stats __P((int)); /* Reset (init) stats when link goes up */
  127. -void update_link_stats __P((int)); /* Get stats at link termination */
  128. -void script_setenv __P((char *, char *, int)); /* set script env var */
  129. -void script_unsetenv __P((char *)); /* unset script env var */
  130. -void new_phase __P((int)); /* signal start of new phase */
  131. -void add_notifier __P((struct notifier **, notify_func, void *));
  132. -void remove_notifier __P((struct notifier **, notify_func, void *));
  133. -void notify __P((struct notifier *, int));
  134. -int ppp_send_config __P((int, int, u_int32_t, int, int));
  135. -int ppp_recv_config __P((int, int, u_int32_t, int, int));
  136. -const char *protocol_name __P((int));
  137. -void remove_pidfiles __P((void));
  138. -void lock_db __P((void));
  139. -void unlock_db __P((void));
  140. +void reopen_log (void); /* (re)open the connection to syslog */
  141. +void print_link_stats (void); /* Print stats, if available */
  142. +void reset_link_stats (int); /* Reset (init) stats when link goes up */
  143. +void update_link_stats (int); /* Get stats at link termination */
  144. +void script_setenv (char *, char *, int); /* set script env var */
  145. +void script_unsetenv (char *); /* unset script env var */
  146. +void new_phase (int); /* signal start of new phase */
  147. +void add_notifier (struct notifier **, notify_func, void *);
  148. +void remove_notifier (struct notifier **, notify_func, void *);
  149. +void notify (struct notifier *, int);
  150. +int ppp_send_config (int, int, u_int32_t, int, int);
  151. +int ppp_recv_config (int, int, u_int32_t, int, int);
  152. +const char *protocol_name (int);
  153. +void remove_pidfiles (void);
  154. +void lock_db (void);
  155. +void unlock_db (void);
  156. /* Procedures exported from tty.c. */
  157. -void tty_init __P((void));
  158. +void tty_init (void);
  159. /* Procedures exported from utils.c. */
  160. -void log_packet __P((u_char *, int, char *, int));
  161. +void log_packet (u_char *, int, char *, int);
  162. /* Format a packet and log it with syslog */
  163. -void print_string __P((char *, int, void (*) (void *, char *, ...),
  164. - void *)); /* Format a string for output */
  165. -int slprintf __P((char *, int, char *, ...)); /* sprintf++ */
  166. -int vslprintf __P((char *, int, char *, va_list)); /* vsprintf++ */
  167. -size_t strlcpy __P((char *, const char *, size_t)); /* safe strcpy */
  168. -size_t strlcat __P((char *, const char *, size_t)); /* safe strncpy */
  169. -void dbglog __P((char *, ...)); /* log a debug message */
  170. -void info __P((char *, ...)); /* log an informational message */
  171. -void notice __P((char *, ...)); /* log a notice-level message */
  172. -void warn __P((char *, ...)); /* log a warning message */
  173. -void error __P((char *, ...)); /* log an error message */
  174. -void fatal __P((char *, ...)); /* log an error message and die(1) */
  175. -void init_pr_log __P((const char *, int)); /* initialize for using pr_log */
  176. -void pr_log __P((void *, char *, ...)); /* printer fn, output to syslog */
  177. -void end_pr_log __P((void)); /* finish up after using pr_log */
  178. -void dump_packet __P((const char *, u_char *, int));
  179. +void print_string (char *, int, void (*) (void *, char *, ...),
  180. + void *); /* Format a string for output */
  181. +int slprintf (char *, int, char *, ...); /* sprintf++ */
  182. +int vslprintf (char *, int, char *, va_list); /* vsprintf++ */
  183. +size_t strlcpy (char *, const char *, size_t); /* safe strcpy */
  184. +size_t strlcat (char *, const char *, size_t); /* safe strncpy */
  185. +void dbglog (char *, ...); /* log a debug message */
  186. +void info (char *, ...); /* log an informational message */
  187. +void notice (char *, ...); /* log a notice-level message */
  188. +void warn (char *, ...); /* log a warning message */
  189. +void error (char *, ...); /* log an error message */
  190. +void fatal (char *, ...); /* log an error message and die(1) */
  191. +void init_pr_log (const char *, int); /* initialize for using pr_log */
  192. +void pr_log (void *, char *, ...); /* printer fn, output to syslog */
  193. +void end_pr_log (void); /* finish up after using pr_log */
  194. +void dump_packet (const char *, u_char *, int);
  195. /* dump packet to debug log if interesting */
  196. -ssize_t complete_read __P((int, void *, size_t));
  197. +ssize_t complete_read (int, void *, size_t);
  198. /* read a complete buffer */
  199. /* Procedures exported from auth.c */
  200. -void link_required __P((int)); /* we are starting to use the link */
  201. -void start_link __P((int)); /* bring the link up now */
  202. -void link_terminated __P((int)); /* we are finished with the link */
  203. -void link_down __P((int)); /* the LCP layer has left the Opened state */
  204. -void upper_layers_down __P((int));/* take all NCPs down */
  205. -void link_established __P((int)); /* the link is up; authenticate now */
  206. -void start_networks __P((int)); /* start all the network control protos */
  207. -void continue_networks __P((int)); /* start network [ip, etc] control protos */
  208. -void np_up __P((int, int)); /* a network protocol has come up */
  209. -void np_down __P((int, int)); /* a network protocol has gone down */
  210. -void np_finished __P((int, int)); /* a network protocol no longer needs link */
  211. -void auth_peer_fail __P((int, int));
  212. +void link_required (int); /* we are starting to use the link */
  213. +void start_link (int); /* bring the link up now */
  214. +void link_terminated (int); /* we are finished with the link */
  215. +void link_down (int); /* the LCP layer has left the Opened state */
  216. +void upper_layers_down (int);/* take all NCPs down */
  217. +void link_established (int); /* the link is up; authenticate now */
  218. +void start_networks (int); /* start all the network control protos */
  219. +void continue_networks (int); /* start network [ip, etc] control protos */
  220. +void np_up (int, int); /* a network protocol has come up */
  221. +void np_down (int, int); /* a network protocol has gone down */
  222. +void np_finished (int, int); /* a network protocol no longer needs link */
  223. +void auth_peer_fail (int, int);
  224. /* peer failed to authenticate itself */
  225. -void auth_peer_success __P((int, int, int, char *, int));
  226. +void auth_peer_success (int, int, int, char *, int);
  227. /* peer successfully authenticated itself */
  228. -void auth_withpeer_fail __P((int, int));
  229. +void auth_withpeer_fail (int, int);
  230. /* we failed to authenticate ourselves */
  231. -void auth_withpeer_success __P((int, int, int));
  232. +void auth_withpeer_success (int, int, int);
  233. /* we successfully authenticated ourselves */
  234. -void auth_check_options __P((void));
  235. +void auth_check_options (void);
  236. /* check authentication options supplied */
  237. -void auth_reset __P((int)); /* check what secrets we have */
  238. -int check_passwd __P((int, char *, int, char *, int, char **));
  239. +void auth_reset (int); /* check what secrets we have */
  240. +int check_passwd (int, char *, int, char *, int, char **);
  241. /* Check peer-supplied username/password */
  242. -int get_secret __P((int, char *, char *, char *, int *, int));
  243. +int get_secret (int, char *, char *, char *, int *, int);
  244. /* get "secret" for chap */
  245. -int get_srp_secret __P((int unit, char *client, char *server, char *secret,
  246. - int am_server));
  247. -int auth_ip_addr __P((int, u_int32_t));
  248. +int get_srp_secret (int unit, char *client, char *server, char *secret,
  249. + int am_server);
  250. +int auth_ip_addr (int, u_int32_t);
  251. /* check if IP address is authorized */
  252. -int auth_number __P((void)); /* check if remote number is authorized */
  253. -int bad_ip_adrs __P((u_int32_t));
  254. +int auth_number (void); /* check if remote number is authorized */
  255. +int bad_ip_adrs (u_int32_t);
  256. /* check if IP address is unreasonable */
  257. /* Procedures exported from demand.c */
  258. -void demand_conf __P((void)); /* config interface(s) for demand-dial */
  259. -void demand_block __P((void)); /* set all NPs to queue up packets */
  260. -void demand_unblock __P((void)); /* set all NPs to pass packets */
  261. -void demand_discard __P((void)); /* set all NPs to discard packets */
  262. -void demand_rexmit __P((int)); /* retransmit saved frames for an NP */
  263. -int loop_chars __P((unsigned char *, int)); /* process chars from loopback */
  264. -int loop_frame __P((unsigned char *, int)); /* should we bring link up? */
  265. +void demand_conf (void); /* config interface(s) for demand-dial */
  266. +void demand_block (void); /* set all NPs to queue up packets */
  267. +void demand_unblock (void); /* set all NPs to pass packets */
  268. +void demand_discard (void); /* set all NPs to discard packets */
  269. +void demand_rexmit (int); /* retransmit saved frames for an NP */
  270. +int loop_chars (unsigned char *, int); /* process chars from loopback */
  271. +int loop_frame (unsigned char *, int); /* should we bring link up? */
  272. /* Procedures exported from multilink.c */
  273. #ifdef HAVE_MULTILINK
  274. -void mp_check_options __P((void)); /* Check multilink-related options */
  275. -int mp_join_bundle __P((void)); /* join our link to an appropriate bundle */
  276. -void mp_exit_bundle __P((void)); /* have disconnected our link from bundle */
  277. -void mp_bundle_terminated __P((void));
  278. -char *epdisc_to_str __P((struct epdisc *)); /* string from endpoint discrim. */
  279. -int str_to_epdisc __P((struct epdisc *, char *)); /* endpt disc. from str */
  280. +void mp_check_options (void); /* Check multilink-related options */
  281. +int mp_join_bundle (void); /* join our link to an appropriate bundle */
  282. +void mp_exit_bundle (void); /* have disconnected our link from bundle */
  283. +void mp_bundle_terminated (void);
  284. +char *epdisc_to_str (struct epdisc *); /* string from endpoint discrim. */
  285. +int str_to_epdisc (struct epdisc *, char *); /* endpt disc. from str */
  286. #else
  287. #define mp_bundle_terminated() /* nothing */
  288. #define mp_exit_bundle() /* nothing */
  289. @@ -584,142 +584,142 @@ int str_to_epdisc __P((struct epdisc *,
  290. #endif
  291. /* Procedures exported from sys-*.c */
  292. -void sys_init __P((void)); /* Do system-dependent initialization */
  293. -void sys_cleanup __P((void)); /* Restore system state before exiting */
  294. -int sys_check_options __P((void)); /* Check options specified */
  295. -void sys_close __P((void)); /* Clean up in a child before execing */
  296. -int ppp_available __P((void)); /* Test whether ppp kernel support exists */
  297. -int get_pty __P((int *, int *, char *, int)); /* Get pty master/slave */
  298. -int open_ppp_loopback __P((void)); /* Open loopback for demand-dialling */
  299. -int tty_establish_ppp __P((int)); /* Turn serial port into a ppp interface */
  300. -void tty_disestablish_ppp __P((int)); /* Restore port to normal operation */
  301. -void generic_disestablish_ppp __P((int dev_fd)); /* Restore device setting */
  302. -int generic_establish_ppp __P((int dev_fd)); /* Make a ppp interface */
  303. -void make_new_bundle __P((int, int, int, int)); /* Create new bundle */
  304. -int bundle_attach __P((int)); /* Attach link to existing bundle */
  305. -void cfg_bundle __P((int, int, int, int)); /* Configure existing bundle */
  306. -void destroy_bundle __P((void)); /* Tell driver to destroy bundle */
  307. -void clean_check __P((void)); /* Check if line was 8-bit clean */
  308. -void set_up_tty __P((int, int)); /* Set up port's speed, parameters, etc. */
  309. -void restore_tty __P((int)); /* Restore port's original parameters */
  310. -void setdtr __P((int, int)); /* Raise or lower port's DTR line */
  311. -void output __P((int, u_char *, int)); /* Output a PPP packet */
  312. -void wait_input __P((struct timeval *));
  313. +void sys_init (void); /* Do system-dependent initialization */
  314. +void sys_cleanup (void); /* Restore system state before exiting */
  315. +int sys_check_options (void); /* Check options specified */
  316. +void sys_close (void); /* Clean up in a child before execing */
  317. +int ppp_available (void); /* Test whether ppp kernel support exists */
  318. +int get_pty (int *, int *, char *, int); /* Get pty master/slave */
  319. +int open_ppp_loopback (void); /* Open loopback for demand-dialling */
  320. +int tty_establish_ppp (int); /* Turn serial port into a ppp interface */
  321. +void tty_disestablish_ppp (int); /* Restore port to normal operation */
  322. +void generic_disestablish_ppp (int dev_fd); /* Restore device setting */
  323. +int generic_establish_ppp (int dev_fd); /* Make a ppp interface */
  324. +void make_new_bundle (int, int, int, int); /* Create new bundle */
  325. +int bundle_attach (int); /* Attach link to existing bundle */
  326. +void cfg_bundle (int, int, int, int); /* Configure existing bundle */
  327. +void destroy_bundle (void); /* Tell driver to destroy bundle */
  328. +void clean_check (void); /* Check if line was 8-bit clean */
  329. +void set_up_tty (int, int); /* Set up port's speed, parameters, etc. */
  330. +void restore_tty (int); /* Restore port's original parameters */
  331. +void setdtr (int, int); /* Raise or lower port's DTR line */
  332. +void output (int, u_char *, int); /* Output a PPP packet */
  333. +void wait_input (struct timeval *);
  334. /* Wait for input, with timeout */
  335. -void add_fd __P((int)); /* Add fd to set to wait for */
  336. -void remove_fd __P((int)); /* Remove fd from set to wait for */
  337. -int read_packet __P((u_char *)); /* Read PPP packet */
  338. -int get_loop_output __P((void)); /* Read pkts from loopback */
  339. -void tty_send_config __P((int, u_int32_t, int, int));
  340. +void add_fd (int); /* Add fd to set to wait for */
  341. +void remove_fd (int); /* Remove fd from set to wait for */
  342. +int read_packet (u_char *); /* Read PPP packet */
  343. +int get_loop_output (void); /* Read pkts from loopback */
  344. +void tty_send_config (int, u_int32_t, int, int);
  345. /* Configure i/f transmit parameters */
  346. -void tty_set_xaccm __P((ext_accm));
  347. +void tty_set_xaccm (ext_accm);
  348. /* Set extended transmit ACCM */
  349. -void tty_recv_config __P((int, u_int32_t, int, int));
  350. +void tty_recv_config (int, u_int32_t, int, int);
  351. /* Configure i/f receive parameters */
  352. -int ccp_test __P((int, u_char *, int, int));
  353. +int ccp_test (int, u_char *, int, int);
  354. /* Test support for compression scheme */
  355. -void ccp_flags_set __P((int, int, int));
  356. +void ccp_flags_set (int, int, int);
  357. /* Set kernel CCP state */
  358. -int ccp_fatal_error __P((int)); /* Test for fatal decomp error in kernel */
  359. -int get_idle_time __P((int, struct ppp_idle *));
  360. +int ccp_fatal_error (int); /* Test for fatal decomp error in kernel */
  361. +int get_idle_time (int, struct ppp_idle *);
  362. /* Find out how long link has been idle */
  363. -int get_ppp_stats __P((int, struct pppd_stats *));
  364. +int get_ppp_stats (int, struct pppd_stats *);
  365. /* Return link statistics */
  366. -void netif_set_mtu __P((int, int)); /* Set PPP interface MTU */
  367. -int netif_get_mtu __P((int)); /* Get PPP interface MTU */
  368. -int sifvjcomp __P((int, int, int, int));
  369. +void netif_set_mtu (int, int); /* Set PPP interface MTU */
  370. +int netif_get_mtu (int); /* Get PPP interface MTU */
  371. +int sifvjcomp (int, int, int, int);
  372. /* Configure VJ TCP header compression */
  373. -int sifup __P((int)); /* Configure i/f up for one protocol */
  374. -int sifnpmode __P((int u, int proto, enum NPmode mode));
  375. +int sifup (int); /* Configure i/f up for one protocol */
  376. +int sifnpmode (int u, int proto, enum NPmode mode);
  377. /* Set mode for handling packets for proto */
  378. -int sifdown __P((int)); /* Configure i/f down for one protocol */
  379. -int sifaddr __P((int, u_int32_t, u_int32_t, u_int32_t));
  380. +int sifdown (int); /* Configure i/f down for one protocol */
  381. +int sifaddr (int, u_int32_t, u_int32_t, u_int32_t);
  382. /* Configure IPv4 addresses for i/f */
  383. -int cifaddr __P((int, u_int32_t, u_int32_t));
  384. +int cifaddr (int, u_int32_t, u_int32_t);
  385. /* Reset i/f IP addresses */
  386. #ifdef INET6
  387. -int sif6addr __P((int, eui64_t, eui64_t));
  388. +int sif6addr (int, eui64_t, eui64_t);
  389. /* Configure IPv6 addresses for i/f */
  390. -int cif6addr __P((int, eui64_t, eui64_t));
  391. +int cif6addr (int, eui64_t, eui64_t);
  392. /* Remove an IPv6 address from i/f */
  393. #endif
  394. -int sifdefaultroute __P((int, u_int32_t, u_int32_t));
  395. +int sifdefaultroute (int, u_int32_t, u_int32_t);
  396. /* Create default route through i/f */
  397. -int cifdefaultroute __P((int, u_int32_t, u_int32_t));
  398. +int cifdefaultroute (int, u_int32_t, u_int32_t);
  399. /* Delete default route through i/f */
  400. -int sifproxyarp __P((int, u_int32_t));
  401. +int sifproxyarp (int, u_int32_t);
  402. /* Add proxy ARP entry for peer */
  403. -int cifproxyarp __P((int, u_int32_t));
  404. +int cifproxyarp (int, u_int32_t);
  405. /* Delete proxy ARP entry for peer */
  406. -u_int32_t GetMask __P((u_int32_t)); /* Get appropriate netmask for address */
  407. -int lock __P((char *)); /* Create lock file for device */
  408. -int relock __P((int)); /* Rewrite lock file with new pid */
  409. -void unlock __P((void)); /* Delete previously-created lock file */
  410. -void logwtmp __P((const char *, const char *, const char *));
  411. +u_int32_t GetMask (u_int32_t); /* Get appropriate netmask for address */
  412. +int lock (char *); /* Create lock file for device */
  413. +int relock (int); /* Rewrite lock file with new pid */
  414. +void unlock (void); /* Delete previously-created lock file */
  415. +void logwtmp (const char *, const char *, const char *);
  416. /* Write entry to wtmp file */
  417. -int get_host_seed __P((void)); /* Get host-dependent random number seed */
  418. -int have_route_to __P((u_int32_t)); /* Check if route to addr exists */
  419. +int get_host_seed (void); /* Get host-dependent random number seed */
  420. +int have_route_to (u_int32_t); /* Check if route to addr exists */
  421. #ifdef PPP_FILTER
  422. -int set_filters __P((struct bpf_program *pass, struct bpf_program *active));
  423. +int set_filters (struct bpf_program *pass, struct bpf_program *active);
  424. /* Set filter programs in kernel */
  425. #endif
  426. #ifdef IPX_CHANGE
  427. -int sipxfaddr __P((int, unsigned long, unsigned char *));
  428. -int cipxfaddr __P((int));
  429. +int sipxfaddr (int, unsigned long, unsigned char *);
  430. +int cipxfaddr (int);
  431. #endif
  432. -int get_if_hwaddr __P((u_char *addr, char *name));
  433. -char *get_first_ethernet __P((void));
  434. +int get_if_hwaddr (u_char *addr, char *name);
  435. +char *get_first_ethernet (void);
  436. /* Procedures exported from options.c */
  437. -int setipaddr __P((char *, char **, int)); /* Set local/remote ip addresses */
  438. -int parse_args __P((int argc, char **argv));
  439. +int setipaddr (char *, char **, int); /* Set local/remote ip addresses */
  440. +int parse_args (int argc, char **argv);
  441. /* Parse options from arguments given */
  442. -int options_from_file __P((char *filename, int must_exist, int check_prot,
  443. - int privileged));
  444. +int options_from_file (char *filename, int must_exist, int check_prot,
  445. + int privileged);
  446. /* Parse options from an options file */
  447. -int options_from_user __P((void)); /* Parse options from user's .ppprc */
  448. -int options_for_tty __P((void)); /* Parse options from /etc/ppp/options.tty */
  449. -int options_from_list __P((struct wordlist *, int privileged));
  450. +int options_from_user (void); /* Parse options from user's .ppprc */
  451. +int options_for_tty (void); /* Parse options from /etc/ppp/options.tty */
  452. +int options_from_list (struct wordlist *, int privileged);
  453. /* Parse options from a wordlist */
  454. -int getword __P((FILE *f, char *word, int *newlinep, char *filename));
  455. +int getword (FILE *f, char *word, int *newlinep, char *filename);
  456. /* Read a word from a file */
  457. -void option_error __P((char *fmt, ...));
  458. +void option_error (char *fmt, ...);
  459. /* Print an error message about an option */
  460. -int int_option __P((char *, int *));
  461. +int int_option (char *, int *);
  462. /* Simplified number_option for decimal ints */
  463. -void add_options __P((option_t *)); /* Add extra options */
  464. -void check_options __P((void)); /* check values after all options parsed */
  465. -int override_value __P((const char *, int, const char *));
  466. +void add_options (option_t *); /* Add extra options */
  467. +void check_options (void); /* check values after all options parsed */
  468. +int override_value (const char *, int, const char *);
  469. /* override value if permitted by priority */
  470. -void print_options __P((void (*) __P((void *, char *, ...)), void *));
  471. +void print_options (void (*) __P((void *, char *, ...)), void *);
  472. /* print out values of all options */
  473. -int parse_dotted_ip __P((char *, u_int32_t *));
  474. +int parse_dotted_ip (char *, u_int32_t *);
  475. /*
  476. * Hooks to enable plugins to change various things.
  477. */
  478. -extern int (*new_phase_hook) __P((int));
  479. -extern int (*idle_time_hook) __P((struct ppp_idle *));
  480. -extern int (*holdoff_hook) __P((void));
  481. -extern int (*pap_check_hook) __P((void));
  482. -extern int (*pap_auth_hook) __P((char *user, char *passwd, char **msgp,
  483. +extern int (*new_phase_hook) (int);
  484. +extern int (*idle_time_hook) (struct ppp_idle *);
  485. +extern int (*holdoff_hook) (void);
  486. +extern int (*pap_check_hook) (void);
  487. +extern int (*pap_auth_hook) (char *user, char *passwd, char **msgp,
  488. struct wordlist **paddrs,
  489. - struct wordlist **popts));
  490. -extern void (*pap_logout_hook) __P((void));
  491. -extern int (*pap_passwd_hook) __P((char *user, char *passwd));
  492. -extern int (*allowed_address_hook) __P((u_int32_t addr));
  493. -extern void (*ip_up_hook) __P((void));
  494. -extern void (*ip_down_hook) __P((void));
  495. -extern void (*ip_choose_hook) __P((u_int32_t *));
  496. + struct wordlist **popts);
  497. +extern void (*pap_logout_hook) (void);
  498. +extern int (*pap_passwd_hook) (char *user, char *passwd);
  499. +extern int (*allowed_address_hook) (u_int32_t addr);
  500. +extern void (*ip_up_hook) (void);
  501. +extern void (*ip_down_hook) (void);
  502. +extern void (*ip_choose_hook) (u_int32_t *);
  503. -extern int (*chap_check_hook) __P((void));
  504. -extern int (*chap_passwd_hook) __P((char *user, char *passwd));
  505. -extern void (*multilink_join_hook) __P((void));
  506. +extern int (*chap_check_hook) (void);
  507. +extern int (*chap_passwd_hook) (char *user, char *passwd);
  508. +extern void (*multilink_join_hook) (void);
  509. /* Let a plugin snoop sent and received packets. Useful for L2TP */
  510. -extern void (*snoop_recv_hook) __P((unsigned char *p, int len));
  511. -extern void (*snoop_send_hook) __P((unsigned char *p, int len));
  512. +extern void (*snoop_recv_hook) (unsigned char *p, int len);
  513. +extern void (*snoop_send_hook) (unsigned char *p, int len);
  514. /*
  515. * Inline versions of get/put char/short/long.