RTEMS: cpukit/pppd/pppd.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
pppd.h
1/*
2 * pppd.h - PPP daemon global declarations.
3 *
4 * Copyright (c) 1989 Carnegie Mellon University.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms are permitted
8 * provided that the above copyright notice and this paragraph are
9 * duplicated in all such forms and that any documentation,
10 * advertising materials, and other materials related to such
11 * distribution and use acknowledge that the software was developed
12 * by Carnegie Mellon University. The name of the
13 * University may not be used to endorse or promote products derived
14 * from this software without specific prior written permission.
15 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
17 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
18 *
19 * $Id$
20 */
21
22#ifndef __PPPD_H__
23#define __PPPD_H__
24
25#include <stdbool.h> /* bool */
26#include <stdio.h> /* for FILE */
27#include <limits.h> /* for NGROUPS_MAX */
28#include <sys/param.h>
29#include <sys/types.h> /* for uint32_t, if defined */
30#include <sys/time.h> /* for struct timeval */
31#include <net/ppp_defs.h>
32#include <rtems/rtemsdialer.h>
33#include <stdint.h>
34
35#if defined(__STDC__)
36#include <stdarg.h>
37#define __V(x) x
38#else
39#include <varargs.h>
40#define __V(x) (va_alist) va_dcl
41#define const
42#define volatile
43#endif
44
45#ifdef INET6
46#include "eui64.h"
47#endif
48
49/*
50 * Limits.
51 */
52
53#define NUM_PPP 1 /* One PPP interface supported (per process) */
54#define MAXWORDLEN 1024 /* max length of word in file (incl null) */
55#define MAXARGS 1 /* max # args to a command */
56#define MAXNAMELEN 256 /* max length of hostname or name for auth */
57#define MAXSECRETLEN 256 /* max length of password or secret */
58
59/*
60 * Option descriptor structure.
61 */
62
63enum opt_type {
64 o_special_noarg = 0,
65 o_special = 1,
66 o_bool,
67 o_int,
68 o_uint32,
69 o_string,
70};
71
72 typedef struct {
73 char *name; /* name of the option */
74 enum opt_type type;
75 void *addr;
76 char *description;
77 uint32_t flags;
78 void *addr2;
79 int upper_limit;
80 int lower_limit;
81} option_t;
82
83/* Values for flags */
84#define OPT_VALUE 0xffL /* mask for presupplied value */
85#define OPT_HEX 0x100L /* int option is in hex */
86#define OPT_NOARG 0x200L /* option doesn't take argument */
87#define OPT_OR 0x400L /* OR in argument to value */
88#define OPT_INC 0x800L /* increment value */
89#define OPT_PRIV 0x1000L /* privileged option */
90#define OPT_STATIC 0x2000L /* string option goes into static array */
91#define OPT_LLIMIT 0x4000L /* check value against lower limit */
92#define OPT_ULIMIT 0x8000L /* check value against upper limit */
93#define OPT_LIMITS (OPT_LLIMIT|OPT_ULIMIT)
94#define OPT_ZEROOK 0x10000L /* 0 value is OK even if not within limits */
95#define OPT_NOINCR 0x20000L /* value mustn't be increased */
96#define OPT_ZEROINF 0x40000L /* with OPT_NOINCR, 0 == infinity */
97#define OPT_A2INFO 0x100000L /* addr2 -> option_info to update */
98#define OPT_A2COPY 0x200000L /* addr2 -> second location to rcv value */
99#define OPT_ENABLE 0x400000L /* use *addr2 as enable for option */
100#define OPT_PRIVFIX 0x800000L /* can't be overridden if noauth */
101#define OPT_PREPASS 0x1000000L /* do this opt in pre-pass to find device */
102#define OPT_INITONLY 0x2000000L /* option can only be set in init phase */
103#define OPT_DEVEQUIV 0x4000000L /* equiv to device name */
104#define OPT_DEVNAM (OPT_PREPASS | OPT_INITONLY | OPT_DEVEQUIV)
105
106#define OPT_VAL(x) ((x) & OPT_VALUE)
107
108#ifndef GIDSET_TYPE
109#define GIDSET_TYPE gid_t
110#endif
111
112/* Structure representing a list of permitted IP addresses. */
113 struct permitted_ip {
114 int permit; /* 1 = permit, 0 = forbid */
115 uint32_t base; /* match if (addr & mask) == base */
116 uint32_t mask; /* base and mask are in network byte order */
117};
118
119/*
120 * Unfortunately, the linux kernel driver uses a different structure
121 * for statistics from the rest of the ports.
122 * This structure serves as a common representation for the bits
123 * pppd needs.
124 */
125 struct pppd_stats {
126 unsigned int bytes_in;
127 unsigned int bytes_out;
128};
129
130/* Used for storing a sequence of words. Usually malloced. */
131 struct wordlist {
132 struct wordlist *next;
133 char *word;
134};
135
136/*
137 * Global variables.
138 */
139
140extern int pppd_kill_link; /* Signal to terminate processing loop */
141extern int hungup; /* Physical layer has disconnected */
142extern int pppifunit; /* Interface unit number */
143extern char ifname[]; /* Interface name */
144extern int pppd_ttyfd; /* Serial device file descriptor */
145extern char hostname[]; /* Our hostname */
146extern u_char outpacket_buf[]; /* Buffer for outgoing packets */
147extern int pppd_phase; /* Current state of link - see values below */
148extern int baud_rate; /* Current link speed in bits/sec */
149extern int redirect_stderr;/* Connector's stderr should go to file */
150extern char peer_authname[];/* Authenticated name of peer */
151extern int privileged; /* We were run by real-uid root */
152extern int need_holdoff; /* Need holdoff period after link terminates */
153extern char **script_env; /* Environment variables for scripts */
154extern int detached; /* Have detached from controlling tty */
155extern GIDSET_TYPE groups[NGROUPS_MAX]; /* groups the user is in */
156extern int ngroups; /* How many groups valid in groups */
157extern struct pppd_stats link_stats; /* byte/packet counts etc. for link */
158extern int using_pty; /* using pty as device (notty or pty opt.) */
159extern int log_to_fd; /* logging to this fd as well as syslog */
160extern char *no_ppp_msg; /* message to print if ppp not in kernel */
161extern volatile int pppd_status; /* exit status for pppd */
162extern int devnam_fixed; /* can no longer change devnam */
163extern int unsuccess; /* # unsuccessful connection attempts */
164extern int do_callback; /* set if we want to do callback next */
165extern int doing_callback; /* set if this is a callback */
166extern dialerfp pppd_dialer; /* script dialer function callback */
167
168/* Values for do_callback and doing_callback */
169#define CALLBACK_DIALIN 1 /* we are expecting the call back */
170#define CALLBACK_DIALOUT 2 /* we are dialling out to call back */
171
172/*
173 * Variables set by command-line options.
174 */
175
176extern int debug; /* Debug flag */
177extern int kdebugflag; /* Tell kernel to print debug messages */
178extern int default_device; /* Using /dev/tty or equivalent */
179extern char devnam[MAXPATHLEN]; /* Device name */
180extern int crtscts; /* Use hardware flow control */
181extern bool modem; /* Use modem control lines */
182extern int inspeed; /* Input/Output speed requested */
183extern uint32_t netmask; /* IP netmask to set on interface */
184extern bool lockflag; /* Create lock file to lock the serial dev */
185extern bool nodetach; /* Don't detach from controlling tty */
186extern bool updetach; /* Detach from controlling tty when link up */
187extern char *initializer; /* Script to initialize physical link */
188extern char *connect_script; /* Script to establish physical link */
189extern char *disconnect_script; /* Script to disestablish physical link */
190extern char *welcomer; /* Script to welcome client after connection */
191extern char *ptycommand; /* Command to run on other side of pty */
192extern int maxconnect; /* Maximum connect time (seconds) */
193extern char user[MAXNAMELEN];/* Our name for authenticating ourselves */
194extern char passwd[MAXSECRETLEN]; /* Password for PAP or CHAP */
195extern bool auth_required; /* Peer is required to authenticate */
196extern bool persist; /* Reopen link after it goes down */
197extern bool uselogin; /* Use /etc/passwd for checking PAP */
198extern char our_name[MAXNAMELEN];/* Our name for authentication purposes */
199extern char remote_name[MAXNAMELEN]; /* Peer's name for authentication */
200extern bool explicit_remote;/* remote_name specified with remotename opt */
201extern bool demand; /* Do dial-on-demand */
202extern char *ipparam; /* Extra parameter for ip up/down scripts */
203extern bool cryptpap; /* Others' PAP passwords are encrypted */
204extern int idle_time_limit;/* Shut down link if idle for this long */
205extern int holdoff; /* Dead time before restarting */
206extern bool holdoff_specified; /* true if user gave a holdoff value */
207extern bool notty; /* Stdin/out is not a tty */
208extern char *record_file; /* File to record chars sent/received */
209extern bool sync_serial; /* Device is synchronous serial device */
210extern int maxfail; /* Max # of unsuccessful connection attempts */
211extern char linkname[MAXPATHLEN]; /* logical name for link */
212extern bool tune_kernel; /* May alter kernel settings as necessary */
213extern int connect_delay; /* Time to delay after connect script */
214
215#ifdef PPP_FILTER
216extern struct bpf_program pass_filter; /* Filter for pkts to pass */
217extern struct bpf_program active_filter; /* Filter for link-active pkts */
218#endif
219
220#ifdef MSLANMAN
221extern bool ms_lanman; /* Use LanMan password instead of NT */
222 /* Has meaning only with MS-CHAP challenges */
223#endif
224
225extern char *current_option; /* the name of the option being parsed */
226extern int privileged_option; /* set iff the current option came from root */
227extern char *option_source; /* string saying where the option came from */
228
229/*
230 * Values for phase.
231 */
232#define PHASE_DEAD 0
233#define PHASE_INITIALIZE 1
234#define PHASE_SERIALCONN 2
235#define PHASE_DORMANT 3
236#define PHASE_ESTABLISH 4
237#define PHASE_AUTHENTICATE 5
238#define PHASE_CALLBACK 6
239#define PHASE_NETWORK 7
240#define PHASE_RUNNING 8
241#define PHASE_TERMINATE 9
242#define PHASE_DISCONNECT 10
243#define PHASE_HOLDOFF 11
244
245/*
246 * The following struct gives the addresses of procedures to call
247 * for a particular protocol.
248 */
249 struct protent {
250 u_short protocol; /* PPP protocol number */
251 /* Initialization procedure */
252 void (*init)(int unit);
253 /* Process a received packet */
254 void (*input)(int unit, u_char *pkt, int len);
255 /* Process a received protocol-reject */
256 void (*protrej)(int unit);
257 /* Lower layer has come up */
258 void (*lowerup)(int unit);
259 /* Lower layer has gone down */
260 void (*lowerdown)(int unit);
261 /* Open the protocol */
262 void (*open)(int unit);
263 /* Close the protocol */
264 void (*close)(int unit, char *reason);
265 /* Print a packet in readable form */
266 int (*printpkt)(u_char *pkt, int len,
267 void (*printer)(void *, char *, ...),
268 void *arg);
269 /* Process a received data packet */
270 void (*datainput)(int unit, u_char *pkt, int len);
271 bool enabled_flag; /* 0 iff protocol is disabled */
272 char *name; /* Text name of protocol */
273 char *data_name; /* Text name of corresponding data protocol */
274 option_t *options; /* List of command-line options */
275 /* Check requested options, assign defaults */
276 void (*check_options)(void);
277 /* Configure interface for demand-dial */
278 int (*demand_conf)(int unit);
279 /* Say whether to bring up link for this pkt */
280 int (*active_pkt)(u_char *pkt, int len);
281};
282
283/* Table of pointers to supported protocols */
284extern struct protent *protocols[];
285
286/*
287 * Prototypes.
288 */
289
290/* Procedures exported from main.c. */
291void die(int); /* Cleanup and exit */
292void quit(void); /* like die(1) */
293void novm(char *); /* Say we ran out of memory, and die */
294void ppptimeout(void (*func)(void *), void *arg, int t);
295 /* Call func(arg) after t seconds */
296void pppuntimeout(void (*func)(void *), void *arg);
297 /* Cancel call to func(arg) */
298void update_link_stats(int); /* Get stats at link termination */
299void new_phase(int); /* signal start of new phase */
300
301/* Procedures exported from utils.c. */
302void log_packet(u_char *, int, char *, int);
303 /* Format a packet and log it with syslog */
304void print_string(void *, int, void (*) (void *, char *, ...),
305 void *); /* Format a string for output */
306int slprintf(char *, int, char *, ...); /* sprintf++ */
307int vslprintf(char *, int, char *, va_list); /* vsprintf++ */
308size_t strlcpy(char *, const char *, size_t); /* safe strcpy */
309size_t strlcat(char *, const char *, size_t); /* safe strncpy */
310void pppd_dbglog(char *, ...); /* log a debug message */
311void pppd_info(char *, ...); /* log an informational message */
312void pppd_notice(char *, ...); /* log a notice-level message */
313void pppd_warn(char *, ...); /* log a warning message */
314void pppd_error(char *, ...); /* log an error message */
315void pppd_fatal(char *, ...); /* log an error message and die(1) */
316
317#define dbglog pppd_dbglog
318#define info pppd_info
319#define notice pppd_notice
320#define warn pppd_warn
321#define error pppd_error
322#define fatal pppd_fatal
323
324/* Procedures exported from auth.c */
325void link_required(int); /* we are starting to use the link */
326void link_terminated(int); /* we are finished with the link */
327void link_down(int); /* the LCP layer has left the Opened state */
328void link_established(int); /* the link is up; authenticate now */
329void start_networks(void); /* start all the network control protos */
330void np_up(int, int); /* a network protocol has come up */
331void np_down(int, int); /* a network protocol has gone down */
332void np_finished(int, int); /* a network protocol no longer needs link */
333void auth_peer_fail(int, int);
334 /* peer failed to authenticate itself */
335void auth_peer_success(int, int, char *, int);
336 /* peer successfully authenticated itself */
337void auth_withpeer_fail(int, int);
338 /* we failed to authenticate ourselves */
339void auth_withpeer_success(int, int);
340 /* we successfully authenticated ourselves */
341int auth_check_options(void);
342 /* check authentication options supplied */
343void auth_reset(int); /* check what secrets we have */
344int check_passwd(int, char *, int, char *, int, char **);
345 /* Check peer-supplied username/password */
346int get_secret(int, char *, char *, unsigned char *, int *, int);
347 /* get "secret" for chap */
348int auth_ip_addr(int, uint32_t);
349 /* check if IP address is authorized */
350int bad_ip_adrs(uint32_t);
351 /* check if IP address is unreasonable */
352
353/* Procedures exported from demand.c */
354void demand_conf(void); /* config interface(s) for demand-dial */
355void demand_block(void); /* set all NPs to queue up packets */
356void demand_unblock(void); /* set all NPs to pass packets */
357void demand_discard(void); /* set all NPs to discard packets */
358void demand_rexmit(int); /* retransmit saved frames for an NP */
359int loop_chars(unsigned char *, int); /* process chars from loopback */
360int loop_frame(unsigned char *, int); /* should we bring link up? */
361
362/* Procedures exported from sys-*.c */
363void sys_init(void); /* Do system-dependent initialization */
364void sys_cleanup(void); /* Restore system state before exiting */
365int sys_check_options(void); /* Check options specified */
366void sys_close(void); /* Clean up in a child before execing */
367int ppp_available(void); /* Test whether ppp kernel support exists */
368int open_ppp_loopback(void); /* Open loopback for demand-dialling */
369int establish_ppp(int); /* Turn serial port into a ppp interface */
370void restore_loop(void); /* Transfer ppp unit back to loopback */
371void disestablish_ppp(int); /* Restore port to normal operation */
372void clean_check(void); /* Check if line was 8-bit clean */
373void set_up_tty(int, int); /* Set up port's speed, parameters, etc. */
374void restore_tty(int); /* Restore port's original parameters */
375void setdtr(int, int); /* Raise or lower port's DTR line */
376void output(int, u_char *, int); /* Output a PPP packet */
377void wait_input(struct timeval *); /* Wait for input, with timeout */
378
379void ppp_delay(void); /* delay task for a little while */
380int read_packet(u_char *); /* Read PPP packet */
381int get_loop_output(void); /* Read pkts from loopback */
382void ppp_send_config(int, int, uint32_t, int, int);
383 /* Configure i/f transmit parameters */
384void ppp_set_xaccm(int, ext_accm);
385 /* Set extended transmit ACCM */
386void ppp_recv_config(int, int, uint32_t, int, int);
387 /* Configure i/f receive parameters */
388int ccp_test(int, u_char *, int, int);
389 /* Test support for compression scheme */
390void ccp_flags_set(int, int, int);
391 /* Set kernel CCP state */
392int ccp_fatal_error(int); /* Test for fatal decomp error in kernel */
393int get_idle_time(int, struct ppp_idle *);
394 /* Find out how long link has been idle */
395int get_ppp_stats(int, struct pppd_stats *);
396 /* Return link statistics */
397int sifvjcomp(int, int, int, int);
398 /* Configure VJ TCP header compression */
399int sifup(int); /* Configure i/f up for one protocol */
400int sifnpmode(int u, int proto, enum NPmode mode);
401 /* Set mode for handling packets for proto */
402int sifdown(int); /* Configure i/f down for one protocol */
403int sifaddr(int, uint32_t, uint32_t, uint32_t);
404 /* Configure IPv4 addresses for i/f */
405int cifaddr(int, uint32_t, uint32_t);
406 /* Reset i/f IP addresses */
407#ifdef INET6
408int sif6addr(int, eui64_t, eui64_t);
409 /* Configure IPv6 addresses for i/f */
410int cif6addr(int, eui64_t, eui64_t);
411 /* Remove an IPv6 address from i/f */
412#endif
413int sifdefaultroute(int, uint32_t, uint32_t);
414 /* Create default route through i/f */
415int cifdefaultroute(int, uint32_t, uint32_t);
416 /* Delete default route through i/f */
417int sifproxyarp(int, uint32_t);
418 /* Add proxy ARP entry for peer */
419int cifproxyarp(int, uint32_t);
420 /* Delete proxy ARP entry for peer */
421uint32_t GetMask(uint32_t); /* Get appropriate netmask for address */
422int lock(char *); /* Create lock file for device */
423int relock(int); /* Rewrite lock file with new pid */
424void unlock(void); /* Delete previously-created lock file */
425void logwtmp(const char *, const char *, const char *);
426 /* Write entry to wtmp file */
427int get_host_seed(void); /* Get host-dependent random number seed */
428int have_route_to(uint32_t); /* Check if route to addr exists */
429#ifdef PPP_FILTER
430int set_filters(struct bpf_program *pass, struct bpf_program *active);
431 /* Set filter programs in kernel */
432#endif
433#ifdef IPX_CHANGE
434int sipxfaddr(int, unsigned long, unsigned char *);
435int cipxfaddr(int);
436#endif
437
438/* Procedures exported from options.c */
439int parse_args(int argc, char **argv);
440 /* Parse options from arguments given */
441int options_from_file(char *filename, int must_exist, int check_prot,
442 int privileged);
443 /* Parse options from an options file */
444int options_from_user(void); /* Parse options from user's .ppprc */
445int options_for_tty(void); /* Parse options from /etc/ppp/options.tty */
446int options_from_list(struct wordlist *, int privileged);
447 /* Parse options from a wordlist */
448int getword(FILE *f, char *word, int *newlinep, char *filename);
449 /* Read a word from a file */
450void option_error(char *fmt, ...);
451 /* Print an error message about an option */
452int int_option(char *, int *);
453 /* Simplified number_option for decimal ints */
454void add_options(option_t *); /* Add extra options */
455
456/*
457 * This structure is used to store information about certain
458 * options, such as where the option value came from (/etc/ppp/options,
459 * command line, etc.) and whether it came from a privileged source.
460 */
461
462 struct option_info {
463 int priv; /* was value set by sysadmin? */
464 char *source; /* where option came from */
465};
466
467extern struct option_info devnam_info;
468extern struct option_info initializer_info;
469extern struct option_info connect_script_info;
470extern struct option_info disconnect_script_info;
471extern struct option_info welcomer_info;
472extern struct option_info ptycommand_info;
473
474/*
475 * Hooks to enable plugins to change various things.
476 */
477extern int (*new_phase_hook)(int);
478extern int (*idle_time_hook)(struct ppp_idle *);
479extern int (*holdoff_hook)(void);
480extern int (*pap_check_hook)(void);
481extern int (*pap_auth_hook)(char *user, char *passwd/*, char **msgp,
482 struct wordlist **paddrs,
483 struct wordlist **popts*/);
484extern void (*pap_logout_hook)(void);
485extern int (*pap_passwd_hook)(char *user, char *passwd);
486extern void (*ip_up_hook)(void);
487extern void (*ip_down_hook)(void);
488extern void (*auth_linkup_hook)(void);
489extern void (*auth_linkdown_hook)(void);
490
491/*
492 * Inline versions of get/put char/short/long.
493 * Pointer is advanced; we assume that both arguments
494 * are lvalues and will already be in registers.
495 * cp MUST be u_char *.
496 */
497#define GETCHAR(c, cp) { \
498 (c) = *(cp)++; \
499}
500#define PUTCHAR(c, cp) { \
501 *(cp)++ = (u_char) (c); \
502}
503
504
505#define GETSHORT(s, cp) { \
506 (s) = *(cp)++ << 8; \
507 (s) |= *(cp)++; \
508}
509#define PUTSHORT(s, cp) { \
510 *(cp)++ = (u_char) ((s) >> 8); \
511 *(cp)++ = (u_char) (s); \
512}
513
514#define GETLONG(l, cp) { \
515 (l) = *(cp)++ << 8; \
516 (l) |= *(cp)++; (l) <<= 8; \
517 (l) |= *(cp)++; (l) <<= 8; \
518 (l) |= *(cp)++; \
519}
520#define PUTLONG(l, cp) { \
521 *(cp)++ = (u_char) ((l) >> 24); \
522 *(cp)++ = (u_char) ((l) >> 16); \
523 *(cp)++ = (u_char) ((l) >> 8); \
524 *(cp)++ = (u_char) (l); \
525}
526
527#define INCPTR(n, cp) ((cp) += (n))
528#define DECPTR(n, cp) ((cp) -= (n))
529
530/*
531 * System dependent definitions for user-level 4.3BSD UNIX implementation.
532 */
533
534#define TIMEOUT(r, f, t) ppptimeout((r), (f), (t))
535#define UNTIMEOUT(r, f) pppuntimeout((r), (f))
536
537#define BCOPY(s, d, l) memcpy(d, s, l)
538#define BZERO(s, n) memset(s, 0, n)
539
540#define PRINTMSG(m, l) { info("Remote message: %0.*v", l, m); }
541
542/*
543 * MAKEHEADER - Add Header fields to a packet.
544 */
545#define MAKEHEADER(p, t) { \
546 PUTCHAR(PPP_ALLSTATIONS, p); \
547 PUTCHAR(PPP_UI, p); \
548 PUTSHORT(t, p); }
549
550/*
551 * Exit status values.
552 */
553#define EXIT_OK 0
554#define EXIT_FATAL_ERROR 1
555#define EXIT_OPTION_ERROR 2
556#define EXIT_NOT_ROOT 3
557#define EXIT_NO_KERNEL_SUPPORT 4
558#define EXIT_USER_REQUEST 5
559#define EXIT_LOCK_FAILED 6
560#define EXIT_OPEN_FAILED 7
561#define EXIT_CONNECT_FAILED 8
562#define EXIT_PTYCMD_FAILED 9
563#define EXIT_NEGOTIATION_FAILED 10
564#define EXIT_PEER_AUTH_FAILED 11
565#define EXIT_IDLE_TIMEOUT 12
566#define EXIT_CONNECT_TIME 13
567#define EXIT_CALLBACK 14
568#define EXIT_PEER_DEAD 15
569#define EXIT_HANGUP 16
570#define EXIT_LOOPBACK 17
571#define EXIT_INIT_FAILED 18
572#define EXIT_AUTH_TOPEER_FAILED 19
573
574/*
575 * Debug macros. Slightly useful for finding bugs in pppd, not particularly
576 * useful for finding out why your connection isn't being established.
577 */
578
579#ifdef DEBUGALL
580#define DEBUGMAIN 1
581#define DEBUGFSM 1
582#define DEBUGLCP 1
583#define DEBUGIPCP 1
584#define DEBUGIPV6CP 1
585#define DEBUGUPAP 1
586#define DEBUGCHAP 1
587#endif
588#define DEBUGMAIN 1
589#define DEBUGUPAP 1
590#define DEBUGCHAP 1
591
592
593#ifdef DEBUGMAIN
594#define MAINDEBUG(x) if (debug) dbglog x
595#else
596#define MAINDEBUG(x)
597#endif
598
599#ifdef DEBUGSYS
600#define SYSDEBUG(x) if (debug) dbglog x
601#else
602#define SYSDEBUG(x)
603#endif
604
605#ifdef DEBUGFSM
606#define FSMDEBUG(x) if (debug) dbglog x
607#else
608#define FSMDEBUG(x)
609#endif
610
611#ifdef DEBUGLCP
612#define LCPDEBUG(x) if (debug) dbglog x
613#else
614#define LCPDEBUG(x)
615#endif
616
617#ifdef DEBUGIPCP
618#define IPCPDEBUG(x) if (debug) dbglog x
619#else
620#define IPCPDEBUG(x)
621#endif
622
623#ifdef DEBUGIPV6CP
624#define IPV6CPDEBUG(x) if (debug) dbglog x
625#else
626#define IPV6CPDEBUG(x)
627#endif
628
629#ifdef DEBUGUPAP
630#define UPAPDEBUG(x) if (debug) dbglog x
631#else
632#define UPAPDEBUG(x)
633#endif
634
635#ifdef DEBUGCHAP
636#define CHAPDEBUG(x) if (debug) dbglog x
637#else
638#define CHAPDEBUG(x)
639#endif
640
641#ifdef DEBUGIPXCP
642#define IPXCPDEBUG(x) if (debug) dbglog x
643#else
644#define IPXCPDEBUG(x)
645#endif
646
647#ifndef SIGTYPE
648#if defined(sun) || defined(SYSV) || defined(POSIX_SOURCE)
649#define SIGTYPE void
650#else
651#define SIGTYPE int
652#endif /* defined(sun) || defined(SYSV) || defined(POSIX_SOURCE) */
653#endif /* SIGTYPE */
654
655#endif /* __PPP_H__ */
groupnode
Definition: mount_prot.h:53
option_info
Definition: pppd.h:462
option_t
Definition: pppd.h:72
permitted_ip
Definition: pppd.h:113
pppd_stats
Definition: pppd.h:125
protent
Definition: pppd.h:249
wordlist
Definition: pppd.h:131