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