/* * 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 void ring_tx_setup(struct ring *ring, int sock, size_t size, int ifindex, bool jumbo_support, bool verbose); extern void destroy_tx_ring(int sock, struct ring *ring); 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 */ value='emaclite-cleanup'>emaclite-cleanup net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
AgeCommit message (Expand)AuthorFilesLines
2017-02-10mlxsw: spectrum_router: Add support for route appendIdo Schimmel1-6/+37
2017-02-10mlxsw: spectrum_router: Correctly handle identical routesIdo Schimmel1-178/+403
2017-02-10ipv4: fib: Add events for FIB replace and appendIdo Schimmel2-14/+16
2017-02-10ipv4: fib: Send notification before deleting FIB aliasIdo Schimmel1-7/+7
2017-02-10ipv4: fib: Send deletion notification with actual FIB alias typeIdo Schimmel1-2/+2
2017-02-10ipv4: fib: Only flush FIB aliases belonging to currently flushed tableIdo Schimmel1-1/+2
2017-02-09Merge branch 'openvswitch-Conntrack-integration-improvements'David S. Miller8-113/+420
2017-02-09openvswitch: Pack struct sw_flow_key.Jarno Rajahalme4-34/+39
2017-02-09openvswitch: Add force commit.Jarno Rajahalme2-2/+29
2017-02-09openvswitch: Add original direction conntrack tuple to sw_flow_key.Jarno Rajahalme8-47/+246
2017-02-09openvswitch: Inherit master's labels.Jarno Rajahalme1-14/+31
2017-02-09openvswitch: Refactor labels initialization.Jarno Rajahalme1-42/+62
2017-02-09openvswitch: Simplify labels length logic.Jarno Rajahalme1-11/+9
2017-02-09openvswitch: Unionize ovs_key_ct_label with a u32 array.Jarno Rajahalme2-9/+14
2017-02-09openvswitch: Do not trigger events for unconfirmed connections.Jarno Rajahalme1-6/+22
2017-02-09openvswitch: Use inverted tuple in ovs_ct_find_existing() if NATted.Jarno Rajahalme1-2/+22
2017-02-09openvswitch: Fix comments for skb->_nfctJarno Rajahalme1-7/+7
2017-02-09Merge branch 'ena-bug-fixes'David S. Miller