📄 ppp_port.h_h
字号:
/* ppp_port.h
Copyright 1997-2001 by InterNiche Technologies Inc. All rights reserved.
InterNiche PPP layer's per-port definitions. The portions of the PPP
stack which may need to be modified for new ports are placed in
this file. For most ports, this is the only .h file which should
need changing.
*/
#ifndef _PPP_PORT_H
#define _PPP_PORT_H 1
#include "ipport.h" /* NetPort IP Stack definitions */
#include "libport.h" /* misclib option switches */
#include "in_utils.h" /* for resolving references to GEN_IO */
#ifdef IN_MENUS
#include "menu.h"
#endif /* IN_MENUS */
#ifdef USE_PPP /* whole file can be ifdeffed out */
#define __STDC__ 1 /* standard ansi C */
/* debug switches */
#define DEBUGFSM 1 /* ConPrintf from the FSM layer */
#define DEBUGLCP 1 /* ConPrintf from the LCP layer */
#define DEBUGIPCP 1 /* ConPrintf from the IPCP layer */
#define DEBUGCHAP 1 /* ConPrintf from the CHAP layer */
#define DEBUGUPAP 1 /* ConPrintf from the UPAP layer */
#define MAXNAMELEN 32 /* max length of hostname or name for auth */
#define MAXSECRETLEN 32 /* max length of password or secret */
#define MAX_DUMP_BYTES 1536 /* MAX bytes when ConPrintf-dumping pkt */
#define GetTickCount() (cticks)
extern int do_dhcp_client; /* TRUE if we should do DHCP over PPP */
extern char * hostname; /* name of this system, for CHAP auth. */
extern int dhc_discover(int iface); /* send DHCP discovery */
extern unsigned NDEBUG; /* debug printing bit mask in ..\inet */
extern int PPPDEBUG; /* Bitmask of PPP debug options */
#define PPPD_FILE 0x01 /* Send debug printfs to log file */
#define PPPD_CONS 0x02 /* send debug printfs to console */
void ppp_output(int unit, u_char * data, int len);
#ifndef _PPP_PORT_C
void ConPrintf(const char * format, ...);
#else
/*
void ConPrintf();
*/
#endif /* _PPP_PORT_C */
/* the PPP alloc routines - each gets one size.
* For most demos, map all to NetPort alloc, free
*/
#define MPPP_ALLOC(size) (M_PPP)npalloc(size)
#define MPPP_FREE(ptr) npfree(ptr)
#ifdef INCLUDE_NVPARMS
struct ppp_nvparam
{
/* PPP options: */
int ppp_ConsoleLog; /* bool - Log Modem & PPP events to console */
int ppp_FileLog; /* bool - Log Modem & PPP events to file */
unshort ppp_keepalive; /* seconds between PPP echos, 0=disable */
unshort ppp_client_tmo; /* timeout for connects as client */
#ifdef PPP_VJC
int ppp_request_vj; /* bool - request that the other side do VJ compression */
#endif /* PPP_VJC */
#ifdef CHAP_SUPPORT /* from ppp_port.h */
char secret[MAX_NVSTRING]; /* secret for CHAP/MD5 hashing */
int require_chap; /* bool - require CHAP from PPP connections */
#endif /* CHAP_SUPPORT */
#ifdef PAP_SUPPORT
int require_pap;
#endif /* PAP_SUPPORT */
char username[MAX_NVSTRING];
char password[MAX_NVSTRING];
unshort line_tmo; /* idle modem line timeout, 0=infinite */
char loginfile[MAX_NVSTRING]; /* path/name of file with login script */
char logservefile[MAX_NVSTRING]; /* login server script */
};
extern struct ppp_nvparam ppp_nvparms;
#endif /* INCLUDE_NVPARMS */
#ifdef IN_MENUS
extern struct menu_op pppmenu[];
#endif /* IN_MENUS */
#ifdef INCLUDE_NVPARMS
extern struct nvparm_info ppp_nvformats[];
extern struct nvparm_format ppp_format;
#endif /* INCLUDE_NVPARMS */
#endif /* USE_PPP */
#endif /* _PPP_PORT_H */
/* end of file ppp_port.h */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -