include/net/tipc.h

Source file repositories/reference/linux-study-clean/include/net/tipc.h

File Facts

System
Linux kernel
Corpus path
include/net/tipc.h
Extension
.h
Size
2405 bytes
Lines
63
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct tipc_basic_hdr {
	__be32 w[4];
};

static inline __be32 tipc_hdr_rps_key(struct tipc_basic_hdr *hdr)
{
	u32 w0 = ntohl(hdr->w[0]);
	bool keepalive_msg = (w0 & KEEPALIVE_MSG_MASK) == KEEPALIVE_MSG_MASK;
	__be32 key;

	/* Return source node identity as key */
	if (likely(!keepalive_msg))
		return hdr->w[3];

	/* Spread PROBE/PROBE_REPLY messages across the cores */
	get_random_bytes(&key, sizeof(key));
	return key;
}

#endif

Annotation

Implementation Notes