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