Deleted Added
full compact
ng_sppp.4 (131594) ng_sppp.4 (131861)
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 $
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: head/share/man/man4/ng_sppp.4 131594 2004-07-04 20:55:50Z ru $
13.\" $FreeBSD: head/share/man/man4/ng_sppp.4 131861 2004-07-09 07:26:15Z ru $
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
24An
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
24An
25.Nm ng_sppp
25.Nm sppp
26node is a
27.Xr netgraph 4
28interface to the original
29.Xr sppp 4
30network module for synchronous lines.
26node is a
27.Xr netgraph 4
28interface to the original
29.Xr sppp 4
30network module for synchronous lines.
31Currently
31Currently,
32.Xr sppp 4
32.Xr sppp 4
33supports PPP and Cisco HDLC protocol.
33supports PPP and Cisco HDLC protocols.
34An
34An
35.Nm ng_sppp
36node could be considered as an alternative kernel mode ppp
35.Nm sppp
36node could be considered as an alternative kernel mode PPP
37implementation to
37implementation to
38.Xr mpd ports +
39.Xr ng_ppp 4
38.Pa net/mpd
39port +
40.Xr ng_ppp 4 ,
40and as an alternative to
41.Xr ng_cisco 4
42node.
41and as an alternative to
42.Xr ng_cisco 4
43node.
43While having less features than mpd +
44While having less features than
45.Pa net/mpd
46+
44.Xr ng_ppp 4 ,
47.Xr ng_ppp 4 ,
45it is significantly easier to use in the majority of simple configurations
46and allows the administrator to not install the mpd port.
48it is significantly easier to use in the majority of simple configurations,
49and allows the administrator to not install the
50.Pa net/mpd
51port.
47With
52With
48.Nm ng_sppp
49you don't need any other nodes, not even an
53.Nm sppp
54you do not need any other nodes, not even an
50.Xr ng_iface 4
51node.
52When an
55.Xr ng_iface 4
56node.
57When an
53.Nm ng_sppp
58.Nm sppp
54node is created, a new interface appears which is accessible via
55.Xr ifconfig 8 .
59node is created, a new interface appears which is accessible via
60.Xr ifconfig 8 .
56.Nm ng_sppp
57node interfaces are named
58.Dv sppp0 ,
59.Dv sppp1 ,
61Network interfaces corresponding to
62.Nm sppp
63nodes are named
64.Li sppp0 , sppp1 ,
60etc.
65etc.
61When a node is shutdown, the corresponding interface is removed
66When a node is shut down, the corresponding interface is removed,
62and the interface name becomes available for reuse by future
67and the interface name becomes available for reuse by future
63.Nm ng_sppp
68.Nm sppp
64nodes.
65New nodes always take the first unused interface.
66The node itself is assigned the same name as its interface, unless the name
67already exists, in which case the node remains unnamed.
68The
69nodes.
70New nodes always take the first unused interface.
71The node itself is assigned the same name as its interface, unless the name
72already exists, in which case the node remains unnamed.
73The
69.Nm ng_sppp
70node allows drivers written to the old sppp interface to be rewritten using the
74.Nm sppp
75node allows drivers written to the old
76.Xr sppp 4
77interface to be rewritten using the
71newer more powerful
72.Xr netgraph 4
78newer more powerful
79.Xr netgraph 4
73interface and still behave in a compatible manner without supporting both
80interface, and still behave in a compatible manner without supporting both
74network modules.
75.Pp
76An
81network modules.
82.Pp
83An
77.Nm ng_sppp
78node has a single hook named downstream.
84.Nm sppp
85node has a single hook named
86.Va downstream .
79Usually it is connected directly to
80a device driver hook.
81.Pp
87Usually it is connected directly to
88a device driver hook.
89.Pp
82.Nm ng_sppp
83nodes support the Berkeley Packet Filter (BPF).
90The
91.Nm sppp
92nodes support the Berkeley Packet Filter,
93.Xr bpf 4 .
84.Sh HOOKS
85This node type supports the following hooks:
94.Sh HOOKS
95This node type supports the following hooks:
86.Pp
87.Bl -tag -width abcdefghijklmnop
88.It Dv downstream
96.Bl -tag -width ".Va downstream"
97.It Va downstream
89The connection to the synchronous line.
90.El
91.Sh CONTROL MESSAGES
92This node type supports the generic control messages, plus the following:
98The connection to the synchronous line.
99.El
100.Sh CONTROL MESSAGES
101This node type supports the generic control messages, plus the following:
93.Bl -tag -width foo
102.Bl -tag -width indent
94.It Dv NGM_IFACE_GET_IFNAME
95Returns the name of the interface corresponding to this node in a
103.It Dv NGM_IFACE_GET_IFNAME
104Returns the name of the interface corresponding to this node in a
96.Dv "struct ng_iface_ifname" :
97.Bd -literal -offset 4n
105.Vt "struct ng_iface_ifname" :
106.Bd -literal -offset indent
98struct ng_iface_ifname {
99 char ngif_name[NG_SPPP_IFACE_NAME_MAX + 1];
100};
101.Ed
102.El
103.Sh SHUTDOWN
104This node shuts down upon receipt of a
105.Dv NGM_SHUTDOWN
106control message.
107The associated interface is removed and becomes available
108for use by future
107struct ng_iface_ifname {
108 char ngif_name[NG_SPPP_IFACE_NAME_MAX + 1];
109};
110.Ed
111.El
112.Sh SHUTDOWN
113This node shuts down upon receipt of a
114.Dv NGM_SHUTDOWN
115control message.
116The associated interface is removed and becomes available
117for use by future
109.Nm ng_sppp
118.Nm sppp
110nodes.
111.Pp
112Unlike most other node types and like
113.Xr ng_iface 4
114does, an
119nodes.
120.Pp
121Unlike most other node types and like
122.Xr ng_iface 4
123does, an
115.Nm ng_sppp
124.Nm sppp
116node does
117.Em not
125node does
126.Em not
118go away when all hooks have been disconnected; rather, and explicit
127go away when all hooks have been disconnected; rather, an explicit
119.Dv NGM_SHUTDOWN
120control message is required.
121.Sh EXAMPLES
128.Dv NGM_SHUTDOWN
129control message is required.
130.Sh EXAMPLES
122For example, if you have
123.Xr cx 4 device, you could run PPP over it with just one command:
131For example, if you have the
132.Xr cx 4
133device, you could run PPP over it with just one command:
124.Pp
134.Pp
125ngctl mkpeer cx0: sppp rawdata downstream
135.Dl "ngctl mkpeer cx0: sppp rawdata downstream"
126.Pp
136.Pp
127Now you have sppp0 interface (if this is a first sppp node) which can be
128managed via
129.Xr ifconfig 4 as a usual network interface,
137Now you have the
138.Li sppp0
139interface (if this was the first
140.Nm sppp
141node) which can be
142accessed via
143.Xr ifconfig 8
144as a normal network interface,
130or via
145or via
131.Xr spppcontrol 8 as a sppp interface.
146.Xr spppcontrol 8
147as an
148.Xr sppp 4
149interface.
132.Sh SEE ALSO
133.Xr bpf 4 ,
134.Xr cx 4 ,
135.Xr netgraph 4 ,
136.Xr ng_cisco 4 ,
137.Xr ng_iface 4 ,
138.Xr ng_ppp 4 ,
139.Xr sppp 4 ,
140.Xr ifconfig 8 ,
141.Xr ngctl 8 ,
142.Xr spppcontrol 8
143.Pp
144For complex networking topologies you may want to look at
145.Pa net/mpd
146port.
147.Sh HISTORY
148The
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
162For complex networking topologies you may want to look at
163.Pa net/mpd
164port.
165.Sh HISTORY
166The
149.Nm ng_sppp
167.Nm sppp
150node type was implemented for
151.Fx 5.0 .
152It was included to the system since
153.Fx 5.3 .
168node type was implemented for
169.Fx 5.0 .
170It was included to the system since
171.Fx 5.3 .
154.Sh AUTHOR
155.An Copyright (C) 2003-2004 Roman Kurakin Aq rik@cronyx.ru
172.Sh AUTHORS
173Copyright (C) 2003-2004
174.An Roman Kurakin Aq rik@cronyx.ru .