2 * Layer Two Tunnelling Protocol Daemon
3 * Copyright (C) 1998 Adtran, Inc.
4 * Copyright (C) 2002 Jeff McAdams
8 * This software is distributed under the terms
9 * of the GPL, which you should have received
10 * along with this source.
33 struct sockaddr_in peer
;
35 struct tunnel
*tunnel
; /* Who owns this packet, if it's a control */
36 int retries
; /* Again, if a control packet, how many retries? */
41 char option
[MAXSTRLEN
];
42 struct ppp_opts
*next
;
45 #define IPADDY(a) inet_ntoa(*((struct in_addr *)&(a)))
47 #define DEBUG c ? c->debug || t->debug : t->debug
49 #ifdef USE_SWAPS_INSTEAD
50 #define SWAPS(a) ((((a) & 0xFF) << 8 ) | (((a) >> 8) & 0xFF))
57 #define htons(a) SWAPS(a)
58 #define ntohs(a) SWAPS(a)
61 #define halt() printf("Halted.\n") ; for(;;)
63 extern char hostname
[];
64 extern void l2tp_log (int level
, const char *fmt
, ...);
65 extern struct buffer
*new_buf (int);
66 extern void udppush_handler (int);
67 extern int addfcs (struct buffer
*buf
);
68 extern inline void swaps (void *, int);
69 extern void do_packet_dump (struct buffer
*);
70 extern void status (const char *fmt
, ...);
71 extern void status_handler (int signal
);
72 extern int getPtyMaster(char *, int);
73 extern void do_control (void);
74 extern void recycle_buf (struct buffer
*);
75 extern void safe_copy (char *, char *, int);
76 extern void opt_destroy (struct ppp_opts
*);
77 extern struct ppp_opts
*add_opt (struct ppp_opts
*, char *, ...);
78 extern void process_signal (void);