NG_CISCO(4)
π NG_CISCO(4) π
okay bestie, gather round, because we're about to talk about ng_cisco β the Cisco HDLC protocol netgraph node type, straight out of the Kernel Interfaces Manual. this is a real one. no cap. π¦
β¨ SYNOPSIS β¨
like all the cool kids, you gotta include the headers first:
#include <sys/types.h>
#include <netinet/in.h>
#include <netgraph/ng_cisco.h>
πΈ DESCRIPTION πΈ
so the cisco node type does encapsulation and de-encapsulation of packets using the Cisco HDLC protocol. it's a pretty simple protocol for sending packets across high speed synchronous lines. every single packet gets an Ethertype prepended to it, which tells you what protocol it is. and yes, there's also a "keep alive" capability and an "inquire" capability. the way that it does all three? iconic. π
the downstream hook is the one that should connect to the synchronous line. on the other side of the node you've got the inet, inet6, atalk, and ipx hooks, which transmit and receive raw IP, IPv6, AppleTalk, and IPX packets respectively. typically these hooks would connect to the corresponding hooks on an ng_iface(4) type node. matching hooks to matching hooks? it's giving soulmates fr fr π
π IP Configuration π
so for IP traffic to actually function properly, the node has to be informed of the local IP address and netmask setting. why, you ask? because the protocol includes an "inquire" packet, and we must be prepared to answer it. rude of the protocol to ask, but okay. there are two ways to accomplish this: manually and automatically. pick your fighter. π
whenever such an inquire packet is received, the node sends a NGM_CISCO_GET_IPADDR control message to the peer node connected to the inet hook (if any). if the peer responds, then that response is used. that's the automatic method. so easy. so slay. β¨
if the peer does not respond, the node falls back on its cached value for the IP address and netmask. this cached value can be set at any time with a NGM_CISCO_SET_IPADDR message, and that's the manual method. sometimes you just gotta do it yourself, and that's valid. π«Ά
and if the inet hook is connected to the inet hook of an ng_iface(4) node β which, ngl, is usually the case β then configuration is automatic, because ng_iface(4) understands the NGM_CISCO_GET_IPADDR message. bestie behavior. it just gets you. π
π¦ HOOKS π¦
this node type supports the following hooks:
downstreamβ the connection to the synchronous line. the main character of the hook lineup. πinetβ IP hook.inet6β IPv6 hook.atalkβ AppleTalk hook.ipxβ IPX hook.
π₯ CONTROL MESSAGES π₯
this node type supports the generic control messages, plus the following:
NGM_CISCO_SET_IPADDR(setipaddr) β this command takes an array of twostruct in_addrarguments. the first is the IP address of the corresponding interface and the second is the netmask. two args, one job. πNGM_CISCO_GET_IPADDR(getipaddr) β this command returns the IP configuration in the same format used byNGM_CISCO_SET_IPADDR. this command is also sent by this node type to theinetpeer whenever an IP address inquiry packet is received. so it's a receiver AND a sender. versatile queen. πNGM_CISCO_GET_STATUS(getstats) β returns astruct ngciscostat:
struct ngciscostat {
uint32_t seqRetries; /* # unack'd retries */
uint32_t keepAlivePeriod; /* in seconds */
};
look at those fields. seqRetries is the number of unack'd retries and keepAlivePeriod is in seconds. we love a stats struct with comments. πΈ
π SHUTDOWN π
this node shuts down upon receipt of a NGM_SHUTDOWN control message, or when all hooks have been disconnected. it's like when the group chat goes quiet and everyone just... leaves. π but that's the protocol, bestie.
π SEE ALSO π
netgraph(4)ng_iface(4)ngctl(8)- D. Perkins, Requirements for an Internet Standard Point-to-Point Protocol, RFC 1547.
go read them. iykyk. πβ¨
βοΈ LEGAL βοΈ
Cisco is a trademark of Cisco Systems, Inc. okay so legally we have to say that. consider it said. π
π HISTORY π
The ng_cisco node type was implemented in FreeBSD 4.0. vintage. retro. historic, even. πΈ
π AUTHORS π
- Julian Elischer
<julian@FreeBSD.org> - Archie Cobbs
<archie@FreeBSD.org>
absolute legends, both of them. π«Ά
π BUGS π
not all of the functionality has been implemented. for example, the node does not support querying the remote end for its IP address and netmask.
so yeah, that part? not done. no cap, don't go looking for it. π
and that's the whole page, bestie β this one came from the Debian crew and it's dated January 19, 1999, which is lowkey ancient but we love it anyway. mwah. π β¨π
π¦ 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) 1996-1999 Whistle Communications, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms