1
0

patch-pppd_ipv6cp_c 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. --- ppp-2.4.5.orig/pppd/ipv6cp.c 2009-11-16 23:26:07.000000000 +0100
  2. +++ ppp-2.4.5/pppd/ipv6cp.c 2014-03-17 16:13:14.000000000 +0100
  3. @@ -151,6 +151,7 @@
  4. */
  5. #include <stdio.h>
  6. +#include <stdlib.h>
  7. #include <string.h>
  8. #include <unistd.h>
  9. #include <netdb.h>
  10. @@ -182,16 +183,16 @@ static int ipv6cp_is_up;
  11. /*
  12. * Callbacks for fsm code. (CI = Configuration Information)
  13. */
  14. -static void ipv6cp_resetci __P((fsm *)); /* Reset our CI */
  15. -static int ipv6cp_cilen __P((fsm *)); /* Return length of our CI */
  16. -static void ipv6cp_addci __P((fsm *, u_char *, int *)); /* Add our CI */
  17. -static int ipv6cp_ackci __P((fsm *, u_char *, int)); /* Peer ack'd our CI */
  18. -static int ipv6cp_nakci __P((fsm *, u_char *, int, int));/* Peer nak'd our CI */
  19. -static int ipv6cp_rejci __P((fsm *, u_char *, int)); /* Peer rej'd our CI */
  20. -static int ipv6cp_reqci __P((fsm *, u_char *, int *, int)); /* Rcv CI */
  21. -static void ipv6cp_up __P((fsm *)); /* We're UP */
  22. -static void ipv6cp_down __P((fsm *)); /* We're DOWN */
  23. -static void ipv6cp_finished __P((fsm *)); /* Don't need lower layer */
  24. +static void ipv6cp_resetci (fsm *); /* Reset our CI */
  25. +static int ipv6cp_cilen (fsm *); /* Return length of our CI */
  26. +static void ipv6cp_addci (fsm *, u_char *, int *); /* Add our CI */
  27. +static int ipv6cp_ackci (fsm *, u_char *, int); /* Peer ack'd our CI */
  28. +static int ipv6cp_nakci (fsm *, u_char *, int, int);/* Peer nak'd our CI */
  29. +static int ipv6cp_rejci (fsm *, u_char *, int); /* Peer rej'd our CI */
  30. +static int ipv6cp_reqci (fsm *, u_char *, int *, int); /* Rcv CI */
  31. +static void ipv6cp_up (fsm *); /* We're UP */
  32. +static void ipv6cp_down (fsm *); /* We're DOWN */
  33. +static void ipv6cp_finished (fsm *); /* Don't need lower layer */
  34. fsm ipv6cp_fsm[NUM_PPP]; /* IPV6CP fsm structure */
  35. @@ -216,9 +217,9 @@ static fsm_callbacks ipv6cp_callbacks =
  36. /*
  37. * Command-line options.
  38. */
  39. -static int setifaceid __P((char **arg));
  40. -static void printifaceid __P((option_t *,
  41. - void (*)(void *, char *, ...), void *));
  42. +static int setifaceid (char **arg);
  43. +static void printifaceid (option_t *,
  44. + void (*)(void *, char *, ...), void *);
  45. static option_t ipv6cp_option_list[] = {
  46. { "ipv6", o_special, (void *)setifaceid,
  47. @@ -259,18 +260,18 @@ static option_t ipv6cp_option_list[] = {
  48. /*
  49. * Protocol entry points from main code.
  50. */
  51. -static void ipv6cp_init __P((int));
  52. -static void ipv6cp_open __P((int));
  53. -static void ipv6cp_close __P((int, char *));
  54. -static void ipv6cp_lowerup __P((int));
  55. -static void ipv6cp_lowerdown __P((int));
  56. -static void ipv6cp_input __P((int, u_char *, int));
  57. -static void ipv6cp_protrej __P((int));
  58. -static int ipv6cp_printpkt __P((u_char *, int,
  59. - void (*) __P((void *, char *, ...)), void *));
  60. -static void ipv6_check_options __P((void));
  61. -static int ipv6_demand_conf __P((int));
  62. -static int ipv6_active_pkt __P((u_char *, int));
  63. +static void ipv6cp_init (int);
  64. +static void ipv6cp_open (int);
  65. +static void ipv6cp_close (int, char *);
  66. +static void ipv6cp_lowerup (int);
  67. +static void ipv6cp_lowerdown (int);
  68. +static void ipv6cp_input (int, u_char *, int);
  69. +static void ipv6cp_protrej (int);
  70. +static int ipv6cp_printpkt (u_char *, int,
  71. + void (*) __P((void *, char *, ...)), void *);
  72. +static void ipv6_check_options (void);
  73. +static int ipv6_demand_conf (int);
  74. +static int ipv6_active_pkt (u_char *, int);
  75. struct protent ipv6cp_protent = {
  76. PPP_IPV6CP,
  77. @@ -292,9 +293,9 @@ struct protent ipv6cp_protent = {
  78. ipv6_active_pkt
  79. };
  80. -static void ipv6cp_clear_addrs __P((int, eui64_t, eui64_t));
  81. -static void ipv6cp_script __P((char *));
  82. -static void ipv6cp_script_done __P((void *));
  83. +static void ipv6cp_clear_addrs (int, eui64_t, eui64_t);
  84. +static void ipv6cp_script (char *);
  85. +static void ipv6cp_script_done (void *);
  86. /*
  87. * Lengths of configuration options.
  88. @@ -380,7 +381,7 @@ char *llv6_ntoa(eui64_t ifaceid);
  89. static void
  90. printifaceid(opt, printer, arg)
  91. option_t *opt;
  92. - void (*printer) __P((void *, char *, ...));
  93. + void (*printer) (void *, char *, ...);
  94. void *arg;
  95. {
  96. ipv6cp_options *wo = &ipv6cp_wantoptions[0];
  97. @@ -1435,7 +1436,7 @@ static int
  98. ipv6cp_printpkt(p, plen, printer, arg)
  99. u_char *p;
  100. int plen;
  101. - void (*printer) __P((void *, char *, ...));
  102. + void (*printer) (void *, char *, ...);
  103. void *arg;
  104. {
  105. int code, id, len, olen;