net/tipc/udp_media.h

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

File Facts

System
Linux kernel
Corpus path
net/tipc/udp_media.h
Extension
.h
Size
2530 bytes
Lines
61
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

#ifdef CONFIG_TIPC_MEDIA_UDP
#ifndef _TIPC_UDP_MEDIA_H
#define _TIPC_UDP_MEDIA_H

#include <linux/ip.h>
#include <linux/udp.h>

int tipc_udp_nl_bearer_add(struct tipc_bearer *b, struct nlattr *attr);
int tipc_udp_nl_add_bearer_data(struct tipc_nl_msg *msg, struct tipc_bearer *b);
int tipc_udp_nl_dump_remoteip(struct sk_buff *skb, struct netlink_callback *cb);

/* check if configured MTU is too low for tipc headers */
static inline bool tipc_udp_mtu_bad(u32 mtu)
{
	if (mtu >= (TIPC_MIN_BEARER_MTU + sizeof(struct iphdr) +
	    sizeof(struct udphdr)))
		return false;

	pr_warn("MTU too low for tipc bearer\n");
	return true;
}

#endif
#endif

Annotation

Implementation Notes