summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl/ipoe/ipoe.h
diff options
context:
space:
mode:
authorKozlov Dmitry <xeb@mail.ru>2012-06-22 18:11:19 +0400
committerKozlov Dmitry <xeb@mail.ru>2012-06-22 18:11:19 +0400
commit4080b4e1ffdb1482ab26557eb46a8121d93ac584 (patch)
tree0732197c98f911a18c024f7b91ec1031de34e10b /accel-pppd/ctrl/ipoe/ipoe.h
parentb57c6b9e838fa7fa39e81164912d518b43de3723 (diff)
downloadaccel-ppp-4080b4e1ffdb1482ab26557eb46a8121d93ac584.tar.gz
accel-ppp-4080b4e1ffdb1482ab26557eb46a8121d93ac584.zip
initial ipoe implementation
Diffstat (limited to 'accel-pppd/ctrl/ipoe/ipoe.h')
-rw-r--r--accel-pppd/ctrl/ipoe/ipoe.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/accel-pppd/ctrl/ipoe/ipoe.h b/accel-pppd/ctrl/ipoe/ipoe.h
new file mode 100644
index 00000000..adbc5cff
--- /dev/null
+++ b/accel-pppd/ctrl/ipoe/ipoe.h
@@ -0,0 +1,54 @@
+#ifndef __IPOE_H
+#define __IPOE_H
+
+#include <stdint.h>
+#include <pthread.h>
+
+#include "triton.h"
+#include "ap_session.h"
+#include "dhcpv4.h"
+
+struct ipoe_serv
+{
+ struct list_head entry;
+ struct triton_context_t ctx;
+ char *ifname;
+ int ifindex;
+ int active;
+ int opt_single;
+ int opt_dhcpv4;
+ struct list_head sessions;
+ struct dhcpv4_serv *dhcpv4;
+ pthread_mutex_t lock;
+};
+
+struct dhcp_opt
+{
+ uint8_t len;
+ uint8_t data[0];
+};
+
+struct ipoe_session
+{
+ struct list_head entry;
+ struct triton_context_t ctx;
+ struct triton_timer_t timer;
+ struct ipoe_serv *serv;
+ struct ap_ctrl ctrl;
+ struct ap_session ses;
+ uint8_t hwaddr[6];
+ struct dhcp_opt *client_id;
+ struct dhcp_opt *agent_circuit_id;
+ struct dhcp_opt *agent_remote_id;
+ uint32_t xid;
+ uint32_t giaddr;
+ uint8_t *data;
+ struct dhcpv4_packet *dhcpv4_request;
+};
+
+#ifdef USE_LUA
+int ipoe_lua_set_username(struct ipoe_session *, const char *func);
+#endif
+
+#endif
+