diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2013-06-22 21:53:06 +0400 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2013-06-22 21:53:06 +0400 |
commit | b2d6202a84a377531a7d16a2a87b6e85b782c051 (patch) | |
tree | e0fc05297b7c7b7ca70629739ac09a38f573ca22 /accel-pppd/ctrl/ipoe/ipoe.h | |
parent | 81fce25dbbc103a0e0ebdd4ff586c00b0292d05e (diff) | |
download | accel-ppp-xebd-b2d6202a84a377531a7d16a2a87b6e85b782c051.tar.gz accel-ppp-xebd-b2d6202a84a377531a7d16a2a87b6e85b782c051.zip |
ipoe: introduced proxy-arp option
Diffstat (limited to 'accel-pppd/ctrl/ipoe/ipoe.h')
-rw-r--r-- | accel-pppd/ctrl/ipoe/ipoe.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/accel-pppd/ctrl/ipoe/ipoe.h b/accel-pppd/ctrl/ipoe/ipoe.h index 1dd2db9..7385598 100644 --- a/accel-pppd/ctrl/ipoe/ipoe.h +++ b/accel-pppd/ctrl/ipoe/ipoe.h @@ -9,26 +9,35 @@ #include "ipdb.h" #include "dhcpv4.h" +#ifndef ETH_ALEN +#define ETH_ALEN 6 +#endif + +struct arp_serv; + struct ipoe_serv { struct list_head entry; struct triton_context_t ctx; char *ifname; int ifindex; - int active; + uint8_t hwaddr[ETH_ALEN]; struct list_head sessions; struct list_head addr_list; struct dhcpv4_serv *dhcpv4; struct dhcpv4_relay *dhcpv4_relay; + struct arp_serv *arp; pthread_mutex_t lock; int opt_mode; uint32_t opt_src; + int opt_arp; int opt_shared:1; int opt_dhcpv4:1; int opt_up:1; int opt_ifcfg:1; int opt_nat:1; int need_close:1; + int active:1; }; struct ipoe_session @@ -40,7 +49,7 @@ struct ipoe_session struct dhcpv4_serv *dhcpv4; struct ap_ctrl ctrl; struct ap_session ses; - uint8_t hwaddr[6]; + uint8_t hwaddr[ETH_ALEN]; struct dhcpv4_option *client_id; struct dhcpv4_option *relay_agent; uint8_t *agent_circuit_id; @@ -74,6 +83,11 @@ struct ipoe_session_info uint32_t peer_addr; }; +struct arp_serv { + struct triton_md_handler_t h; + struct ipoe_serv *ipoe; +}; + #ifdef USE_LUA int ipoe_lua_set_username(struct ipoe_session *, const char *func); #endif @@ -95,5 +109,7 @@ void ipoe_nl_delete(int ifindex); int ipoe_nl_modify(int ifindex, uint32_t peer_addr, uint32_t addr, const char *ifname, uint8_t *hwaddr); void ipoe_nl_get_sessions(struct list_head *list); +struct arp_serv *arpd_start(struct ipoe_serv *ipoe); +void arpd_stop(struct arp_serv *arp); #endif |