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::
400 return -errno;
405 sax.pppol2tp.addr.sin_addr.s_addr = addr->sin_addr.s_addr;
406 sax.pppol2tp.addr.sin_port = addr->sin_port;
419 return -errno;
426 - Create PPP channel::
438 return -errno;
442 return -errno;
447 return -errno;
454 - Create PPP interface::
460 int ifunit = -1;
466 return -errno;
471 return -errno;
477 return -errno;
488 - Bridging L2TP sessions which have PPP pseudowire types (this is also called
503 return -errno;
507 return -errno;
511 return -errno;
516 return -errno;
522 return -errno;
538 Old L2TPv2-only API
539 -------------------
549 - Tunnels are managed using a tunnel management socket which is a
555 - Session instances are created in the kernel when a PPPoL2TP
556 socket is connected to a non-zero session id. Session parameters
565 ------------------------
572 userspace application in this case -- the tunnel socket is created by
579 ---------
586 # mount -t debugfs debugfs /debug
615 -------
628 -------
637 Tunnels are identified by a unique tunnel id. The id is 16-bit for
638 L2TPv2 and 32-bit for L2TPv3. Internally, the id is stored as a 32-bit
641 Tunnels are kept in a per-net list, indexed by tunnel id. The
657 --------
670 session id. Just as with tunnel ids, the session id is 16-bit for
671 L2TPv2 and 32-bit for L2TPv3. Internally, the id is stored as a 32-bit
677 Sessions are kept in a per-net list. L2TPv2 sessions and L2TPv3
679 by a 32-bit key made up of the 16-bit tunnel ID and 16-bit
680 session ID. L2TPv3 sessions are keyed by the 32-bit session ID, since
685 allowed this. Such session id collisions are supported using a per-net
692 ---
714 --------
727 ----
739 ---------------
745 go-l2tp https://github.com/katalix/go-l2tp
751 -----------
759 configured with a VLAN sub-interface. Since L2TPv3 VLAN
762 pair per VLAN session. The netlink attribute
767 -------
769 Unmanaged L2TPv3 Ethernet features are tested by the kernel's built-in
772 Another test suite, l2tp-ktest_, covers all
774 the kernel's built-in L2TP selftests in the future.
786 .. _l2tp-ktest: https://github.com/katalix/l2tp-ktest