]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man4/ng_sppp.4
This commit was generated by cvs2svn to compensate for changes in r133546,
[FreeBSD/FreeBSD.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 March 29, 2004
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 interface corresponding to this node in a
105 .Vt "struct ng_iface_ifname" :
106 .Bd -literal -offset indent
107 struct ng_iface_ifname {
108   char  ngif_name[NG_SPPP_IFACE_NAME_MAX + 1];
109 };
110 .Ed
111 .El
112 .Sh SHUTDOWN
113 This node shuts down upon receipt of a
114 .Dv NGM_SHUTDOWN
115 control message.
116 The associated interface is removed and becomes available
117 for use by future
118 .Nm sppp
119 nodes.
120 .Pp
121 Unlike most other node types and like
122 .Xr ng_iface 4
123 does, an
124 .Nm sppp
125 node does
126 .Em not
127 go away when all hooks have been disconnected; rather, an explicit
128 .Dv NGM_SHUTDOWN
129 control message is required.
130 .Sh EXAMPLES
131 For example, if you have the
132 .Xr cx 4
133 device, you could run PPP over it with just one command:
134 .Pp
135 .Dl "ngctl mkpeer cx0: sppp rawdata downstream"
136 .Pp
137 Now you have the
138 .Li sppp0
139 interface (if this was the first
140 .Nm sppp
141 node) which can be
142 accessed via
143 .Xr ifconfig 8
144 as a normal network interface,
145 or via
146 .Xr spppcontrol 8
147 as an
148 .Xr sppp 4
149 interface.
150 .Sh SEE ALSO
151 .Xr bpf 4 ,
152 .Xr cx 4 ,
153 .Xr netgraph 4 ,
154 .Xr ng_cisco 4 ,
155 .Xr ng_iface 4 ,
156 .Xr ng_ppp 4 ,
157 .Xr sppp 4 ,
158 .Xr ifconfig 8 ,
159 .Xr ngctl 8 ,
160 .Xr spppcontrol 8
161 .Pp
162 For complex networking topologies you may want to look at
163 .Pa net/mpd
164 port.
165 .Sh HISTORY
166 The
167 .Nm sppp
168 node type was implemented for
169 .Fx 5.0 .
170 It was included to the system since
171 .Fx 5.3 .
172 .Sh AUTHORS
173 Copyright (C) 2003-2004
174 .An Roman Kurakin Aq rik@cronyx.ru .