diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2015-11-23 00:52:22 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2015-12-04 21:30:40 +0300 |
commit | 86b151891a2f11c863e9d31e132deb8eab2cf30f (patch) | |
tree | 761ce676c0a563a588bb042677845fe398f34bde /accel-pppd/include | |
parent | 2dbcda2be5cbc221a827d0559da53aa4333a6d56 (diff) | |
download | accel-ppp-86b151891a2f11c863e9d31e132deb8eab2cf30f.tar.gz accel-ppp-86b151891a2f11c863e9d31e132deb8eab2cf30f.zip |
preparation for DPDK intergation (part 4)
Diffstat (limited to 'accel-pppd/include')
-rw-r--r-- | accel-pppd/include/ap_net.h | 20 | ||||
-rw-r--r-- | accel-pppd/include/ap_session.h | 18 |
2 files changed, 22 insertions, 16 deletions
diff --git a/accel-pppd/include/ap_net.h b/accel-pppd/include/ap_net.h new file mode 100644 index 00000000..8ed8536d --- /dev/null +++ b/accel-pppd/include/ap_net.h @@ -0,0 +1,20 @@ +#ifndef __AP_NET_H +#define __AP_NET_H + +struct ap_net { + int (*socket)(int domain, int type, int proto); + int (*connect)(int sock, const struct sockaddr *, socklen_t len); + int (*bind)(int sock, const struct sockaddr *, socklen_t len); + int (*listen)(int sock, int backlog); + ssize_t (*recv)(int sock, void *buf, size_t len, int flags); + ssize_t (*recvfrom)(int sock, void *buf, size_t len, int flags, struct sockaddr *src_addr, socklen_t *addrlen); + ssize_t (*send)(int sock, const void *buf, size_t len, int flags); + ssize_t (*sendto)(int sock, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen_t addrlen); + int (*set_nonblocking)(int sock, int f); + int (*setsockopt)(int sockfd, int level, int optname, const void *optval, socklen_t optlen); + int (*ppp_open)(); + int (*ppp_ioctl)(int fd, unsigned long request, void *arg); + int (*sock_ioctl)(unsigned long request, void *arg); +}; + +#endif diff --git a/accel-pppd/include/ap_session.h b/accel-pppd/include/ap_session.h index f2298330..7a8db12b 100644 --- a/accel-pppd/include/ap_session.h +++ b/accel-pppd/include/ap_session.h @@ -1,6 +1,8 @@ #ifndef __AP_SESSION_H__ #define __AP_SESSION_H__ +#include "ap_net.h" + //#define AP_SESSIONID_LEN 16 #define AP_IFNAME_LEN 16 @@ -36,22 +38,6 @@ struct ap_session; struct backup_data; struct rtnl_link_stats; -struct sockaddr; - -struct ap_net { - int (*socket)(int domain, int type, int proto); - int (*connect)(int sock, const struct sockaddr *, socklen_t len); - int (*bind)(int sock, const struct sockaddr *, socklen_t len); - int (*listen)(int sock, int backlog); - ssize_t (*recv)(int sock, void *buf, size_t len, int flags); - ssize_t (*recvfrom)(int sock, void *buf, size_t len, int flags, struct sockaddr *src_addr, socklen_t *addrlen); - ssize_t (*send)(int sock, const void *buf, size_t len, int flags); - ssize_t (*sendto)(int sock, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen_t addrlen); - int (*set_nonblocking)(int sock, int f); - 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 triton_context_t *ctx; |