From bf84f9763ca3b6f018774b2b1664e838e119b028 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Sun, 22 Nov 2015 00:39:20 +0300 Subject: preparation for DPDK intergation --- accel-pppd/include/ap_session.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'accel-pppd/include') diff --git a/accel-pppd/include/ap_session.h b/accel-pppd/include/ap_session.h index 8bfe4cd8..aea2fa66 100644 --- a/accel-pppd/include/ap_session.h +++ b/accel-pppd/include/ap_session.h @@ -36,9 +36,17 @@ struct ap_session; struct backup_data; struct rtnl_link_stats; +struct sockaddr; + +struct ap_net { + int (*pppox_socket)(int proto); + int (*pppox_connect)(int sock, const struct sockaddr *, socklen_t len); + int (*ppp_open)(); + int (*ppp_ioctl)(int fd, unsigned long request, void *arg); + int (*sock_ioctl)(unsigned long request, void *arg); +}; -struct ap_ctrl -{ +struct ap_ctrl { struct triton_context_t *ctx; int type; const char *name; @@ -128,6 +136,9 @@ extern int sock6_fd; // internet socket for ioctls extern int urandom_fd; extern struct ap_session_stat ap_session_stat; +extern __thread const struct ap_net *net; +extern const struct ap_net def_net; + void ap_session_init(struct ap_session *ses); void ap_session_set_ifindex(struct ap_session *ses); int ap_session_starting(struct ap_session *ses); -- cgit v1.2.3