1
0

patch-pppd_pppd_h 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537
  1. --- ppp-2.4.6.orig/pppd/pppd.h 2014-01-02 05:42:08.000000000 +0100
  2. +++ ppp-2.4.6/pppd/pppd.h 2014-06-06 08:12:44.000000000 +0200
  3. @@ -198,8 +198,8 @@ struct epdisc {
  4. #define EPD_MAGIC 4
  5. #define EPD_PHONENUM 5
  6. -typedef void (*notify_func) __P((void *, int));
  7. -typedef void (*printer_func) __P((void *, char *, ...));
  8. +typedef void (*notify_func) (void *, int);
  9. +typedef void (*printer_func) (void *, char *, ...);
  10. struct notifier {
  11. struct notifier *next;
  12. @@ -396,34 +396,34 @@ extern int option_priority; /* priority
  13. struct protent {
  14. u_short protocol; /* PPP protocol number */
  15. /* Initialization procedure */
  16. - void (*init) __P((int unit));
  17. + void (*init) (int unit);
  18. /* Process a received packet */
  19. - void (*input) __P((int unit, u_char *pkt, int len));
  20. + void (*input) (int unit, u_char *pkt, int len);
  21. /* Process a received protocol-reject */
  22. - void (*protrej) __P((int unit));
  23. + void (*protrej) (int unit);
  24. /* Lower layer has come up */
  25. - void (*lowerup) __P((int unit));
  26. + void (*lowerup) (int unit);
  27. /* Lower layer has gone down */
  28. - void (*lowerdown) __P((int unit));
  29. + void (*lowerdown) (int unit);
  30. /* Open the protocol */
  31. - void (*open) __P((int unit));
  32. + void (*open) (int unit);
  33. /* Close the protocol */
  34. - void (*close) __P((int unit, char *reason));
  35. + void (*close) (int unit, char *reason);
  36. /* Print a packet in readable form */
  37. - int (*printpkt) __P((u_char *pkt, int len, printer_func printer,
  38. - void *arg));
  39. + int (*printpkt) (u_char *pkt, int len, printer_func printer,
  40. + void *arg);
  41. /* Process a received data packet */
  42. - void (*datainput) __P((int unit, u_char *pkt, int len));
  43. + void (*datainput) (int unit, u_char *pkt, int len);
  44. bool enabled_flag; /* 0 iff protocol is disabled */
  45. char *name; /* Text name of protocol */
  46. char *data_name; /* Text name of corresponding data protocol */
  47. option_t *options; /* List of command-line options */
  48. /* Check requested options, assign defaults */
  49. - void (*check_options) __P((void));
  50. + void (*check_options) (void);
  51. /* Configure interface for demand-dial */
  52. - int (*demand_conf) __P((int unit));
  53. + int (*demand_conf) (int unit);
  54. /* Say whether to bring up link for this pkt */
  55. - int (*active_pkt) __P((u_char *pkt, int len));
  56. + int (*active_pkt) (u_char *pkt, int len);
  57. };
  58. /* Table of pointers to supported protocols */
  59. @@ -440,25 +440,25 @@ struct channel {
  60. /* set of options for this channel */
  61. option_t *options;
  62. /* find and process a per-channel options file */
  63. - void (*process_extra_options) __P((void));
  64. + void (*process_extra_options) (void);
  65. /* check all the options that have been given */
  66. - void (*check_options) __P((void));
  67. + void (*check_options) (void);
  68. /* get the channel ready to do PPP, return a file descriptor */
  69. - int (*connect) __P((void));
  70. + int (*connect) (void);
  71. /* we're finished with the channel */
  72. - void (*disconnect) __P((void));
  73. + void (*disconnect) (void);
  74. /* put the channel into PPP `mode' */
  75. - int (*establish_ppp) __P((int));
  76. + int (*establish_ppp) (int);
  77. /* take the channel out of PPP `mode', restore loopback if demand */
  78. - void (*disestablish_ppp) __P((int));
  79. + void (*disestablish_ppp) (int);
  80. /* set the transmit-side PPP parameters of the channel */
  81. - void (*send_config) __P((int, u_int32_t, int, int));
  82. + void (*send_config) (int, u_int32_t, int, int);
  83. /* set the receive-side PPP parameters of the channel */
  84. - void (*recv_config) __P((int, u_int32_t, int, int));
  85. + void (*recv_config) (int, u_int32_t, int, int);
  86. /* cleanup on error or normal exit */
  87. - void (*cleanup) __P((void));
  88. + void (*cleanup) (void);
  89. /* close the device, called in children after fork */
  90. - void (*close) __P((void));
  91. + void (*close) (void);
  92. };
  93. extern struct channel *the_channel;
  94. @@ -483,117 +483,117 @@ extern struct userenv *userenv_list;
  95. */
  96. /* Procedures exported from main.c. */
  97. -void set_ifunit __P((int)); /* set stuff that depends on ifunit */
  98. -void detach __P((void)); /* Detach from controlling tty */
  99. -void die __P((int)); /* Cleanup and exit */
  100. -void quit __P((void)); /* like die(1) */
  101. -void novm __P((char *)); /* Say we ran out of memory, and die */
  102. -void timeout __P((void (*func)(void *), void *arg, int s, int us));
  103. +void set_ifunit (int); /* set stuff that depends on ifunit */
  104. +void detach (void); /* Detach from controlling tty */
  105. +void die (int); /* Cleanup and exit */
  106. +void quit (void); /* like die(1) */
  107. +void novm (char *); /* Say we ran out of memory, and die */
  108. +void timeout (void (*func)(void *), void *arg, int s, int us);
  109. /* Call func(arg) after s.us seconds */
  110. -void untimeout __P((void (*func)(void *), void *arg));
  111. +void untimeout (void (*func)(void *), void *arg);
  112. /* Cancel call to func(arg) */
  113. -void record_child __P((int, char *, void (*) (void *), void *, int));
  114. -pid_t safe_fork __P((int, int, int)); /* Fork & close stuff in child */
  115. -int device_script __P((char *cmd, int in, int out, int dont_wait));
  116. +void record_child (int, char *, void (*) (void *), void *, int);
  117. +pid_t safe_fork (int, int, int); /* Fork & close stuff in child */
  118. +int device_script (char *cmd, int in, int out, int dont_wait);
  119. /* Run `cmd' with given stdin and stdout */
  120. -pid_t run_program __P((char *prog, char **args, int must_exist,
  121. - void (*done)(void *), void *arg, int wait));
  122. +pid_t run_program (char *prog, char **args, int must_exist,
  123. + void (*done)(void *), void *arg, int wait);
  124. /* Run program prog with args in child */
  125. -void reopen_log __P((void)); /* (re)open the connection to syslog */
  126. -void print_link_stats __P((void)); /* Print stats, if available */
  127. -void reset_link_stats __P((int)); /* Reset (init) stats when link goes up */
  128. -void update_link_stats __P((int)); /* Get stats at link termination */
  129. -void script_setenv __P((char *, char *, int)); /* set script env var */
  130. -void script_unsetenv __P((char *)); /* unset script env var */
  131. -void new_phase __P((int)); /* signal start of new phase */
  132. -void add_notifier __P((struct notifier **, notify_func, void *));
  133. -void remove_notifier __P((struct notifier **, notify_func, void *));
  134. -void notify __P((struct notifier *, int));
  135. -int ppp_send_config __P((int, int, u_int32_t, int, int));
  136. -int ppp_recv_config __P((int, int, u_int32_t, int, int));
  137. -const char *protocol_name __P((int));
  138. -void remove_pidfiles __P((void));
  139. -void lock_db __P((void));
  140. -void unlock_db __P((void));
  141. +void reopen_log (void); /* (re)open the connection to syslog */
  142. +void print_link_stats (void); /* Print stats, if available */
  143. +void reset_link_stats (int); /* Reset (init) stats when link goes up */
  144. +void update_link_stats (int); /* Get stats at link termination */
  145. +void script_setenv (char *, char *, int); /* set script env var */
  146. +void script_unsetenv (char *); /* unset script env var */
  147. +void new_phase (int); /* signal start of new phase */
  148. +void add_notifier (struct notifier **, notify_func, void *);
  149. +void remove_notifier (struct notifier **, notify_func, void *);
  150. +void notify (struct notifier *, int);
  151. +int ppp_send_config (int, int, u_int32_t, int, int);
  152. +int ppp_recv_config (int, int, u_int32_t, int, int);
  153. +const char *protocol_name (int);
  154. +void remove_pidfiles (void);
  155. +void lock_db (void);
  156. +void unlock_db (void);
  157. /* Procedures exported from tty.c. */
  158. -void tty_init __P((void));
  159. +void tty_init (void);
  160. /* Procedures exported from utils.c. */
  161. -void log_packet __P((u_char *, int, char *, int));
  162. +void log_packet (u_char *, int, char *, int);
  163. /* Format a packet and log it with syslog */
  164. -void print_string __P((char *, int, printer_func, void *));
  165. +void print_string (char *, int, printer_func, void *);
  166. /* Format a string for output */
  167. -int slprintf __P((char *, int, char *, ...)); /* sprintf++ */
  168. -int vslprintf __P((char *, int, char *, va_list)); /* vsprintf++ */
  169. -size_t strlcpy __P((char *, const char *, size_t)); /* safe strcpy */
  170. -size_t strlcat __P((char *, const char *, size_t)); /* safe strncpy */
  171. -void dbglog __P((char *, ...)); /* log a debug message */
  172. -void info __P((char *, ...)); /* log an informational message */
  173. -void notice __P((char *, ...)); /* log a notice-level message */
  174. -void warn __P((char *, ...)); /* log a warning message */
  175. -void error __P((char *, ...)); /* log an error message */
  176. -void fatal __P((char *, ...)); /* log an error message and die(1) */
  177. -void init_pr_log __P((const char *, int)); /* initialize for using pr_log */
  178. -void pr_log __P((void *, char *, ...)); /* printer fn, output to syslog */
  179. -void end_pr_log __P((void)); /* finish up after using pr_log */
  180. -void dump_packet __P((const char *, u_char *, int));
  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. @@ -602,145 +602,145 @@ 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 ether_to_eui64(eui64_t *p_eui64); /* convert eth0 hw address to EUI64 */
  388. -int sif6addr __P((int, eui64_t, eui64_t));
  389. +int sif6addr (int, eui64_t, eui64_t);
  390. /* Configure IPv6 addresses for i/f */
  391. -int cif6addr __P((int, eui64_t, eui64_t));
  392. +int cif6addr (int, eui64_t, eui64_t);
  393. /* Remove an IPv6 address from i/f */
  394. #endif
  395. -int sifdefaultroute __P((int, u_int32_t, u_int32_t));
  396. +int sifdefaultroute (int, u_int32_t, u_int32_t);
  397. /* Create default route through i/f */
  398. -int cifdefaultroute __P((int, u_int32_t, u_int32_t));
  399. +int cifdefaultroute (int, u_int32_t, u_int32_t);
  400. /* Delete default route through i/f */
  401. -int sifproxyarp __P((int, u_int32_t));
  402. +int sifproxyarp (int, u_int32_t);
  403. /* Add proxy ARP entry for peer */
  404. -int cifproxyarp __P((int, u_int32_t));
  405. +int cifproxyarp (int, u_int32_t);
  406. /* Delete proxy ARP entry for peer */
  407. -u_int32_t GetMask __P((u_int32_t)); /* Get appropriate netmask for address */
  408. -int lock __P((char *)); /* Create lock file for device */
  409. -int relock __P((int)); /* Rewrite lock file with new pid */
  410. -void unlock __P((void)); /* Delete previously-created lock file */
  411. -void logwtmp __P((const char *, const char *, const char *));
  412. +u_int32_t GetMask (u_int32_t); /* Get appropriate netmask for address */
  413. +int lock (char *); /* Create lock file for device */
  414. +int relock (int); /* Rewrite lock file with new pid */
  415. +void unlock (void); /* Delete previously-created lock file */
  416. +void logwtmp (const char *, const char *, const char *);
  417. /* Write entry to wtmp file */
  418. -int get_host_seed __P((void)); /* Get host-dependent random number seed */
  419. -int have_route_to __P((u_int32_t)); /* Check if route to addr exists */
  420. +int get_host_seed (void); /* Get host-dependent random number seed */
  421. +int have_route_to (u_int32_t); /* Check if route to addr exists */
  422. #ifdef PPP_FILTER
  423. -int set_filters __P((struct bpf_program *pass, struct bpf_program *active));
  424. +int set_filters (struct bpf_program *pass, struct bpf_program *active);
  425. /* Set filter programs in kernel */
  426. #endif
  427. #ifdef IPX_CHANGE
  428. -int sipxfaddr __P((int, unsigned long, unsigned char *));
  429. -int cipxfaddr __P((int));
  430. +int sipxfaddr (int, unsigned long, unsigned char *);
  431. +int cipxfaddr (int);
  432. #endif
  433. -int get_if_hwaddr __P((u_char *addr, char *name));
  434. -char *get_first_ethernet __P((void));
  435. +int get_if_hwaddr (u_char *addr, char *name);
  436. +char *get_first_ethernet (void);
  437. /* Procedures exported from options.c */
  438. -int setipaddr __P((char *, char **, int)); /* Set local/remote ip addresses */
  439. -int parse_args __P((int argc, char **argv));
  440. +int setipaddr (char *, char **, int); /* Set local/remote ip addresses */
  441. +int parse_args (int argc, char **argv);
  442. /* Parse options from arguments given */
  443. -int options_from_file __P((char *filename, int must_exist, int check_prot,
  444. - int privileged));
  445. +int options_from_file (char *filename, int must_exist, int check_prot,
  446. + int privileged);
  447. /* Parse options from an options file */
  448. -int options_from_user __P((void)); /* Parse options from user's .ppprc */
  449. -int options_for_tty __P((void)); /* Parse options from /etc/ppp/options.tty */
  450. -int options_from_list __P((struct wordlist *, int privileged));
  451. +int options_from_user (void); /* Parse options from user's .ppprc */
  452. +int options_for_tty (void); /* Parse options from /etc/ppp/options.tty */
  453. +int options_from_list (struct wordlist *, int privileged);
  454. /* Parse options from a wordlist */
  455. -int getword __P((FILE *f, char *word, int *newlinep, char *filename));
  456. +int getword (FILE *f, char *word, int *newlinep, char *filename);
  457. /* Read a word from a file */
  458. -void option_error __P((char *fmt, ...));
  459. +void option_error (char *fmt, ...);
  460. /* Print an error message about an option */
  461. -int int_option __P((char *, int *));
  462. +int int_option (char *, int *);
  463. /* Simplified number_option for decimal ints */
  464. -void add_options __P((option_t *)); /* Add extra options */
  465. -void check_options __P((void)); /* check values after all options parsed */
  466. -int override_value __P((const char *, int, const char *));
  467. +void add_options (option_t *); /* Add extra options */
  468. +void check_options (void); /* check values after all options parsed */
  469. +int override_value (const char *, int, const char *);
  470. /* override value if permitted by priority */
  471. -void print_options __P((printer_func, void *));
  472. +void print_options (printer_func, void *);
  473. /* print out values of all options */
  474. -int parse_dotted_ip __P((char *, u_int32_t *));
  475. +int parse_dotted_ip (char *, u_int32_t *);
  476. /*
  477. * Hooks to enable plugins to change various things.
  478. */
  479. -extern int (*new_phase_hook) __P((int));
  480. -extern int (*idle_time_hook) __P((struct ppp_idle *));
  481. -extern int (*holdoff_hook) __P((void));
  482. -extern int (*pap_check_hook) __P((void));
  483. -extern int (*pap_auth_hook) __P((char *user, char *passwd, char **msgp,
  484. +extern int (*new_phase_hook) (int);
  485. +extern int (*idle_time_hook) (struct ppp_idle *);
  486. +extern int (*holdoff_hook) (void);
  487. +extern int (*pap_check_hook) (void);
  488. +extern int (*pap_auth_hook) (char *user, char *passwd, char **msgp,
  489. struct wordlist **paddrs,
  490. - struct wordlist **popts));
  491. -extern void (*pap_logout_hook) __P((void));
  492. -extern int (*pap_passwd_hook) __P((char *user, char *passwd));
  493. -extern int (*allowed_address_hook) __P((u_int32_t addr));
  494. -extern void (*ip_up_hook) __P((void));
  495. -extern void (*ip_down_hook) __P((void));
  496. -extern void (*ip_choose_hook) __P((u_int32_t *));
  497. -extern void (*ipv6_up_hook) __P((void));
  498. -extern void (*ipv6_down_hook) __P((void));
  499. + struct wordlist **popts);
  500. +extern void (*pap_logout_hook) (void);
  501. +extern int (*pap_passwd_hook) (char *user, char *passwd);
  502. +extern int (*allowed_address_hook) (u_int32_t addr);
  503. +extern void (*ip_up_hook) (void);
  504. +extern void (*ip_down_hook) (void);
  505. +extern void (*ip_choose_hook) (u_int32_t *);
  506. +extern void (*ipv6_up_hook) (void);
  507. +extern void (*ipv6_down_hook) (void);
  508. -extern int (*chap_check_hook) __P((void));
  509. -extern int (*chap_passwd_hook) __P((char *user, char *passwd));
  510. -extern void (*multilink_join_hook) __P((void));
  511. +extern int (*chap_check_hook) (void);
  512. +extern int (*chap_passwd_hook) (char *user, char *passwd);
  513. +extern void (*multilink_join_hook) (void);
  514. /* Let a plugin snoop sent and received packets. Useful for L2TP */
  515. -extern void (*snoop_recv_hook) __P((unsigned char *p, int len));
  516. -extern void (*snoop_send_hook) __P((unsigned char *p, int len));
  517. +extern void (*snoop_recv_hook) (unsigned char *p, int len);
  518. +extern void (*snoop_send_hook) (unsigned char *p, int len);
  519. /*
  520. * Inline versions of get/put char/short/long.