X-Git-Url: http://git.sameswireless.fr/l2tpns.git/blobdiff_plain/a478f1c2a22514a4de4521ffe3ed93d3c2c427b8..56223c36f99ab1c106ee503976b34c92bb6d9088:/l2tpns.h?ds=inline diff --git a/l2tpns.h b/l2tpns.h index 4fe9a5c..ee355b0 100644 --- a/l2tpns.h +++ b/l2tpns.h @@ -25,7 +25,6 @@ #define MAXSESSION 60000 // could be up to 65535 #define MAXTBFS 6000 // Maximum token bucket filters. Might need up to 2 * session. #define MAXSESSINGRP 12 // Maximum number of member links in grouped session -#define MAXGRPINSESS 12 // Maximum number of member links in session group #define MAXGROUPE 300 // could be up to 65535, Maximum number of grouped session #define MAXROUTEINGRP 15 // max static routes per group @@ -336,25 +335,27 @@ typedef struct struct in6_addr ipv6route; // Static IPv6 route sessionidt forwardtosession; // LNS id_session to forward uint8_t src_hwaddr[ETH_ALEN]; // MAC addr source (for pppoe sessions 6 bytes) - uint32_t coutgrp_delta; + char reserved[4]; // Space to expand structure without changing HB_VERSION } sessiont; typedef struct { uint32_t tx_rate; + uint32_t prev_coutgrp; sessionidt sid; uint8_t weight; } -groupsessionidt; +groupsesslistt; typedef struct { + int state; // current state (groupestate enum) uint32_t time_changed; groupidt prev; sessionidt smax; sessionidt smin; - groupsessionidt sesslist[MAXSESSINGRP]; + groupsesslistt sesslist[MAXSESSINGRP]; routet route[MAXROUTEINGRP]; // static routes uint8_t nbroutesgrp; uint8_t nbsession; @@ -549,6 +550,13 @@ enum BUNDLEUNDEF, // Undefined }; +enum +{ + GROUPEFREE, // Not in use + GROUPEOPEN, // Active bundle + GROUPEUNDEF // Undefined +}; + enum { NULLCLASS = 0, //End Point Discriminator classes @@ -728,6 +736,7 @@ typedef struct int num_tbfs; // number of throttle buckets char accounting_dir[128]; + int account_all_origin; // Accouting all origin (LAC data + Remote LNS Data + PPPOE data) in_addr_t bind_address; in_addr_t peer_address; int send_garp; // Set to true to garp for vip address on startup @@ -756,8 +765,10 @@ typedef struct 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_undefined_groupes; // How many groupes we're yet to receive from the master. int cluster_highest_sessionid; int cluster_highest_bundleid; + int cluster_highest_groupeid; 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 @@ -805,6 +816,7 @@ typedef struct char pppoe_service_name[64]; // pppoe service name char pppoe_ac_name[64]; uint8_t pppoe_hwaddr[ETH_ALEN]; // MAC addr of interface pppoe to bind + int pppoe_only_equal_svc_name; // Accept only PADI with service-name equal to server int disable_sending_hello; // Disable l2tp sending HELLO message for Apple compatibility. int disable_no_spoof; // Disable no spoof (permit load balancing client --> internet) int nbudpfd; // number UDP file handle @@ -996,6 +1008,7 @@ groupidt grp_groupbyip(in_addr_t ip); void grp_setgrouproute(groupidt g, int add); void grp_time_changed(void); void grp_removesession(groupidt g, sessionidt s); +int grp_cluster_load_groupe(groupidt g, groupsesst *new); #undef LOG #undef LOG_HEX @@ -1032,7 +1045,7 @@ extern sessiont *session; extern sessionlocalt *sess_local; extern ippoolt *ip_address_pool; extern groupsesst *grpsession; -groupidt gnextgrpid; +extern groupidt gnextgrpid; #define sessionfree (session[0].next)