patch-pppd_ipcp_c 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. --- ppp-2.4.5.orig/pppd/ipcp.c 2009-11-16 23:26:07.000000000 +0100
  2. +++ ppp-2.4.5/pppd/ipcp.c 2014-03-17 16:13:13.000000000 +0100
  3. @@ -75,13 +75,13 @@ bool disable_defaultip = 0; /* Don't use
  4. bool noremoteip = 0; /* Let him have no IP address */
  5. /* Hook for a plugin to know when IP protocol has come up */
  6. -void (*ip_up_hook) __P((void)) = NULL;
  7. +void (*ip_up_hook) (void) = NULL;
  8. /* Hook for a plugin to know when IP protocol has come down */
  9. -void (*ip_down_hook) __P((void)) = NULL;
  10. +void (*ip_down_hook) (void) = NULL;
  11. /* Hook for a plugin to choose the remote IP address */
  12. -void (*ip_choose_hook) __P((u_int32_t *)) = NULL;
  13. +void (*ip_choose_hook) (u_int32_t *) = NULL;
  14. /* Notifiers for when IPCP goes up and down */
  15. struct notifier *ip_up_notifier = NULL;
  16. @@ -100,16 +100,16 @@ static char netmask_str[20]; /* string
  17. /*
  18. * Callbacks for fsm code. (CI = Configuration Information)
  19. */
  20. -static void ipcp_resetci __P((fsm *)); /* Reset our CI */
  21. -static int ipcp_cilen __P((fsm *)); /* Return length of our CI */
  22. -static void ipcp_addci __P((fsm *, u_char *, int *)); /* Add our CI */
  23. -static int ipcp_ackci __P((fsm *, u_char *, int)); /* Peer ack'd our CI */
  24. -static int ipcp_nakci __P((fsm *, u_char *, int, int));/* Peer nak'd our CI */
  25. -static int ipcp_rejci __P((fsm *, u_char *, int)); /* Peer rej'd our CI */
  26. -static int ipcp_reqci __P((fsm *, u_char *, int *, int)); /* Rcv CI */
  27. -static void ipcp_up __P((fsm *)); /* We're UP */
  28. -static void ipcp_down __P((fsm *)); /* We're DOWN */
  29. -static void ipcp_finished __P((fsm *)); /* Don't need lower layer */
  30. +static void ipcp_resetci (fsm *); /* Reset our CI */
  31. +static int ipcp_cilen (fsm *); /* Return length of our CI */
  32. +static void ipcp_addci (fsm *, u_char *, int *); /* Add our CI */
  33. +static int ipcp_ackci (fsm *, u_char *, int); /* Peer ack'd our CI */
  34. +static int ipcp_nakci (fsm *, u_char *, int, int);/* Peer nak'd our CI */
  35. +static int ipcp_rejci (fsm *, u_char *, int); /* Peer rej'd our CI */
  36. +static int ipcp_reqci (fsm *, u_char *, int *, int); /* Rcv CI */
  37. +static void ipcp_up (fsm *); /* We're UP */
  38. +static void ipcp_down (fsm *); /* We're DOWN */
  39. +static void ipcp_finished (fsm *); /* Don't need lower layer */
  40. fsm ipcp_fsm[NUM_PPP]; /* IPCP fsm structure */
  41. @@ -134,12 +134,12 @@ static fsm_callbacks ipcp_callbacks = {
  42. /*
  43. * Command-line options.
  44. */
  45. -static int setvjslots __P((char **));
  46. -static int setdnsaddr __P((char **));
  47. -static int setwinsaddr __P((char **));
  48. -static int setnetmask __P((char **));
  49. -int setipaddr __P((char *, char **, int));
  50. -static void printipaddr __P((option_t *, void (*)(void *, char *,...),void *));
  51. +static int setvjslots (char **);
  52. +static int setdnsaddr (char **);
  53. +static int setwinsaddr (char **);
  54. +static int setnetmask (char **);
  55. +int setipaddr (char *, char **, int);
  56. +static void printipaddr (option_t *, void (*)(void *, char *,...),void *);
  57. static option_t ipcp_option_list[] = {
  58. { "noip", o_bool, &ipcp_protent.enabled_flag,
  59. @@ -237,19 +237,19 @@ static option_t ipcp_option_list[] = {
  60. /*
  61. * Protocol entry points from main code.
  62. */
  63. -static void ipcp_init __P((int));
  64. -static void ipcp_open __P((int));
  65. -static void ipcp_close __P((int, char *));
  66. -static void ipcp_lowerup __P((int));
  67. -static void ipcp_lowerdown __P((int));
  68. -static void ipcp_input __P((int, u_char *, int));
  69. -static void ipcp_protrej __P((int));
  70. -static int ipcp_printpkt __P((u_char *, int,
  71. - void (*) __P((void *, char *, ...)), void *));
  72. -static void ip_check_options __P((void));
  73. -static int ip_demand_conf __P((int));
  74. -static int ip_active_pkt __P((u_char *, int));
  75. -static void create_resolv __P((u_int32_t, u_int32_t));
  76. +static void ipcp_init (int);
  77. +static void ipcp_open (int);
  78. +static void ipcp_close (int, char *);
  79. +static void ipcp_lowerup (int);
  80. +static void ipcp_lowerdown (int);
  81. +static void ipcp_input (int, u_char *, int);
  82. +static void ipcp_protrej (int);
  83. +static int ipcp_printpkt (u_char *, int,
  84. + void (*) __P((void *, char *, ...)), void *);
  85. +static void ip_check_options (void);
  86. +static int ip_demand_conf (int);
  87. +static int ip_active_pkt (u_char *, int);
  88. +static void create_resolv (u_int32_t, u_int32_t);
  89. struct protent ipcp_protent = {
  90. PPP_IPCP,
  91. @@ -271,9 +271,9 @@ struct protent ipcp_protent = {
  92. ip_active_pkt
  93. };
  94. -static void ipcp_clear_addrs __P((int, u_int32_t, u_int32_t));
  95. -static void ipcp_script __P((char *, int)); /* Run an up/down script */
  96. -static void ipcp_script_done __P((void *));
  97. +static void ipcp_clear_addrs (int, u_int32_t, u_int32_t);
  98. +static void ipcp_script (char *, int); /* Run an up/down script */
  99. +static void ipcp_script_done (void *);
  100. /*
  101. * Lengths of configuration options.
  102. @@ -482,7 +482,7 @@ setipaddr(arg, argv, doit)
  103. static void
  104. printipaddr(opt, printer, arg)
  105. option_t *opt;
  106. - void (*printer) __P((void *, char *, ...));
  107. + void (*printer) (void *, char *, ...);
  108. void *arg;
  109. {
  110. ipcp_options *wo = &ipcp_wantoptions[0];
  111. @@ -2126,7 +2126,7 @@ static int
  112. ipcp_printpkt(p, plen, printer, arg)
  113. u_char *p;
  114. int plen;
  115. - void (*printer) __P((void *, char *, ...));
  116. + void (*printer) (void *, char *, ...);
  117. void *arg;
  118. {
  119. int code, id, len, olen;