include/net/sctp/checksum.h
Source file repositories/reference/linux-study-clean/include/net/sctp/checksum.h
File Facts
- System
- Linux kernel
- Corpus path
include/net/sctp/checksum.h- Extension
.h- Size
- 1072 bytes
- Lines
- 41
- 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.hlinux/sctp.h
Detected Declarations
function Copyright
Annotated Snippet
#ifndef __sctp_checksum_h__
#define __sctp_checksum_h__
#include <linux/types.h>
#include <linux/sctp.h>
static inline __le32 sctp_compute_cksum(const struct sk_buff *skb,
unsigned int offset)
{
struct sctphdr *sh = (struct sctphdr *)(skb->data + offset);
__le32 old = sh->checksum;
u32 new;
sh->checksum = 0;
new = ~skb_crc32c(skb, offset, skb->len - offset, ~0);
sh->checksum = old;
return cpu_to_le32(new);
}
#endif /* __sctp_checksum_h__ */
Annotation
- Immediate include surface: `linux/types.h`, `linux/sctp.h`.
- Detected declarations: `function Copyright`.
- 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.