/* * netsniff-ng - the packet sniffing beast * Copyright 2009, 2010 Daniel Borkmann. * Subject to the GPL, version 2. */ #ifndef TX_RING_H #define TX_RING_H #include #include "ring.h" /* Give userland 10 us time to push packets to the ring */ #define TX_KERNEL_PULL_INT 10 extern void destroy_tx_ring(int sock, struct ring *ring); extern void create_tx_ring(int sock, struct ring *ring, bool verbose); extern void mmap_tx_ring(int sock, struct ring *ring); extern void alloc_tx_ring_frames(int sock, struct ring *ring); extern void bind_tx_ring(int sock, struct ring *ring, int ifindex); extern void setup_tx_ring_layout(int sock, struct ring *ring, size_t size, bool jumbo_support); extern void set_packet_loss_discard(int sock); static inline int user_may_pull_from_tx(struct tpacket2_hdr *hdr) { return !(hdr->tp_status & (TP_STATUS_SEND_REQUEST | TP_STATUS_SENDING)); } static inline void kernel_may_pull_from_tx(struct tpacket2_hdr *hdr) { hdr->tp_status = TP_STATUS_SEND_REQUEST; } static inline int pull_and_flush_tx_ring(int sock) { return sendto(sock, NULL, 0, MSG_DONTWAIT, NULL, 0); } static inline int pull_and_flush_tx_ring_wait(int sock) { return sendto(sock, NULL, 0, 0, NULL, 0); } #endif /* TX_RING_H */ -back'>packet-loop-back net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaya Erez <qca_merez@qca.qualcomm.com>2017-01-20 13:49:53 +0200
committerKalle Valo <kvalo@qca.qualcomm.com>2017-01-27 19:50:03 +0200
commit78484c44e4b305b23cbfcfb9257ed96c8753e86d (patch)
treea0ec3ec16b2b1e636b2ce56edb74dde133e861f6
parentc3bfea05a6fdecee03c7cf08f5bfee6aa0645cee (diff)
wil6210: convert symbolic permissions to octal permissions
Symbolic permissions are no longer recommended. This patch changes the symbolic permissions in wil6210 driver to octal permissions. Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>