include/net/netfilter/nf_reject.h
Source file repositories/reference/linux-study-clean/include/net/netfilter/nf_reject.h
File Facts
- System
- Linux kernel
- Corpus path
include/net/netfilter/nf_reject.h- Extension
.h- Size
- 904 bytes
- Lines
- 43
- Domain
- Networking Core
- Bucket
- Sockets, Protocols, Packet Path, And Network Policy
- Inferred role
- Networking Core: implementation source
- Status
- source implementation candidate
Why This File Exists
Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.huapi/linux/in.h
Detected Declarations
function nf_reject_verify_csum
Annotated Snippet
#ifndef _NF_REJECT_H
#define _NF_REJECT_H
#include <linux/types.h>
#include <uapi/linux/in.h>
static inline bool nf_reject_verify_csum(struct sk_buff *skb, int dataoff,
__u8 proto)
{
/* Skip protocols that don't use 16-bit one's complement checksum
* of the entire payload.
*/
switch (proto) {
/* Protocols with optional checksums. */
case IPPROTO_UDP: {
const struct udphdr *udp_hdr;
struct udphdr _udp_hdr;
udp_hdr = skb_header_pointer(skb, dataoff,
sizeof(_udp_hdr),
&_udp_hdr);
if (!udp_hdr || udp_hdr->check)
return true;
return false;
}
case IPPROTO_GRE:
/* Protocols with other integrity checks. */
case IPPROTO_AH:
case IPPROTO_ESP:
case IPPROTO_SCTP:
/* Protocols with partial checksums. */
case IPPROTO_UDPLITE:
return false;
}
return true;
}
#endif /* _NF_REJECT_H */
Annotation
- Immediate include surface: `linux/types.h`, `uapi/linux/in.h`.
- Detected declarations: `function nf_reject_verify_csum`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.