xref: /freebsd/share/man/man4/ng_cisco.4 (revision 4cf49a43559ed9fdad601bdcccd2c55963008675)
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@whistle.com>
34.\"
35.\" $FreeBSD$
36.\" $Whistle: ng_cisco.8,v 1.5 1999/01/25 23:46:26 archie Exp $
37.\"
38.Dd January 19, 1999
39.Dt NG_CISCO 8
40.Os FreeBSD 3
41.Sh NAME
42.Nm ng_cisco
43.Nd Cisco HDLC protocol netgraph node type
44.Sh SYNOPSIS
45.Fd #include <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. This is a fairly simple
51protocol for the transmission of packets across
52high speed synchronous lines. Each packet is prepended with
53an Ethertype, indicating the protocol. There is also a
54``keep alive'' and an ``inquire'' capability.
55.Pp
56The
57.Dv downstream
58hook should connect to the synchronous line. On the other side
59of the node are the
60.Dv inet ,
61.Dv atalk ,
62and
63.Dv ipx
64hooks, which transmit and receive raw IP, AppleTalk, and IPX packets,
65respectively.  Typically these hooks would connect to the corresponding
66hooks on an
67.Xr ng_iface 8
68type node.
69.Sh IP Configuration
70In order to function properly for IP traffic, the node must be informed
71of the local IP address and netmask setting.  This is because the protocol
72includes an ``inquire'' packet which we must be prepared to answer.
73There are two ways to acomplish this, manually and automatically.
74.Pp
75Whenever such an inquire packet is received, the node sends a
76.Dv NGM_CISCO_GET_IPADDR
77control message to the peer node connected to the
78.Dv inet
79hook (if any).
80If the peer responds, then that response is used. This is the automatic method.
81.Pp
82If the peer does not respond, the node falls back on its cached value
83for the IP address and netmask. This cached value can be set at any time
84with a
85.Dv NGM_CISCO_SET_IPADDR
86message, and this is the manual method.
87.Pp
88If the
89.Dv inet
90hook is connected to the
91.Dv inet
92hook of an
93.Xr ng_iface 8
94node, as is usually the case, then configuration is automatic as the
95.Xr ng_iface 8
96understands the
97.Dv NGM_CISCO_GET_IPADDR
98message.
99.Sh HOOKS
100This node type supports the following hooks:
101.Pp
102.Bl -tag -width foobarbazio
103.It Dv downstream
104The connection to the synchronous line.
105.It Dv inet
106IP hook.
107.It Dv atalk
108AppleTalk hook.
109.It Dv ipx
110IPX hook
111.El
112.Sh CONTROL MESSAGES
113This node type supports the generic control messages, plus the following:
114.Bl -tag -width foo
115.It Dv NGM_CISCO_SET_IPADDR
116This command takes an array of two
117.Dv "struct in_addr"
118arguments. The first is the IP address of the corresponding interface
119and the second is the netmask.
120.It Dv NGM_CISCO_GET_IPADDR
121This command returns the IP configuration in the same format used by
122.Dv NGM_CISCO_SET_IPADDR .
123This command is also
124.Em sent
125by this node type to the
126.Dv inet
127peer whenever an IP address inquiry packet is received.
128.It Dv NGM_CISCO_GET_STATUS
129Returns a
130.Dv "struct ngciscostat" :
131.Bd -literal -offset 4n
132struct ngciscostat {
133  u_int32_t   seq_retries;       /* # unack'd retries */
134  u_int32_t   keepalive_period;  /* in seconds */
135};
136.Ed
137.El
138.Sh SHUTDOWN
139This node shuts down upon receipt of a
140.Dv NGM_SHUTDOWN
141control message, or when all hooks have been disconnected.
142.Sh BUGS
143Not all of the functionality has been implemented. For example,
144the node does not support querying the remote end for its IP address
145and netmask.
146.Sh SEE ALSO
147.Xr netgraph 4 ,
148.Xr ng_iface 8 ,
149.Xr ngctl 8 .
150.Rs
151.%A D. Perkins
152.%T "Requirements for an Internet Standard Point-to-Point Protocol"
153.%O RFC 1547
154.Re
155.Sh LEGAL
156Cisco is a trademark of Cisco Systems, Inc.
157.Sh AUTHORS
158Julian Elisher <julian@whistle.com>,
159Archie Cobbs <archie@whistle.com>
160