/* * netsniff-ng - the packet sniffing beast * Copyright 2009, 2010 Daniel Borkmann. * Subject to the GPL, version 2. */ #ifndef RX_RING_H #define RX_RING_H #include "ring.h" #include "built_in.h" extern void destroy_rx_ring(int sock, struct ring *ring); extern void create_rx_ring(int sock, struct ring *ring, int verbose); extern void mmap_rx_ring(int sock, struct ring *ring); extern void alloc_rx_ring_frames(struct ring *ring); extern void bind_rx_ring(int sock, struct ring *ring, int ifindex); extern void setup_rx_ring_layout(int sock, struct ring *ring, unsigned int size, bool jumbo_support, bool v3); static inline int user_may_pull_from_rx(struct tpacket2_hdr *hdr) { return ((hdr->tp_status & TP_STATUS_USER) == TP_STATUS_USER); } static inline void kernel_may_pull_from_rx(struct tpacket2_hdr *hdr) { hdr->tp_status = TP_STATUS_KERNEL; } static inline void kernel_may_pull_from_rx_block(struct block_desc *pbd) { pbd->h1.block_status = TP_STATUS_KERNEL; } #endif /* RX_RING_H */ '/> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2016-09-17 10:49:11 +0100
committerDavid Howells <dhowells@redhat.com>2016-09-17 10:50:48 +0100
commit4b22457c06a3a950e14938c486283ad0f308c13d (patch)
tree82dca438a7cf5c9485781bea08e0935198e5e31a
parentfabf9201806255d70386d8bc9f6a2942c0940da2 (diff)
rxrpc: Move the check of rx_pkt_offset from rxrpc_locate_data() to caller
Move the check of rx_pkt_offset from rxrpc_locate_data() to the caller, rxrpc_recvmsg_data(), so that it's more clear what's going on there. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat