Lines Matching +full:attribute +full:- +full:sets

1 .. SPDX-License-Identifier: GPL-2.0
58 --------------
93 -----------
102 netlink attribute types that can be used with each command.
105 32-bit id. L2TP tunnel ids are given by ``L2TP_ATTR_CONN_ID`` and
109 instances, the L2TPv2 16-bit tunnel/session id is cast to a 32-bit
122 ``L2TP_CMD_TUNNEL_CREATE`` attributes:-
125 Attribute Required Use
127 CONN_ID Y Sets the tunnel (connection) id.
128 PEER_CONN_ID Y Sets the peer tunnel (connection) id.
152 ``L2TP_CMD_TUNNEL_DESTROY`` attributes:-
155 Attribute Required Use
160 ``L2TP_CMD_TUNNEL_MODIFY`` attributes:-
163 Attribute Required Use
169 ``L2TP_CMD_TUNNEL_GET`` attributes:-
172 Attribute Required Use
178 ``L2TP_CMD_SESSION_CREATE`` attributes:-
181 Attribute Required Use
184 SESSION_ID Y Sets the session id.
185 PEER_SESSION_ID Y Sets the parent session id.
186 PW_TYPE Y Sets the pseudowire type.
190 LNS_MODE N Enable LNS mode (auto-enable data sequence
194 L2SPEC_TYPE N Sets layer2-specific-sublayer type (L2TPv3
196 COOKIE N Sets optional cookie (L2TPv3 only).
197 PEER_COOKIE N Sets optional peer cookie (L2TPv3 only).
198 IFNAME N Sets interface name (L2TPv3 only).
206 ``L2TP_CMD_SESSION_DESTROY`` attributes:-
209 Attribute Required Use
220 ``L2TP_CMD_SESSION_MODIFY`` attributes:-
223 Attribute Required Use
235 LNS_MODE N Enable LNS mode (auto-enable data sequence
241 ``L2TP_CMD_SESSION_GET`` attributes:-
244 Attribute Required Use
258 netlink command and attribute definitions.
262 - Open L2TP netlink socket::
271 - Create a tunnel::
277 nlh->nlmsg_type = genl_id; /* assigned to genl socket */
278 nlh->nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK;
279 nlh->nlmsg_seq = seq;
282 gnlh->cmd = L2TP_CMD_TUNNEL_CREATE;
283 gnlh->version = L2TP_GENL_VERSION;
284 gnlh->reserved = 0;
292 - Create a session::
298 nlh->nlmsg_type = genl_id; /* assigned to genl socket */
299 nlh->nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK;
300 nlh->nlmsg_seq = seq;
303 gnlh->cmd = L2TP_CMD_SESSION_CREATE;
304 gnlh->version = L2TP_GENL_VERSION;
305 gnlh->reserved = 0;
313 * attributes during session creation -- see l2tp.h
316 - Delete a session::
322 nlh->nlmsg_type = genl_id; /* assigned to genl socket */
323 nlh->nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK;
324 nlh->nlmsg_seq = seq;
327 gnlh->cmd = L2TP_CMD_SESSION_DELETE;
328 gnlh->version = L2TP_GENL_VERSION;
329 gnlh->reserved = 0;
334 - Delete a tunnel and all of its sessions (if any)::
340 nlh->nlmsg_type = genl_id; /* assigned to genl socket */
341 nlh->nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK;
342 nlh->nlmsg_seq = seq;
345 gnlh->cmd = L2TP_CMD_TUNNEL_DELETE;
346 gnlh->version = L2TP_GENL_VERSION;
347 gnlh->reserved = 0;
352 ---------------------------
368 options are supported:-
372 SENDSEQ - 0 => don't send packets with sequence numbers
373 - 1 => send packets with sequence numbers
374 RECVSEQ - 0 => receive packet sequence numbers are optional
375 - 1 => drop receive packets without sequence numbers
376 LNSMODE - 0 => act as LAC.
377 - 1 => act as LNS.
387 - Create session PPPoX data socket::
398 sax.pppol2tp.addr.sin_addr.s_addr = addr->sin_addr.s_addr;
399 sax.pppol2tp.addr.sin_port = addr->sin_port;
411 return -errno;
415 Old L2TPv2-only API
416 -------------------
426 - Tunnels are managed using a tunnel management socket which is a
432 - Session instances are created in the kernel when a PPPoL2TP
433 socket is connected to a non-zero session id. Session parameters
442 ------------------------
449 userspace application in this case -- the tunnel socket is created by
456 ---------
463 # mount -t debugfs debugfs /debug
492 -------
505 -------
514 Tunnels are identified by a unique tunnel id. The id is 16-bit for
515 L2TPv2 and 32-bit for L2TPv3. Internally, the id is stored as a 32-bit
518 Tunnels are kept in a per-net list, indexed by tunnel id. The tunnel
537 --------
553 session id. Just as with tunnel ids, the session id is 16-bit for
554 L2TPv2 and 32-bit for L2TPv3. Internally, the id is stored as a 32-bit
560 Sessions are kept in a per-tunnel list, indexed by session id. L2TPv3
561 sessions are also kept in a per-net list indexed by session id,
571 per-net session list. In the UDP receive code, we must trust that the
573 lookup the session in the tunnel's session list instead of the per-net
577 ---
600 --------
613 ----
625 ---------------
631 go-l2tp https://github.com/katalix/go-l2tp
637 -----------
641 1) Multiple UDP sockets with the same 5-tuple address cannot be
650 configured with a VLAN sub-interface. Since L2TPv3 VLAN
653 pair per VLAN session. The netlink attribute
658 -------
660 Unmanaged L2TPv3 Ethernet features are tested by the kernel's built-in
663 Another test suite, l2tp-ktest_, covers all
665 the kernel's built-in L2TP selftests in the future.
677 .. _l2tp-ktest: https://github.com/katalix/l2tp-ktest