+typedef struct
+{
+ int debug; // debugging level
+ time_t start_time; // time when l2tpns was started
+ char bandwidth[256]; // current bandwidth
+ char pid_file[256]; // file to write PID to on startup
+ int wrote_pid;
+ clockt current_time; // 1/10ths of a second since the process started.
+ // means that we can only run a given process
+ // for 13 years without re-starting!
+
+ char config_file[128];
+ int reload_config; // flag to re-read config (set by cli)
+ int multi_read_count; // amount of packets to read per fd in processing loop
+
+ char tundevice[IFNAMSIZ]; // tun device name
+ char log_filename[128];
+
+ char l2tp_secret[64]; // L2TP shared secret
+ int l2tp_mtu; // MTU of interface used for L2TP
+
+ char random_device[256]; // random device path, defaults to RANDOMDEVICE
+
+ int ppp_restart_time; // timeout for PPP restart
+ int ppp_max_configure; // max lcp configure requests to send
+ int ppp_max_failure; // max lcp configure naks to send
+
+ char radiussecret[64];
+ int radius_accounting;
+ int radius_interim;
+ in_addr_t radiusserver[MAXRADSERVER]; // radius servers
+ uint16_t radiusport[MAXRADSERVER]; // radius base ports
+ uint8_t numradiusservers; // radius server count
+
+ uint16_t radius_dae_port; // port for radius DAE
+ uint16_t radius_bind_min; // port range for udp sockets used to send/recv radius packets
+ uint16_t radius_bind_max;
+
+ char radius_authtypes_s[32]; // list of valid authentication types (chap, pap) in order of preference
+ int radius_authtypes;
+ int radius_authprefer;
+
+ int allow_duplicate_users; // allow multiple logins with the same username
+ int kill_timedout_sessions; // kill authenticated sessions with "session_timeout == 0"
+
+ in_addr_t default_dns1, default_dns2;
+
+ unsigned long rl_rate; // default throttle rate
+ int num_tbfs; // number of throttle buckets
+
+ char accounting_dir[128];
+ in_addr_t bind_address;
+ in_addr_t peer_address;
+ int send_garp; // Set to true to garp for vip address on startup
+
+ int dump_speed;
+ char plugins[64][MAXPLUGINS];
+ char old_plugins[64][MAXPLUGINS];
+
+ int next_tbf; // Next HTB id available to use
+ int scheduler_fifo; // If the system has multiple CPUs, use FIFO scheduling
+ // policy for this process.
+ int lock_pages; // Lock pages into memory.
+ int icmp_rate; // Max number of ICMP unreachable per second to send
+ int max_packets; // DoS prevention: per session limit of packets/0.1s
+ char epdis_addr[20]; // MP Endpoint Discriminator address
+
+ in_addr_t cluster_address; // Multicast address of cluster.
+ // Send to this address to have everyone hear.
+ char cluster_interface[64]; // Which interface to listen for multicast on.
+ int cluster_iam_master; // Are we the cluster master???
+ int cluster_iam_uptodate; // Set if we've got a full set of state from the master.
+ in_addr_t cluster_master_address; // The network address of the cluster master.
+ // Zero if i am the cluster master.
+ int cluster_seq_number; // Sequence number of the next heartbeat we'll send out
+ // (or the seq number we're next expecting if we're a slave).
+ int cluster_undefined_sessions; // How many sessions we're yet to receive from the master.
+ int cluster_undefined_bundles; // How many bundles we're yet to receive from the master.
+ int cluster_undefined_tunnels; // How many tunnels we're yet to receive from the master.
+ int cluster_highest_sessionid;
+ int cluster_highest_bundleid;
+ int cluster_highest_tunnelid;
+ clockt cluster_last_hb; // Last time we saw a heartbeat from the master.
+ int cluster_last_hb_ver; // Heartbeat version last seen from master
+ int cluster_num_changes; // Number of changes queued.
+
+ int cluster_mcast_ttl; // TTL for multicast packets
+ int cluster_hb_interval; // How often to send a heartbeat.
+ int cluster_hb_timeout; // How many missed heartbeats trigger an election.
+ uint64_t cluster_table_version; // # state changes processed by cluster
+
+ struct in6_addr ipv6_prefix; // Our IPv6 network pool.
+
+
+ int cluster_master_min_adv; // Master advertises routes while the number of up to date
+ // slaves is less than this value.
+ in_addr_t cli_bind_address; // bind address for CLI
+ char hostname[MAXHOSTNAME]; // hostname (overridden by -h on command line)
+ // Guest change
+ char guest_user[MAXUSER]; // Guest account username
+
+#ifdef BGP
+#define BGP_NUM_PEERS 2
+ uint16_t as_number;
+ struct {
+ char name[64];
+ uint16_t as;
+ int keepalive;
+ int hold;
+ struct in_addr update_source;
+ } neighbour[BGP_NUM_PEERS];
+ in_addr_t nexthop_address;
+ struct in6_addr nexthop6_address;
+#endif