Deleted Added
full compact
ng_l2tp.4 (231564) ng_l2tp.4 (242997)
1.\" Copyright (c) 2001-2002 Packet Design, LLC.
2.\" All rights reserved.
3.\"
4.\" Subject to the following obligations and disclaimer of warranty,
5.\" use and redistribution of this software, in source or object code
6.\" forms, with or without modifications are expressly permitted by
7.\" Packet Design; provided, however, that:
8.\"

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

30.\" USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY THEORY OF
31.\" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
33.\" THE USE OF THIS SOFTWARE, EVEN IF PACKET DESIGN IS ADVISED OF
34.\" THE POSSIBILITY OF SUCH DAMAGE.
35.\"
36.\" Author: Archie Cobbs <archie@FreeBSD.org>
37.\"
1.\" Copyright (c) 2001-2002 Packet Design, LLC.
2.\" All rights reserved.
3.\"
4.\" Subject to the following obligations and disclaimer of warranty,
5.\" use and redistribution of this software, in source or object code
6.\" forms, with or without modifications are expressly permitted by
7.\" Packet Design; provided, however, that:
8.\"

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

30.\" USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY THEORY OF
31.\" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
33.\" THE USE OF THIS SOFTWARE, EVEN IF PACKET DESIGN IS ADVISED OF
34.\" THE POSSIBILITY OF SUCH DAMAGE.
35.\"
36.\" Author: Archie Cobbs <archie@FreeBSD.org>
37.\"
38.\" $FreeBSD: head/share/man/man4/ng_l2tp.4 231564 2012-02-12 18:29:56Z ed $
38.\" $FreeBSD: head/share/man/man4/ng_l2tp.4 242997 2012-11-13 20:41:36Z joel $
39.\"
39.\"
40.Dd August 2, 2004
40.Dd November 13, 2012
41.Dt NG_L2TP 4
42.Os
43.Sh NAME
44.Nm ng_l2tp
45.Nd L2TP protocol netgraph node type
46.Sh SYNOPSIS
47.In sys/types.h
48.In netgraph/ng_l2tp.h

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

54This includes adding the L2TP packet header for outgoing packets
55and verifying and removing it for incoming packets.
56The node maintains the L2TP sequence number state and handles
57control session packet acknowledgment and retransmission.
58.Sh HOOKS
59The
60.Nm l2tp
61node type supports the following hooks:
41.Dt NG_L2TP 4
42.Os
43.Sh NAME
44.Nm ng_l2tp
45.Nd L2TP protocol netgraph node type
46.Sh SYNOPSIS
47.In sys/types.h
48.In netgraph/ng_l2tp.h

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

54This includes adding the L2TP packet header for outgoing packets
55and verifying and removing it for incoming packets.
56The node maintains the L2TP sequence number state and handles
57control session packet acknowledgment and retransmission.
58.Sh HOOKS
59The
60.Nm l2tp
61node type supports the following hooks:
62.Pp
63.Bl -tag -compact -offset indent -width ".Dv session_hhhh"
64.It Dv lower
62.Bl -tag -width ".Va session_hhhh"
63.It Va lower
65L2TP frames.
64L2TP frames.
66.It Dv ctrl
65.It Va ctrl
67Control packets.
66Control packets.
68.It Dv session_hhhh
67.It Va session_hhhh
69Session 0xhhhh data packets.
70.El
71.Pp
72L2TP control and data packets are transmitted to, and received from,
73the L2TP peer via the
74.Dv lower
75hook.
76Typically this hook would be connected to the

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

99Once an L2TP session has been created, the corresponding session
100hook may be used to transmit and receive the session's data frames:
101for the session with session ID
102.Dv 0xabcd ,
103the hook is named
104.Dv session_abcd .
105.Sh CONTROL MESSAGES
106This node type supports the generic control messages, plus the following:
68Session 0xhhhh data packets.
69.El
70.Pp
71L2TP control and data packets are transmitted to, and received from,
72the L2TP peer via the
73.Dv lower
74hook.
75Typically this hook would be connected to the

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

