NGATMBASE(4)
π NGATMBASE(4) π
okay bestie, sit down, hydrate, because we're talking about ngatmbase β the netgraph ATM utility module from the Kernel Interfaces Manual. yes, it's a manual page. yes, it's giving utility-module energy. let's go π¦
β¨ NAME β¨
ngatmbase β netgraph ATM utility module
πΈ SYNOPSIS πΈ
#include <netnatm/unimsg.h>
#include <netgraph/atm/ngatmbase.h>
struct mbuf *
uni_msg_pack_mbuf(struct uni_msg *msg, void *hdr, size_t len);
struct uni_msg *
uni_msg_alloc(size_t len);
struct uni_msg *
uni_msg_build(void *buf, ...);
void
uni_msg_destroy(struct uni_msg *msg);
int
uni_msg_unpack_mbuf(struct mbuf *m, struct uni_msg *msgp);
π DESCRIPTION π
so this module is literally the little helper squad π«Ά that handles signalling messages for all the NgATM modules. it's the backstage crew. the main character energy is elsewhere, but nothing works without it.
π uni_msg_pack_mbuf()
this one packs a message into one or several mbufs, and optionally it'll prepend a header for you π
- the header is given by its address
hdrand its lengthlen - if
hdrisNULLorlenequals0, then no header gets prepended. periodt. - either
msgorhdrmay beNULL, but not both β that's the rule, no cap - it returns a pointer to the allocated
mbufchain, orNULLif something went wrong π
π§ uni_msg_alloc()
allocates a brand new message with space for at least len bytes β¨
if there's an error, NULL comes back. that's it, that's the whole function, she's simple and she's iconic.
π uni_msg_build()
constructs a message out of pieces π§©
each piece is handed over as a pair of arguments β first one is of type void *, second one is a size_t.
and the list of pieces must be terminated by (void *)NULL. do not forget the terminator, bestie, that's the vibe check π¨
π uni_msg_destroy()
destroys the messages and frees all of the message's memory. bye queen, you served π«‘
π uni_msg_unpack_mbuf()
unpacks an mbuf chain into a uni_msg π¦
a pointer to the newly allocated message gets stored in msgp, and 0 is returned. slay.
but if there's an error β either when no packet header is found in the first mbuf, or when memory cannot be allocated β the function returns an appropriate error code. so check your return value, i'm begging π
π₯ SEE ALSO π₯
π AUTHORS π
Harti Brandt <harti@FreeBSD.org> β the icon, the legend, the moment β
and that's the whole page, bestie!! this one's from the Debian distribution and it's dated August 24, 2004 β vintage, lowkey a classic, and honestly? still serving πβ¨π
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 2004 Hartmut Brandt
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms