STRUCT UDP_MEDIA_ADDR(9)
π struct udp_media_addr(9) π
okay bestie, welcome to the Kernel API Manual β this one's a lil struct page for struct udp_media_addr, and honestly? it's giving "small but knows things" energy. stick with me π«Ά
β¨ NAME β¨
struct udp_media_addr β the IP/UDP addressing info π like, literally where a message is coming from at the bearer level, no cap.
πΈ SYNOPSIS πΈ
struct udp_media_addr {
__be16 proto;
__be16 port;
union {
struct in_addr ipv4;
struct in6_addr ipv6;
};
};
look at her. neat. tidy. two bytes here, two bytes there, and a lil anonymous union doing the most π
π¦ Members π¦
protoβ the Ethernet protocol in use. which flavour of traffic we're talking about, iykyk βportβ the port being used. the door number, basically πͺβ¨{unnamed_union}β anonymous. no name, no problem, she's just there being mysterious π (it's the union holding the address, in case you were wondering)ipv4β IPv4 address of the neighbor π thestruct in_addrversionipv6β IPv6 address of the neighbor π thestruct in6_addrversion
π Description π
so here's the tea π β this is the bearer level originating address used in neighbor discovery messages. that's the whole vibe: "hey, this is where I'm coming from" but at the bearer layer.
and this part is important, so I'm saying it loud: all fields should be in network byte order. all of them. every single one. don't be out here putting host byte order in there, I'm begging π (that's what the __be16 types are screaming at you about, fr fr)
π₯ SEE ALSO π₯
- Kernel file
./net/tipc/udp_media.cβstruct udp_bearer(9),tipc_parse_udp_addr(9),tipc_udp_enable(9)
go read tipc_udp_enable(9) too, she ate π
that's the whole page, bestie π§ from ./net/tipc, dated October 2026 β and that's the struct udp_media_addr(9) manual section, wrapped up with a bow ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms