From 2e76c84b8e19ba02e82ce90370efe9feefd5a4b3 Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Thu, 30 May 2013 16:12:01 +0200 Subject: ring: set_sockopt_tpacket: rename to set_sockopt_tpacket_v2 Rename it to set_sockopt_tpacket_v2 so that we later on can also add other versions and have it clearly stated which one we use. Signed-off-by: Daniel Borkmann --- ring.h | 2 +- ring_rx.c | 2 +- ring_tx.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ring.h b/ring.h index 44738d7..f0edd82 100644 --- a/ring.h +++ b/ring.h @@ -102,7 +102,7 @@ static inline void prepare_polling(int sock, struct pollfd *pfd) pfd->events = POLLIN | POLLRDNORM | POLLERR; } -static inline void set_sockopt_tpacket(int sock) +static inline void set_sockopt_tpacket_v2(int sock) { int ret, val = TPACKET_V2; diff --git a/ring_rx.c b/ring_rx.c index d89d762..27c87d3 100644 --- a/ring_rx.c +++ b/ring_rx.c @@ -60,7 +60,7 @@ void create_rx_ring(int sock, struct ring *ring, int verbose) { int ret; - set_sockopt_tpacket(sock); + set_sockopt_tpacket_v2(sock); retry: ret = setsockopt(sock, SOL_PACKET, PACKET_RX_RING, &ring->layout, sizeof(ring->layout)); diff --git a/ring_tx.c b/ring_tx.c index 2ad1de9..f91f7f7 100644 --- a/ring_tx.c +++ b/ring_tx.c @@ -70,7 +70,7 @@ void create_tx_ring(int sock, struct ring *ring, int verbose) { int ret; - set_sockopt_tpacket(sock); + set_sockopt_tpacket_v2(sock); retry: ret = setsockopt(sock, SOL_PACKET, PACKET_TX_RING, &ring->layout, sizeof(ring->layout)); -- cgit v1.2.3-54-g00ecf