]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - share/man/man4/ng_sppp.4
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / share / man / man4 / ng_sppp.4
1 .\" Copyright (C) 2003-2004 Cronyx Engineering.
2 .\" Copyright (C) 2003-2004 Roman Kurakin <rik@cronyx.ru>
3 .\"
4 .\" This software is distributed with NO WARRANTIES, not even the implied
5 .\" warranties for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
6 .\"
7 .\" Authors grant any other persons or organisations a permission to use,
8 .\" modify and redistribute this software in source and binary forms,
9 .\" as long as this message is kept with the software, all derivative
10 .\" works or modified versions.
11 .\"
12 .\" Cronyx Id: ng_sppp.4,v 1.1.2.3 2004/03/30 14:28:34 rik Exp $
13 .\" $FreeBSD$
14 .\"
15 .Dd February 3, 2005
16 .Dt NG_SPPP 4
17 .Os
18 .Sh NAME
19 .Nm ng_sppp
20 .Nd sppp netgraph node type
21 .Sh SYNOPSIS
22 .In netgraph/ng_sppp.h
23 .Sh DESCRIPTION
24 An
25 .Nm sppp
26 node is a
27 .Xr netgraph 4
28 interface to the original
29 .Xr sppp 4
30 network module for synchronous lines.
31 Currently,
32 .Xr sppp 4
33 supports PPP and Cisco HDLC protocols.
34 An
35 .Nm sppp
36 node could be considered as an alternative kernel mode PPP
37 implementation to
38 .Pa net/mpd
39 port +
40 .Xr ng_ppp 4 ,
41 and as an alternative to
42 .Xr ng_cisco 4
43 node.
44 While having less features than
45 .Pa net/mpd
46 +
47 .Xr ng_ppp 4 ,
48 it is significantly easier to use in the majority of simple configurations,
49 and allows the administrator to not install the
50 .Pa net/mpd
51 port.
52 With
53 .Nm sppp
54 you do not need any other nodes, not even an
55 .Xr ng_iface 4
56 node.
57 When an
58 .Nm sppp
59 node is created, a new interface appears which is accessible via
60 .Xr ifconfig 8 .
61 Network interfaces corresponding to
62 .Nm sppp
63 nodes are named
64 .Li sppp0 , sppp1 ,
65 etc.
66 When a node is shut down, the corresponding interface is removed,
67 and the interface name becomes available for reuse by future
68 .Nm sppp
69 nodes.
70 New nodes always take the first unused interface.
71 The node itself is assigned the same name as its interface, unless the name
72 already exists, in which case the node remains unnamed.
73 The
74 .Nm sppp
75 node allows drivers written to the old
76 .Xr sppp 4
77 interface to be rewritten using the
78 newer more powerful
79 .Xr netgraph 4
80 interface, and still behave in a compatible manner without supporting both
81 network modules.
82 .Pp
83 An
84 .Nm sppp
85 node has a single hook named
86 .Va downstream .
87 Usually it is connected directly to
88 a device driver hook.
89 .Pp
90 The
91 .Nm sppp
92 nodes support the Berkeley Packet Filter,
93 .Xr bpf 4 .
94 .Sh HOOKS
95 This node type supports the following hooks:
96 .Bl -tag -width ".Va downstream"
97 .It Va downstream
98 The connection to the synchronous line.
99 .El
100 .Sh CONTROL MESSAGES
101 This node type supports the generic control messages, plus the following:
102 .Bl -tag -width indent
103 .It Dv NGM_IFACE_GET_IFNAME
104 Returns the name of the associated interface as a
105 .Dv NUL Ns -terminated
106 .Tn ASCII
107 string.
108 Normally this is the same as the name of the node.
109 .El
110 .Sh SHUTDOWN
111 This node shuts down upon receipt of a
112 .Dv NGM_SHUTDOWN
113 control message.
114 The associated interface is removed and becomes available
115 for use by future
116 .Nm sppp
117 nodes.
118 .Pp
119 Unlike most other node types and like
120 .Xr ng_iface 4
121 does, an
122 .Nm sppp
123 node does
124 .Em not
125 go away when all hooks have been disconnected; rather, an explicit
126 .Dv NGM_SHUTDOWN
127 control message is required.
128 .Sh EXAMPLES
129 For example, if you have the
130 .Xr cx 4
131 device, you could run PPP over it with just one command:
132 .Pp
133 .Dl "ngctl mkpeer cx0: sppp rawdata downstream"
134 .Pp
135 Now you have the
136 .Li sppp0
137 interface (if this was the first
138 .Nm sppp
139 node) which can be
140 accessed via
141 .Xr ifconfig 8
142 as a normal network interface,
143 or via
144 .Xr spppcontrol 8
145 as an
146 .Xr sppp 4
147 interface.
148 .Sh SEE ALSO
149 .Xr bpf 4 ,
150 .Xr cx 4 ,
151 .Xr netgraph 4 ,
152 .Xr ng_cisco 4 ,
153 .Xr ng_iface 4 ,
154 .Xr ng_ppp 4 ,
155 .Xr sppp 4 ,
156 .Xr ifconfig 8 ,
157 .Xr ngctl 8 ,
158 .Xr spppcontrol 8
159 .Pp
160 For complex networking topologies you may want to look at
161 .Pa net/mpd
162 port.
163 .Sh HISTORY
164 The
165 .Nm sppp
166 node type was implemented for
167 .Fx 5.0 .
168 It was included to the system since
169 .Fx 5.3 .
170 .Sh AUTHORS
171 Copyright (C) 2003-2004
172 .An Roman Kurakin Aq rik@cronyx.ru .