patch-pppd_lcp_c 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. --- ppp-2.4.5.orig/pppd/lcp.c 2009-11-16 23:26:07.000000000 +0100
  2. +++ ppp-2.4.5/pppd/lcp.c 2014-03-17 16:13:13.000000000 +0100
  3. @@ -66,7 +66,7 @@ static const char rcsid[] = RCSID;
  4. /* steal a bit in fsm flags word */
  5. #define DELAYED_UP 0x100
  6. -static void lcp_delayed_up __P((void *));
  7. +static void lcp_delayed_up (void *);
  8. /*
  9. * LCP-related command-line options.
  10. @@ -76,12 +76,12 @@ int lcp_echo_fails = 0; /* Tolerance to
  11. bool lax_recv = 0; /* accept control chars in asyncmap */
  12. bool noendpoint = 0; /* don't send/accept endpoint discriminator */
  13. -static int noopt __P((char **));
  14. +static int noopt (char **);
  15. #ifdef HAVE_MULTILINK
  16. -static int setendpoint __P((char **));
  17. -static void printendpoint __P((option_t *, void (*)(void *, char *, ...),
  18. - void *));
  19. +static int setendpoint (char **);
  20. +static void printendpoint (option_t *, void (*)(void *, char *, ...),
  21. + void *);
  22. #endif /* HAVE_MULTILINK */
  23. static option_t lcp_option_list[] = {
  24. @@ -202,31 +202,31 @@ static u_char nak_buffer[PPP_MRU]; /* wh
  25. /*
  26. * Callbacks for fsm code. (CI = Configuration Information)
  27. */
  28. -static void lcp_resetci __P((fsm *)); /* Reset our CI */
  29. -static int lcp_cilen __P((fsm *)); /* Return length of our CI */
  30. -static void lcp_addci __P((fsm *, u_char *, int *)); /* Add our CI to pkt */
  31. -static int lcp_ackci __P((fsm *, u_char *, int)); /* Peer ack'd our CI */
  32. -static int lcp_nakci __P((fsm *, u_char *, int, int)); /* Peer nak'd our CI */
  33. -static int lcp_rejci __P((fsm *, u_char *, int)); /* Peer rej'd our CI */
  34. -static int lcp_reqci __P((fsm *, u_char *, int *, int)); /* Rcv peer CI */
  35. -static void lcp_up __P((fsm *)); /* We're UP */
  36. -static void lcp_down __P((fsm *)); /* We're DOWN */
  37. -static void lcp_starting __P((fsm *)); /* We need lower layer up */
  38. -static void lcp_finished __P((fsm *)); /* We need lower layer down */
  39. -static int lcp_extcode __P((fsm *, int, int, u_char *, int));
  40. -static void lcp_rprotrej __P((fsm *, u_char *, int));
  41. +static void lcp_resetci (fsm *); /* Reset our CI */
  42. +static int lcp_cilen (fsm *); /* Return length of our CI */
  43. +static void lcp_addci (fsm *, u_char *, int *); /* Add our CI to pkt */
  44. +static int lcp_ackci (fsm *, u_char *, int); /* Peer ack'd our CI */
  45. +static int lcp_nakci (fsm *, u_char *, int, int); /* Peer nak'd our CI */
  46. +static int lcp_rejci (fsm *, u_char *, int); /* Peer rej'd our CI */
  47. +static int lcp_reqci (fsm *, u_char *, int *, int); /* Rcv peer CI */
  48. +static void lcp_up (fsm *); /* We're UP */
  49. +static void lcp_down (fsm *); /* We're DOWN */
  50. +static void lcp_starting (fsm *); /* We need lower layer up */
  51. +static void lcp_finished (fsm *); /* We need lower layer down */
  52. +static int lcp_extcode (fsm *, int, int, u_char *, int);
  53. +static void lcp_rprotrej (fsm *, u_char *, int);
  54. /*
  55. * routines to send LCP echos to peer
  56. */
  57. -static void lcp_echo_lowerup __P((int));
  58. -static void lcp_echo_lowerdown __P((int));
  59. -static void LcpEchoTimeout __P((void *));
  60. -static void lcp_received_echo_reply __P((fsm *, int, u_char *, int));
  61. -static void LcpSendEchoRequest __P((fsm *));
  62. -static void LcpLinkFailure __P((fsm *));
  63. -static void LcpEchoCheck __P((fsm *));
  64. +static void lcp_echo_lowerup (int);
  65. +static void lcp_echo_lowerdown (int);
  66. +static void LcpEchoTimeout (void *);
  67. +static void lcp_received_echo_reply (fsm *, int, u_char *, int);
  68. +static void LcpSendEchoRequest (fsm *);
  69. +static void LcpLinkFailure (fsm *);
  70. +static void LcpEchoCheck (fsm *);
  71. static fsm_callbacks lcp_callbacks = { /* LCP callback routines */
  72. lcp_resetci, /* Reset our Configuration Information */
  73. @@ -251,11 +251,11 @@ static fsm_callbacks lcp_callbacks = { /
  74. * Some of these are called directly.
  75. */
  76. -static void lcp_init __P((int));
  77. -static void lcp_input __P((int, u_char *, int));
  78. -static void lcp_protrej __P((int));
  79. -static int lcp_printpkt __P((u_char *, int,
  80. - void (*) __P((void *, char *, ...)), void *));
  81. +static void lcp_init (int);
  82. +static void lcp_input (int, u_char *, int);
  83. +static void lcp_protrej (int);
  84. +static int lcp_printpkt (u_char *, int,
  85. + void (*) __P((void *, char *, ...)), void *);
  86. struct protent lcp_protent = {
  87. PPP_LCP,
  88. @@ -322,7 +322,7 @@ setendpoint(argv)
  89. static void
  90. printendpoint(opt, printer, arg)
  91. option_t *opt;
  92. - void (*printer) __P((void *, char *, ...));
  93. + void (*printer) (void *, char *, ...);
  94. void *arg;
  95. {
  96. printer(arg, "%s", epdisc_to_str(&lcp_wantoptions[0].endpoint));
  97. @@ -1985,7 +1985,7 @@ static int
  98. lcp_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, i;