Preprocessor definitions
#define _FILE_H
#define STRLEN 80
#define CONTEXT_GLOBAL 1
#define CONTEXT_LNS 2
#define CONTEXT_LAC 3
#define CONTEXT_DEFAULT 256
#define SENSE_ALLOW 1
#define SENSE_DENY 0
#define DEFAULT_AUTH_FILE "/etc/l2tp/l2tp-secrets"
#define ALT_DEFAULT_AUTH_FILE "/etc/l2tpd/l2tp-secrets"
#define CONFIG_FILE "/etc/l2tp/l2tpd.conf"
#define ALT_CONFIG_FILE "/etc/l2tpd/l2tpd.conf"
struct keyword
| struct keyword |
|
| { |
|
| char* keyword; |
|
| int (*handler)(char* word,char* value,int context,void* item); |
|
| } |
|
struct iprange
| struct iprange |
|
| { |
|
| unsigned int start; |
|
| unsigned int end; |
|
| int sense; |
|
| struct iprange* next; |
|
| } |
|
struct host
| struct host |
|
| { |
|
| char hostname[80]; |
|
| int port; |
|
| struct host* next; |
|
| } |
|
struct lns
| struct lns |
|
| { |
|
| struct lns* next; |
|
| int exclusive; |
|
| int active; |
|
| unsigned int localaddr; |
|
| int tun_rws; |
|
| int call_rws; |
|
| int hbit; |
|
| int lbit; |
|
| int challenge; |
|
| int authpeer; |
|
| int authself; |
|
| char authname[80]; |
|
| char peername[80]; |
|
| char hostname[80]; |
|
| char entname[80]; |
|
| struct iprange* lacs; |
|
| struct iprange* range; |
|
| int passwdauth; |
|
| int pap_require; |
|
| int chap_require; |
|
| int pap_refuse; |
|
| int chap_refuse; |
|
| int idle; |
|
| unsigned int pridns; |
|
| unsigned int secdns; |
|
| unsigned int priwins; |
|
| unsigned int secwins; |
|
| int proxyarp; |
|
| int proxyauth; |
|
| int debug; |
|
| char pppoptfile[80]; |
|
| struct tunnel* t; |
|
| } |
|
struct lac
| struct lac |
|
| { |
|
| struct lac* next; |
|
| struct host* lns; |
|
| struct schedule_entry* rsched; |
|
| int tun_rws; |
|
| int call_rws; |
|
| int active; |
|
| int hbit; |
|
| int lbit; |
|
| int challenge; |
|
| unsigned int localaddr; |
|
| unsigned int remoteaddr; |
|
| char authname[80]; |
|
| char peername[80]; |
|
| char hostname[80]; |
|
| char entname[80]; |
|
| int authpeer; |
|
| int authself; |
|
| int pap_require; |
|
| int chap_require; |
|
| int pap_refuse; |
|
| int chap_refuse; |
|
| int idle; |
|
| int autodial; |
|
| int defaultroute; |
|
| int redial; |
|
| int rmax; |
|
| int rtries; |
|
| int rtimeout; |
|
| char pppoptfile[80]; |
|
| int debug; |
|
| struct tunnel* t; |
|
| struct call* c; |
|
| } |
|
struct global
| struct global |
|
| { |
|
| int port; |
|
| char authfile[80]; |
|
| int accesscontrol; |
|
| int forceuserspace; |
|
| } |
|
External Variables
gconfig
extern struct global gconfig
lnslist
extern struct lns* lnslist
laclist
extern struct lac* laclist
deflns
extern struct lns* deflns
deflac
extern struct lac* deflac