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