98Once an L2TP session has been created, the corresponding session
99hook may be used to transmit and receive the session's data frames:
100for the session with session ID
101.Dv 0xabcd ,
102the hook is named
103.Dv session_abcd .
104.Sh CONTROL MESSAGES
105This node type supports the generic control messages, plus the following:
107.Bl -tag -width indent
108.It Dv NGM_L2TP_SET_CONFIG
106.Bl -tag -width foo
107.It Dv NGM_L2TP_SET_CONFIG Pq Ic setconfig
109This command updates the configuration of the node.
110It takes a
111.Vt "struct ng_l2tp_config"
112as an argument:
113.Bd -literal
114/* Configuration for a node */
115struct ng_l2tp_config {
116 u_char enabled; /* enables traffic flow */

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

177The
178.Va rexmit_max
179sets the maximum number of times a packet will be retransmitted
180without being acknowledged before a failure condition is declared.
181Once a failure condition is declared, each additional retransmission
182will cause the
183.Nm l2tp
184node to send a
108This command updates the configuration of the node.
109It takes a
110.Vt "struct ng_l2tp_config"
111as an argument:
112.Bd -literal
113/* Configuration for a node */
114struct ng_l2tp_config {
115 u_char enabled; /* enables traffic flow */

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

176The
177.Va rexmit_max
178sets the maximum number of times a packet will be retransmitted
179without being acknowledged before a failure condition is declared.
180Once a failure condition is declared, each additional retransmission
181will cause the
182.Nm l2tp
183node to send a
185.Dv NGM_L2TP_ACK_FAILURE
184.Dv NGM_L2TP_ACK_FAILURE Pq Ic ackfailure
186control message back to the node that sent the last
187.Dv NGM_L2TP_SET_CONFIG .
188Appropriate action should then be taken to shutdown the control connection.
185control message back to the node that sent the last
186.Dv NGM_L2TP_SET_CONFIG .
187Appropriate action should then be taken to shutdown the control connection.
189.It Dv NGM_L2TP_GET_CONFIG
188.It Dv NGM_L2TP_GET_CONFIG Pq Ic getconfig
190Returns the current configuration as a
191.Vt "struct ng_l2tp_config" .
189Returns the current configuration as a
190.Vt "struct ng_l2tp_config" .
192.It Dv NGM_L2TP_SET_SESS_CONFIG
191.It Dv NGM_L2TP_SET_SESS_CONFIG Pq Ic setsessconfig
193This control message configures a single data session.
194The corresponding hook must already be connected before sending this command.
195The argument is a
196.Vt "struct ng_l2tp_sess_config" :
197.Bd -literal
198/* Configuration for a session hook */
199struct ng_l2tp_sess_config {
200 uint16_t session_id; /* local session id */
201 uint16_t peer_id; /* peer's session id */
192This control message configures a single data session.
193The corresponding hook must already be connected before sending this command.
194The argument is a
195.Vt "struct ng_l2tp_sess_config" :
196.Bd -literal
197/* Configuration for a session hook */
198struct ng_l2tp_sess_config {
199 uint16_t session_id; /* local session id */
200 uint16_t peer_id; /* peer's session id */
202 u_char control_dseq; /* we control data sequencing? */
203 u_char enable_dseq; /* enable data sequencing? */
204 u_char include_length; /* include length field? */
201 u_char control_dseq; /* whether we control data sequencing */
202 u_char enable_dseq; /* whether to enable data sequencing */
203 u_char include_length; /* whether to include length field */
205};
206.Ed
207.Pp
208The
209.Va session_id
210and
211.Va peer_id
212fields configure the local and remote session IDs, respectively.

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

251to zero (if the Sequencing Required AVP were not sent), thus giving
252control of data packet sequencing to the LNS.
253.Pp
254The
255.Va include_length
256field determines whether the L2TP header length field is included
257in outgoing L2TP data packets.
258For incoming packets, the L2TP length field is always checked when present.
204};
205.Ed
206.Pp
207The
208.Va session_id
209and
210.Va peer_id
211fields configure the local and remote session IDs, respectively.

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

250to zero (if the Sequencing Required AVP were not sent), thus giving
251control of data packet sequencing to the LNS.
252.Pp
253The
254.Va include_length
255field determines whether the L2TP header length field is included
256in outgoing L2TP data packets.
257For incoming packets, the L2TP length field is always checked when present.
259.It Dv NGM_L2TP_GET_SESS_CONFIG
258.It Dv NGM_L2TP_GET_SESS_CONFIG Pq Ic getsessconfig
260This command takes a two byte session ID as an argument and returns
261the current configuration for the corresponding data session as a
262.Vt "struct ng_l2tp_sess_config" .
263The corresponding session hook must be connected.
259This command takes a two byte session ID as an argument and returns
260the current configuration for the corresponding data session as a
261.Vt "struct ng_l2tp_sess_config" .
262The corresponding session hook must be connected.
264.It Dv NGM_L2TP_GET_STATS
263.It Dv NGM_L2TP_GET_STATS Pq Ic getstats
265This command returns a
266.Vt "struct ng_l2tp_stats"
267containing statistics of the L2TP tunnel.
264This command returns a
265.Vt "struct ng_l2tp_stats"
266containing statistics of the L2TP tunnel.
268.It Dv NGM_L2TP_CLR_STATS
267.It Dv NGM_L2TP_CLR_STATS Pq Ic clrstats
269This command clears the statistics for the L2TP tunnel.
268This command clears the statistics for the L2TP tunnel.
270.It Dv NGM_L2TP_GETCLR_STATS
269.It Dv NGM_L2TP_GETCLR_STATS Pq Ic getclrstats
271Same as
272.Dv NGM_L2TP_GET_STATS ,
273but also atomically clears the statistics as well.
270Same as
271.Dv NGM_L2TP_GET_STATS ,
272but also atomically clears the statistics as well.
274.It Dv NGM_L2TP_GET_SESSION_STATS
273.It Dv NGM_L2TP_GET_SESSION_STATS Pq Ic getsessstats
275This command takes a two byte session ID as an argument and returns a
276.Vt "struct ng_l2tp_session_stats"
277containing statistics for the corresponding data session.
278The corresponding session hook must be connected.
274This command takes a two byte session ID as an argument and returns a
275.Vt "struct ng_l2tp_session_stats"
276containing statistics for the corresponding data session.
277The corresponding session hook must be connected.
279.It Dv NGM_L2TP_CLR_SESSION_STATS
278.It Dv NGM_L2TP_CLR_SESSION_STATS Pq Ic clrsessstats
280This command takes a two byte session ID as an argument and
281clears the statistics for that data session.
282The corresponding session hook must be connected.
279This command takes a two byte session ID as an argument and
280clears the statistics for that data session.
281The corresponding session hook must be connected.
283.It Dv NGM_L2TP_GETCLR_SESSION_STATS
282.It Dv NGM_L2TP_GETCLR_SESSION_STATS Pq Ic getclrsessstats
284Same as
285.Dv NGM_L2TP_GET_SESSION_STATS ,
286but also atomically clears the statistics as well.
283Same as
284.Dv NGM_L2TP_GET_SESSION_STATS ,
285but also atomically clears the statistics as well.
287.It Dv NGM_L2TP_SET_SEQ
286.It Dv NGM_L2TP_SET_SEQ Pq Ic setsequence
288This command sets the sequence numbers of a not yet enabled node.
289It takes a
290.Vt "struct ng_l2tp_seq_config"
291as argument, where
292.Va xack
293and
294.Va nr
295respectively

--- 35 unchanged lines hidden ---
287This command sets the sequence numbers of a not yet enabled node.
288It takes a
289.Vt "struct ng_l2tp_seq_config"
290as argument, where
291.Va xack
292and
293.Va nr
294respectively

--- 35 unchanged lines hidden ---