freebsd-dev/share/man/man4/ng_sppp.4

173 lines
3.8 KiB
Groff
Raw Normal View History

2004-05-16 14:41:20 +00:00
.\" Copyright (C) 2003-2004 Cronyx Engineering.
.\" Copyright (C) 2003-2004 Roman Kurakin <rik@cronyx.ru>
.\"
.\" This software is distributed with NO WARRANTIES, not even the implied
.\" warranties for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
.\"
.\" Authors grant any other persons or organisations a permission to use,
.\" modify and redistribute this software in source and binary forms,
.\" as long as this message is kept with the software, all derivative
.\" works or modified versions.
.\"
.\" Cronyx Id: ng_sppp.4,v 1.1.2.3 2004/03/30 14:28:34 rik Exp $
.\" $FreeBSD$
.\"
2005-02-03 13:33:34 +00:00
.Dd February 3, 2005
2004-05-16 14:41:20 +00:00
.Dt NG_SPPP 4
.Os
.Sh NAME
.Nm ng_sppp
.Nd sppp netgraph node type
.Sh SYNOPSIS
.In netgraph/ng_sppp.h
.Sh DESCRIPTION
An
2004-07-09 07:26:15 +00:00
.Nm sppp
2004-05-16 14:41:20 +00:00
node is a
.Xr netgraph 4
interface to the original
.Xr sppp 4
network module for synchronous lines.
2004-07-09 07:26:15 +00:00
Currently,
2004-05-16 14:41:20 +00:00
.Xr sppp 4
2004-07-09 07:26:15 +00:00
supports PPP and Cisco HDLC protocols.
2004-05-16 14:41:20 +00:00
An
2004-07-09 07:26:15 +00:00
.Nm sppp
node could be considered as an alternative kernel mode PPP
2004-05-16 14:41:20 +00:00
implementation to
2004-07-09 07:26:15 +00:00
.Pa net/mpd
port +
.Xr ng_ppp 4 ,
2004-05-16 14:41:20 +00:00
and as an alternative to
.Xr ng_cisco 4
node.
2004-07-09 07:26:15 +00:00
While having less features than
.Pa net/mpd
+
2004-05-16 14:41:20 +00:00
.Xr ng_ppp 4 ,
2004-07-09 07:26:15 +00:00
it is significantly easier to use in the majority of simple configurations,
and allows the administrator to not install the
.Pa net/mpd
port.
2004-05-16 14:41:20 +00:00
With
2004-07-09 07:26:15 +00:00
.Nm sppp
you do not need any other nodes, not even an
2004-05-16 14:41:20 +00:00
.Xr ng_iface 4
node.
When an
2004-07-09 07:26:15 +00:00
.Nm sppp
2004-05-16 14:41:20 +00:00
node is created, a new interface appears which is accessible via
.Xr ifconfig 8 .
2004-07-09 07:26:15 +00:00
Network interfaces corresponding to
.Nm sppp
nodes are named
.Li sppp0 , sppp1 ,
2004-05-16 14:41:20 +00:00
etc.
2004-07-09 07:26:15 +00:00
When a node is shut down, the corresponding interface is removed,
2004-05-16 14:41:20 +00:00
and the interface name becomes available for reuse by future
2004-07-09 07:26:15 +00:00
.Nm sppp
2004-05-16 14:41:20 +00:00
nodes.
New nodes always take the first unused interface.
The node itself is assigned the same name as its interface, unless the name
already exists, in which case the node remains unnamed.
The
2004-07-09 07:26:15 +00:00
.Nm sppp
node allows drivers written to the old
.Xr sppp 4
interface to be rewritten using the
2004-05-16 14:41:20 +00:00
newer more powerful
.Xr netgraph 4
2004-07-09 07:26:15 +00:00
interface, and still behave in a compatible manner without supporting both
2004-05-16 14:41:20 +00:00
network modules.
.Pp
An
2004-07-09 07:26:15 +00:00
.Nm sppp
node has a single hook named
.Va downstream .
Usually it is connected directly to
2004-05-16 14:41:20 +00:00
a device driver hook.
.Pp
2004-07-09 07:26:15 +00:00
The
.Nm sppp
nodes support the Berkeley Packet Filter,
.Xr bpf 4 .
2004-05-16 14:41:20 +00:00
.Sh HOOKS
This node type supports the following hooks:
2004-07-09 07:26:15 +00:00
.Bl -tag -width ".Va downstream"
.It Va downstream
2004-05-16 14:41:20 +00:00
The connection to the synchronous line.
.El
.Sh CONTROL MESSAGES
This node type supports the generic control messages, plus the following:
2004-07-09 07:26:15 +00:00
.Bl -tag -width indent
2004-05-16 14:41:20 +00:00
.It Dv NGM_IFACE_GET_IFNAME
2005-02-03 13:33:34 +00:00
Returns the name of the associated interface as a
.Dv NUL Ns -terminated
.Tn ASCII
string.
Normally this is the same as the name of the node.
2004-05-16 14:41:20 +00:00
.El
.Sh SHUTDOWN
This node shuts down upon receipt of a
.Dv NGM_SHUTDOWN
control message.
The associated interface is removed and becomes available
2004-05-16 14:41:20 +00:00
for use by future
2004-07-09 07:26:15 +00:00
.Nm sppp
2004-05-16 14:41:20 +00:00
nodes.
.Pp
Unlike most other node types and like
.Xr ng_iface 4
does, an
2004-07-09 07:26:15 +00:00
.Nm sppp
2004-05-16 14:41:20 +00:00
node does
.Em not
2004-07-09 07:26:15 +00:00
go away when all hooks have been disconnected; rather, an explicit
2004-05-16 14:41:20 +00:00
.Dv NGM_SHUTDOWN
control message is required.
.Sh EXAMPLES
2004-07-09 07:26:15 +00:00
For example, if you have the
.Xr cx 4
device, you could run PPP over it with just one command:
2004-05-16 14:41:20 +00:00
.Pp
2004-07-09 07:26:15 +00:00
.Dl "ngctl mkpeer cx0: sppp rawdata downstream"
2004-05-16 14:41:20 +00:00
.Pp
2004-07-09 07:26:15 +00:00
Now you have the
.Li sppp0
interface (if this was the first
.Nm sppp
node) which can be
accessed via
.Xr ifconfig 8
as a normal network interface,
2004-05-16 14:41:20 +00:00
or via
2004-07-09 07:26:15 +00:00
.Xr spppcontrol 8
as an
.Xr sppp 4
interface.
2004-05-16 14:41:20 +00:00
.Sh SEE ALSO
.Xr bpf 4 ,
.Xr cx 4 ,
2004-05-16 14:41:20 +00:00
.Xr netgraph 4 ,
.Xr ng_cisco 4 ,
.Xr ng_iface 4 ,
.Xr ng_ppp 4 ,
.Xr sppp 4 ,
2004-05-16 14:41:20 +00:00
.Xr ifconfig 8 ,
.Xr ngctl 8 ,
2004-05-16 14:41:20 +00:00
.Xr spppcontrol 8
.Pp
For complex networking topologies you may want to look at
.Pa net/mpd
port.
2004-05-16 14:41:20 +00:00
.Sh HISTORY
The
2004-07-09 07:26:15 +00:00
.Nm sppp
2004-05-16 14:41:20 +00:00
node type was implemented for
.Fx 5.0 .
It was included to the system since
2004-07-02 19:07:33 +00:00
.Fx 5.3 .
2004-07-09 07:26:15 +00:00
.Sh AUTHORS
Copyright (C) 2003-2004
.An Roman Kurakin Aq rik@cronyx.ru .