diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2016-03-19 20:17:02 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2016-03-19 20:17:02 +0300 |
commit | 64e5c04c0d9aa4b46235c5f0da45d22abf9cce1c (patch) | |
tree | c0e09acd376ca98f5024528c360f66408bb2da32 /accel-pppd/ctrl/ipoe/ipoe.h | |
parent | 39c7832eac5f3fe6f58bd188df23e677be8ee9bd (diff) | |
download | accel-ppp-64e5c04c0d9aa4b46235c5f0da45d22abf9cce1c.tar.gz accel-ppp-64e5c04c0d9aa4b46235c5f0da45d22abf9cce1c.zip |
ipoe: send arp reply for sessions started by arp request
Diffstat (limited to 'accel-pppd/ctrl/ipoe/ipoe.h')
-rw-r--r-- | accel-pppd/ctrl/ipoe/ipoe.h | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/accel-pppd/ctrl/ipoe/ipoe.h b/accel-pppd/ctrl/ipoe/ipoe.h index 52b3c8da..c8b03b9c 100644 --- a/accel-pppd/ctrl/ipoe/ipoe.h +++ b/accel-pppd/ctrl/ipoe/ipoe.h @@ -18,6 +18,18 @@ #define ETH_ALEN 6 #endif +struct _arphdr { + __be16 ar_hrd; + __be16 ar_pro; + __u8 ar_hln; + __u8 ar_pln; + __be16 ar_op; + __u8 ar_sha[ETH_ALEN]; + __be32 ar_spa; + __u8 ar_tha[ETH_ALEN]; + __be32 ar_tpa; +} __packed; + struct ipoe_serv { struct list_head entry; struct triton_context_t ctx; @@ -82,6 +94,7 @@ struct ipoe_session { uint8_t *data; struct dhcpv4_packet *dhcpv4_request; struct dhcpv4_packet *dhcpv4_relay_reply; + struct _arphdr *arph; int relay_retransmit; int ifindex; char *username; @@ -106,18 +119,6 @@ struct ipoe_session_info { uint32_t peer_addr; }; -struct _arphdr { - __be16 ar_hrd; - __be16 ar_pro; - __u8 ar_hln; - __u8 ar_pln; - __be16 ar_op; - __u8 ar_sha[ETH_ALEN]; - __be32 ar_spa; - __u8 ar_tha[ETH_ALEN]; - __be32 ar_tpa; -} __packed; - #ifdef USE_LUA char *ipoe_lua_get_username(struct ipoe_session *, const char *func); int ipoe_lua_make_vlan_name(const char *func, const char *parent, int svid, int cvid, char *name); @@ -146,6 +147,7 @@ void ipoe_nl_del_net(uint32_t addr); void *arpd_start(struct ipoe_serv *ipoe); void arpd_stop(void *arp); +void arp_send(int ifindex, struct _arphdr *arph); #endif |