NG_CISCO(4)
π NG_CISCO(4) β cisco node type, bestie edition β¨
okay so this is a page from the Kernel Interfaces Manual (section 4, kernel interfaces, iykyk) and it's all about the ng_cisco node type. buckle up π
πΈ NAME πΈ
ng_cisco β the Cisco HDLC protocol netgraph node type. periodt.
β¨ SYNOPSIS β¨
#include <sys/types.h>
#include <netinet/in.h>
#include <netgraph/ng_cisco.h>
like, include these three headers and you're in π«Ά
π¦ DESCRIPTION π¦
The cisco node type does the encapsulation and de-encapsulation of packets using the Cisco HDLC protocol. It's honestly a pretty simple protocol for sending packets across high speed synchronous lines β lowkey elegant ngl. Every packet gets an Ethertype prepended to it, which is the thing that says which protocol it is. It also has a "keep alive" capability and an "inquire" capability. two little bonus features, we love that for it π
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, and those 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. match made in heaven fr fr π
π IP Configuration π
so for this node to function properly for IP traffic, it must be told the local IP address and netmask setting. why? because the protocol includes an "inquire" packet and we gotta be ready to answer it, bestie. there are two ways to make this happen: manually and automatically. two paths, both valid β¨
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 gets used. that's the automatic method, and it's giving main character energy honestly π
If the peer does not respond, the node falls back on its cached value for the IP address and netmask. That cached value can be set at any time with a NGM_CISCO_SET_IPADDR message β and that's the manual method. good to have a backup plan π
If the inet hook is connected to the inet hook of an ng_iface(4) node β which is usually the case β then configuration is automatic, because ng_iface(4) understands the NGM_CISCO_GET_IPADDR message. it just gets it. iconic behaviour π
π HOOKS π
This node type supports the following hooks, and yes we're listing all of them:
downstreamβ The connection to the synchronous line. the big one π₯inetβ IP hook.inet6β IPv6 hook.atalkβ AppleTalk hook.ipxβ IPX hook.
five hooks, all accounted for, no cap π
β CONTROL MESSAGES β
This node type supports the generic control messages, plus the following cuties:
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.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. multitasking queen πNGM_CISCO_GET_STATUS(getstats) β Returns astruct ngciscostat:
struct ngciscostat {
uint32_t seqRetries; /* # unack'd retries */
uint32_t keepAlivePeriod; /* in seconds */
};
look at that struct. beautiful. two uint32_ts and a dream π¦
πΈ SHUTDOWN πΈ
This node shuts down upon receipt of a NGM_SHUTDOWN control message, or when all hooks have been disconnected. that's it, that's the whole vibe check π
π SEE ALSO π
also this absolute classic:
- D. Perkins, Requirements for an Internet Standard Point-to-Point Protocol, RFC 1547.
go read the RFC bestie, it's giving required reading πβ¨
π LEGAL π
Cisco is a trademark of Cisco Systems, Inc. gotta say it, legal said so π
π§ HISTORY π§
The ng_cisco node type was implemented in FreeBSD 4.0. vintage. retro. we stan a legacy icon πβ¨
π AUTHORS π
- Julian Elischer
<julian@FreeBSD.org> - Archie Cobbs
<archie@FreeBSD.org>
two legends, one node type π«Ά
π 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. yeah. that part's just... not there yet. we're aware. it's on the list ππ
okay that's the whole page, no skips, every flag and hook and message intact π sending you good netgraph vibes and reminding you to actually set your IP config before you wonder why inquire packets are ghosting you π
Debian Β· January 19, 1999 Β· that's the source, the version and the date babes, mwah π β¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 1996-1999 Whistle Communications, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms