Deleted Added
full compact
ng_pppoe.4 (231564) ng_pppoe.4 (242997)
1.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
2.\" All rights reserved.
3.\"
4.\" Subject to the following obligations and disclaimer of warranty, use and
5.\" redistribution of this software, in source or object code forms, with or
6.\" without modifications are expressly permitted by Whistle Communications;
7.\" provided, however, that:
8.\" 1. Any and all reproductions of the source or object code must include the

--- 18 unchanged lines hidden (view full) ---

27.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
28.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
31.\" OF SUCH DAMAGE.
32.\"
33.\" Author: Archie Cobbs <archie@FreeBSD.org>
34.\"
1.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
2.\" All rights reserved.
3.\"
4.\" Subject to the following obligations and disclaimer of warranty, use and
5.\" redistribution of this software, in source or object code forms, with or
6.\" without modifications are expressly permitted by Whistle Communications;
7.\" provided, however, that:
8.\" 1. Any and all reproductions of the source or object code must include the

--- 18 unchanged lines hidden (view full) ---

27.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
28.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
31.\" OF SUCH DAMAGE.
32.\"
33.\" Author: Archie Cobbs <archie@FreeBSD.org>
34.\"
35.\" $FreeBSD: head/share/man/man4/ng_pppoe.4 231564 2012-02-12 18:29:56Z ed $
35.\" $FreeBSD: head/share/man/man4/ng_pppoe.4 242997 2012-11-13 20:41:36Z joel $
36.\" $Whistle: ng_pppoe.8,v 1.1 1999/01/25 23:46:27 archie Exp $
37.\"
36.\" $Whistle: ng_pppoe.8,v 1.1 1999/01/25 23:46:27 archie Exp $
37.\"
38.Dd December 27, 2007
38.Dd November 13, 2012
39.Dt NG_PPPOE 4
40.Os
41.Sh NAME
42.Nm ng_pppoe
43.Nd RFC 2516 PPPoE protocol netgraph node type
44.Sh SYNOPSIS
45.In sys/types.h
46.In net/ethernet.h

--- 15 unchanged lines hidden (view full) ---

62The only statistics presently available are the
63total packet counts for input and output.
64This node does not yet support
65the
66.Dv NGM_TEXT_STATUS
67control message.
68.Sh HOOKS
69This node type supports the following hooks:
39.Dt NG_PPPOE 4
40.Os
41.Sh NAME
42.Nm ng_pppoe
43.Nd RFC 2516 PPPoE protocol netgraph node type
44.Sh SYNOPSIS
45.In sys/types.h
46.In net/ethernet.h

--- 15 unchanged lines hidden (view full) ---

