xref: /freebsd/share/man/man4/ng_cisco.4 (revision a64729f5077d77e13b9497cb33ecb3c82e606ee8)
1.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
2.\" All rights reserved.
3.\"
4.\" Subject to the following obligations and disclaimer of warranty, use and
5.\" redistribution of this software, in source or object code forms, with or
6.\" without modifications are expressly permitted by Whistle Communications;
7.\" provided, however, that:
8.\" 1. Any and all reproductions of the source or object code must include the
9.\"    copyright notice above and the following disclaimer of warranties; and
10.\" 2. No rights are granted, in any manner or form, to use Whistle
11.\"    Communications, Inc. trademarks, including the mark "WHISTLE
12.\"    COMMUNICATIONS" on advertising, endorsements, or otherwise except as
13.\"    such appears in the above copyright notice or in the software.
14.\"
15.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
16.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
17.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
18.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
19.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
20.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
21.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
22.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
23.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
24.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
25.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
26.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
27.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
28.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
31.\" OF SUCH DAMAGE.
32.\"
33.\" Author: Archie Cobbs <archie@FreeBSD.org>
34.\" $Whistle: ng_cisco.8,v 1.5 1999/01/25 23:46:26 archie Exp $
35.\"
36.Dd January 19, 1999
37.Dt NG_CISCO 4
38.Os
39.Sh NAME
40.Nm ng_cisco
41.Nd Cisco HDLC protocol netgraph node type
42.Sh SYNOPSIS
43.In sys/types.h
44.In netinet/in.h
45.In netgraph/ng_cisco.h
46.Sh DESCRIPTION
47The
48.Nm cisco
49node type performs encapsulation and de-encapsulation of packets
50using the Cisco HDLC protocol.
51This is a fairly simple
52protocol for the transmission of packets across
53high speed synchronous lines.
54Each packet is prepended with
55an Ethertype, indicating the protocol.
56There is also a
57.Dq keep alive
58and an
59.Dq inquire
60capability.
61.Pp
62The
63.Dv downstream
64hook should connect to the synchronous line.
65On the other side
66of the node are the
67.Dv inet ,
68.Dv inet6 ,
69.Dv atalk ,
70and
71.Dv ipx
72hooks, which transmit and receive raw IP, IPv6, AppleTalk, and IPX packets,
73respectively.
74Typically these hooks would connect to the corresponding
75hooks on an
76.Xr ng_iface 4
77type node.
78.Sh IP Configuration
79In order to function properly for IP traffic, the node must be informed
80of the local IP address and netmask setting.
81This is because the protocol
82includes an
83.Dq inquire
84packet which we must be prepared to answer.
85There are two ways to accomplish this, manually and automatically.
86.Pp
87Whenever such an inquire packet is received, the node sends a
88.Dv NGM_CISCO_GET_IPADDR
89control message to the peer node connected to the
90.Dv inet
91hook (if any).
92If the peer responds, then that response is used.
93This is the automatic method.
94.Pp
95If the peer does not respond, the node falls back on its cached value
96for the IP address and netmask.
97This cached value can be set at any time
98with a
99.Dv NGM_CISCO_SET_IPADDR
100message, and this is the manual method.
101.Pp
102If the
103.Dv inet
104hook is connected to the
105.Dv inet
106hook of an
107.Xr ng_iface 4
108node, as is usually the case, then configuration is automatic as the
109.Xr ng_iface 4
110understands the
111.Dv NGM_CISCO_GET_IPADDR
112message.
113.Sh HOOKS
114This node type supports the following hooks:
115.Bl -tag -width ".Va downstream"
116.It Va downstream
117The connection to the synchronous line.
118.It Va inet
119IP hook.
120.It Va inet6
121IPv6 hook.
122.It Va atalk
123AppleTalk hook.
124.It Va ipx
125IPX hook.
126.El
127.Sh CONTROL MESSAGES
128This node type supports the generic control messages, plus the following:
129.Bl -tag -width foo
130.It Dv NGM_CISCO_SET_IPADDR Pq Ic setipaddr
131This command takes an array of two
132.Dv "struct in_addr"
133arguments.
134The first is the IP address of the corresponding interface
135and the second is the netmask.
136.It Dv NGM_CISCO_GET_IPADDR Pq Ic getipaddr
137This command returns the IP configuration in the same format used by
138.Dv NGM_CISCO_SET_IPADDR .
139This command is also
140.Em sent
141by this node type to the
142.Dv inet
143peer whenever an IP address inquiry packet is received.
144.It Dv NGM_CISCO_GET_STATUS Pq Ic getstats
145Returns a
146.Dv "struct ngciscostat" :
147.Bd -literal -offset 4n
148struct ngciscostat {
149  uint32_t   seqRetries;	/* # unack'd retries */
150  uint32_t   keepAlivePeriod;	/* in seconds */
151};
152.Ed
153.El
154.Sh SHUTDOWN
155This node shuts down upon receipt of a
156.Dv NGM_SHUTDOWN
157control message, or when all hooks have been disconnected.
158.Sh SEE ALSO
159.Xr netgraph 4 ,
160.Xr ng_iface 4 ,
161.Xr ngctl 8
162.Rs
163.%A D. Perkins
164.%T "Requirements for an Internet Standard Point-to-Point Protocol"
165.%O RFC 1547
166.Re
167.Sh LEGAL
168.Tn Cisco
169is a trademark of Cisco Systems, Inc.
170.Sh HISTORY
171The
172.Nm
173node type was implemented in
174.Fx 4.0 .
175.Sh AUTHORS
176.An Julian Elischer Aq Mt julian@FreeBSD.org
177.An Archie Cobbs Aq Mt archie@FreeBSD.org
178.Sh BUGS
179Not all of the functionality has been implemented.
180For example,
181the node does not support querying the remote end for its IP address
182and netmask.
183