diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2015-11-23 12:52:44 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2015-12-04 21:33:42 +0300 |
commit | 343af33b08ebc83791fd57a1ccdef91ce1ac2a9e (patch) | |
tree | 335dc2f4f2b6dcba678a2b9445fda1ceba80c92c /accel-pppd/net.c | |
parent | 4f511651b830aabc251eee01cb90ace822578053 (diff) | |
download | accel-ppp-343af33b08ebc83791fd57a1ccdef91ce1ac2a9e.tar.gz accel-ppp-343af33b08ebc83791fd57a1ccdef91ce1ac2a9e.zip |
preparation for DPDK intergation (part 5)
Diffstat (limited to 'accel-pppd/net.c')
-rw-r--r-- | accel-pppd/net.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/accel-pppd/net.c b/accel-pppd/net.c index d2683b1..ddf2d2f 100644 --- a/accel-pppd/net.c +++ b/accel-pppd/net.c @@ -1,3 +1,4 @@ +#include <unistd.h> #include <fcntl.h> #include <sys/socket.h> #include <sys/ioctl.h> @@ -30,9 +31,9 @@ static int def_listen(int sock, int backlog) return listen(sock, backlog); } -static ssize_t def_recv(int sock, void *buf, size_t len, int flags) +static ssize_t def_read(int sock, void *buf, size_t len) { - return recv(sock, buf, len, flags); + return read(sock, buf, len); } static ssize_t def_recvfrom(int sock, void *buf, size_t len, int flags, struct sockaddr *src_addr, socklen_t *addrlen) @@ -40,9 +41,9 @@ static ssize_t def_recvfrom(int sock, void *buf, size_t len, int flags, struct s return recvfrom(sock, buf, len, flags, src_addr, addrlen); } -static ssize_t def_send(int sock, const void *buf, size_t len, int flags) +static ssize_t def_write(int sock, const void *buf, size_t len) { - return send(sock, buf, len, flags); + return write(sock, buf, len); } static ssize_t def_sendto(int sock, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen_t addrlen) @@ -80,9 +81,9 @@ __export const struct ap_net def_net = { .connect = def_connect, .bind = def_bind, .listen = def_listen, - .recv = def_recv, + .read = def_read, .recvfrom = def_recvfrom, - .send = def_send, + .write = def_write, .sendto = def_sendto, .set_nonblocking = def_set_nonblocking, .setsockopt = def_setsockopt, |