62The only statistics presently available are the
63total packet counts for input and output.
64This node does not yet support
65the
66.Dv NGM_TEXT_STATUS
67control message.
68.Sh HOOKS
69This node type supports the following hooks:
70.Bl -tag -width [unspecified]
71.It Dv ethernet
70.Bl -tag -width ".Va [unspecified]"
71.It Va ethernet
72The hook that should normally be connected to an
73.Xr ng_ether 4
74node.
75Once connected,
76.Nm
77will send a message down this hook to determine Ethernet address of
78the underlying node.
79Obtained address will be stored and then used for outgoing datagrams.
72The hook that should normally be connected to an
73.Xr ng_ether 4
74node.
75Once connected,
76.Nm
77will send a message down this hook to determine Ethernet address of
78the underlying node.
79Obtained address will be stored and then used for outgoing datagrams.
80.It Dv debug
80.It Va debug
81Presently no use.
81Presently no use.
82.It Dv [unspecified]
82.It Va [unspecified]
83Any other name is assumed to be a session hook that will be connected to
84a PPP client agent, or a PPP server agent.
85.El
86.Sh CONTROL MESSAGES
87This node type supports the generic control messages, plus the following:
88.Bl -tag -width 3n
89.It Dv NGM_PPPOE_GET_STATUS
90This command returns status information in a
91.Dv "struct ngpppoestat" :
92.Bd -literal -offset 4n
93struct ngpppoestat {
94 u_int packets_in; /* packets in from Ethernet */
95 u_int packets_out; /* packets out towards Ethernet */
96};
97.Ed
98.It Dv NGM_TEXT_STATUS
99This generic message returns a human-readable version of the node status.
100(not yet)
83Any other name is assumed to be a session hook that will be connected to
84a PPP client agent, or a PPP server agent.
85.El
86.Sh CONTROL MESSAGES
87This node type supports the generic control messages, plus the following:
88.Bl -tag -width 3n
89.It Dv NGM_PPPOE_GET_STATUS
90This command returns status information in a
91.Dv "struct ngpppoestat" :
92.Bd -literal -offset 4n
93struct ngpppoestat {
94 u_int packets_in; /* packets in from Ethernet */
95 u_int packets_out; /* packets out towards Ethernet */
96};
97.Ed
98.It Dv NGM_TEXT_STATUS
99This generic message returns a human-readable version of the node status.
100(not yet)
101.It Dv NGM_PPPOE_CONNECT
101.It Dv NGM_PPPOE_CONNECT Pq Ic pppoe_connect
102Tell a nominated newly created hook that its session should enter
103the state machine as a client.
104It must be newly created and a service name can be given as an argument.
105It is legal to specify a zero-length service name, this is common
106on some DSL setups.
107It is possible to request a connection to a specific
108access concentrator by its name using the "AC-Name\\Service-Name" syntax.
109A session request packet will be broadcasted on the Ethernet.
110This command uses the
111.Dv ngpppoe_init_data
112structure shown below.
102Tell a nominated newly created hook that its session should enter
103the state machine as a client.
104It must be newly created and a service name can be given as an argument.
105It is legal to specify a zero-length service name, this is common
106on some DSL setups.
107It is possible to request a connection to a specific
108access concentrator by its name using the "AC-Name\\Service-Name" syntax.
109A session request packet will be broadcasted on the Ethernet.
110This command uses the
111.Dv ngpppoe_init_data
112structure shown below.
113.It Dv NGM_PPPOE_LISTEN
113.It Dv NGM_PPPOE_LISTEN Pq Ic pppoe_listen
114Tell a nominated newly created hook that its session should enter
115the state machine as a server listener.
116The argument
117given is the name of the service to listen for.
118A zero-length service name will match all requests for service.
119A matching service request
120packet will be passed unmodified back to the process responsible
121for starting the service.
122It can then examine it and pass it on to
123the session that is started to answer the request.
124This command uses the
125.Dv ngpppoe_init_data
126structure shown below.
114Tell a nominated newly created hook that its session should enter
115the state machine as a server listener.
116The argument
117given is the name of the service to listen for.
118A zero-length service name will match all requests for service.
119A matching service request
120packet will be passed unmodified back to the process responsible
121for starting the service.
122It can then examine it and pass it on to
123the session that is started to answer the request.
124This command uses the
125.Dv ngpppoe_init_data
126structure shown below.
127.It Dv NGM_PPPOE_OFFER
127.It Dv NGM_PPPOE_OFFER Pq Ic pppoe_offer
128Tell a nominated newly created hook that its session should enter
129the state machine as a server.
130The argument given is the name of the service to offer.
131A zero-length service
132is legal.
133The State machine will progress to a state where it will await
134a request packet to be forwarded to it from the startup server,
135which in turn probably received it from a LISTEN mode hook (see above).

--- 7 unchanged lines hidden (view full) ---

143.Dv ngpppoe_init_data
144structure shown below.
145.El
146.Pp
147The three commands above use a common data structure:
148.Bd -literal -offset 4n
149struct ngpppoe_init_data {
150 char hook[NG_HOOKSIZ]; /* hook to monitor on */
128Tell a nominated newly created hook that its session should enter
129the state machine as a server.
130The argument given is the name of the service to offer.
131A zero-length service
132is legal.
133The State machine will progress to a state where it will await
134a request packet to be forwarded to it from the startup server,
135which in turn probably received it from a LISTEN mode hook (see above).

--- 7 unchanged lines hidden (view full) ---

143.Dv ngpppoe_init_data
144structure shown below.
145.El
146.Pp
147The three commands above use a common data structure:
148.Bd -literal -offset 4n
149struct ngpppoe_init_data {
150 char hook[NG_HOOKSIZ]; /* hook to monitor on */
151 uint16_t data_len; /* service name length */
151 uint16_t data_len; /* length of the service name */
152 char data[0]; /* init data goes here */
153};
154.Ed
155.Bl -tag -width 3n
152 char data[0]; /* init data goes here */
153};
154.Ed
155.Bl -tag -width 3n
156.It Dv NGM_PPPOE_SUCCESS
156.It Dv NGM_PPPOE_SUCCESS Pq Ic pppoe_success
157This command is sent to the node that started this session with one of the
158above messages, and reports a state change.
159This message reports successful Session negotiation.
160It uses the structure shown below, and
161reports back the hook name corresponding to the successful session.
157This command is sent to the node that started this session with one of the
158above messages, and reports a state change.
159This message reports successful Session negotiation.
160It uses the structure shown below, and
161reports back the hook name corresponding to the successful session.
162.It Dv NGM_PPPOE_FAIL
162.It Dv NGM_PPPOE_FAIL Pq Ic pppoe_fail
163This command is sent to the node that started this session with one of the
164above messages, and reports a state change.
165This message reports failed Session negotiation.
166It uses the structure shown below, and
167reports back the hook name corresponding to the failed session.
168The hook will probably have been removed immediately after sending this
169message.
163This command is sent to the node that started this session with one of the
164above messages, and reports a state change.
165This message reports failed Session negotiation.
166It uses the structure shown below, and
167reports back the hook name corresponding to the failed session.
168The hook will probably have been removed immediately after sending this
169message.
170.It Dv NGM_PPPOE_CLOSE
170.It Dv NGM_PPPOE_CLOSE Pq Ic pppoe_close
171This command is sent to the node that started this session with one of the
172above messages, and reports a state change.
173This message reports a request to close a session.
174It uses the structure shown below, and
175reports back the hook name corresponding to the closed session.
176The hook will probably have been removed immediately after sending this
177message.
178At present this message is not yet used and a

--- 7 unchanged lines hidden (view full) ---

186.Pp
187The four commands above use a common data structure:
188.Bd -literal -offset 4n
189struct ngpppoe_sts {
190 char hook[NG_HOOKSIZ]; /* hook associated with event session */
191};
192.Ed
193.Bl -tag -width 3n
171This command is sent to the node that started this session with one of the
172above messages, and reports a state change.
173This message reports a request to close a session.
174It uses the structure shown below, and
175reports back the hook name corresponding to the closed session.
176The hook will probably have been removed immediately after sending this
177message.
178At present this message is not yet used and a

--- 7 unchanged lines hidden (view full) ---

186.Pp
187The four commands above use a common data structure:
188.Bd -literal -offset 4n
189struct ngpppoe_sts {
190 char hook[NG_HOOKSIZ]; /* hook associated with event session */
191};
192.Ed
193.Bl -tag -width 3n
194.It Dv NGM_PPPOE_GETMODE
194.It Dv NGM_PPPOE_GETMODE Pq Ic pppoe_getmode
195This command returns the current compatibility mode of the node
196as a string.
197.Tn ASCII
198form of this message is
199.Qq Li pppoe_getmode .
200The following keywords can be returned:
201.Bl -tag -width 3n
202.It Qq standard

--- 13 unchanged lines hidden (view full) ---

216.Nm
217is a PPPoE server serving only specific Service-Name(s), it will respond
218to a PADI requests with empty Service-Name tag, returning all available
219Service-Name(s) on node.
220This option is necessary for compatibility with D-Link DI-614+ and DI-624+
221SOHO routers as clients, when serving only specific Service-Name.
222This compatibility option does not affect client mode.
223.El
195This command returns the current compatibility mode of the node
196as a string.
197.Tn ASCII
198form of this message is
199.Qq Li pppoe_getmode .
200The following keywords can be returned:
201.Bl -tag -width 3n
202.It Qq standard

--- 13 unchanged lines hidden (view full) ---

216.Nm
217is a PPPoE server serving only specific Service-Name(s), it will respond
218to a PADI requests with empty Service-Name tag, returning all available
219Service-Name(s) on node.
220This option is necessary for compatibility with D-Link DI-614+ and DI-624+
221SOHO routers as clients, when serving only specific Service-Name.
222This compatibility option does not affect client mode.
223.El
224.It Dv NGM_PPPOE_SETMODE
224.It Dv NGM_PPPOE_SETMODE Pq Ic pppoe_setmode
225Configure node to the specified mode.
226The string argument is required.
227This command understands the same keywords that are returned by the
228.Dv NGM_PPPOE_GETMODE
229command.
230.Tn ASCII
231form of this message is
232.Qq Li pppoe_setmode .
233For example, the following command will configure the node to initiate
234the next session in the proprietary 3Com mode:
235.Bd -literal -offset indent
236ngctl msg fxp0:orphans pppoe_setmode '"3Com"'
237.Ed
225Configure node to the specified mode.
226The string argument is required.
227This command understands the same keywords that are returned by the
228.Dv NGM_PPPOE_GETMODE
229command.
230.Tn ASCII
231form of this message is
232.Qq Li pppoe_setmode .
233For example, the following command will configure the node to initiate
234the next session in the proprietary 3Com mode:
235.Bd -literal -offset indent
236ngctl msg fxp0:orphans pppoe_setmode '"3Com"'
237.Ed
238.It Dv NGM_PPPOE_SETENADDR
238.It Dv NGM_PPPOE_SETENADDR Pq Ic setenaddr
239Set the node Ethernet address for outgoing datagrams.
240This message is important when a node has failed to obtain an Ethernet
241address from its peer on the
242.Dv ethernet
243hook, or when user wants to override this address with another one.
244.Tn ASCII
245form of this message is
246.Qq Li setenaddr .

--- 261 unchanged lines hidden ---
239Set the node Ethernet address for outgoing datagrams.
240This message is important when a node has failed to obtain an Ethernet
241address from its peer on the
242.Dv ethernet
243hook, or when user wants to override this address with another one.
244.Tn ASCII
245form of this message is
246.Qq Li setenaddr .

--- 261 unchanged lines hidden ---