Lines Matching full:socket

28 associated with a socket. Each session is associated with a virtual
40 1) Create a tunnel socket. Exchange L2TP control protocol messages
41 with the peer over that socket in order to establish a tunnel.
47 tunnel socket in order to establish a session.
62 To create a tunnel socket for use by L2TP, the standard POSIX
63 socket API is used.
67 int sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
71 int sockfd = socket(AF_INET6, SOCK_DGRAM, IPPROTO_L2TP);
73 UDP socket programming doesn't need to be covered here.
76 subsystem. The L2TPIP socket address is defined in struct
80 should bind the L2TPIP socket using the locally assigned
86 socket to listen for those requests and bind the socket using tunnel
90 its tunnel socket is closed.
113 kernel the tunnel socket fd being used. If not specified, the kernel
114 creates a kernel socket for the tunnel, using IP parameters set in
118 l2tp" commands). If ``L2TP_ATTR_FD`` is given, it must be a socket fd
131 FD N Tunnel socket file descriptor.
203 types, a PPPoL2TP socket must also be opened and connected, mapping it
262 - Open L2TP netlink socket::
277 nlh->nlmsg_type = genl_id; /* assigned to genl socket */
298 nlh->nlmsg_type = genl_id; /* assigned to genl socket */
322 nlh->nlmsg_type = genl_id; /* assigned to genl socket */
340 nlh->nlmsg_type = genl_id; /* assigned to genl socket */
351 PPPoL2TP Session Socket API
354 For PPP session types, a PPPoL2TP socket must be opened and connected
358 to the kernel about the tunnel and session in a socket connect()
360 well as the file descriptor of a UDP or L2TPIP socket. See struct
364 structure that matches the tunnel socket type.
367 setsockopt and ioctl on the PPPoX socket. The following socket
383 PPPoX socket of the appropriate tunnel or session.
387 - Create session PPPoX data socket::
389 /* Input: the L2TP tunnel UDP socket `tunnel_fd`, which needs to be
398 session_fd = socket(AF_PPPOX, SOCK_DGRAM, PX_PROTO_OL2TP);
413 /* session_fd is the fd of the session's PPPoL2TP socket.
414 * tunnel_fd is the fd of the tunnel UDP / L2TPIP socket.
428 /* Input: the session PPPoX data socket `session_fd` which was created
544 only PPPoL2TP sockets. The PPPoL2TP socket is used as described in
545 section "PPPoL2TP Session Socket API" but tunnel and session instances
546 are automatically created on a connect() of the socket instead of
549 - Tunnels are managed using a tunnel management socket which is a
550 dedicated PPPoL2TP socket, connected to (invalid) session
552 tunnel management socket is connected and is destroyed when the
553 socket is closed.
556 socket is connected to a non-zero session id. Session parameters
558 when the socket is closed.
562 session, then create a PPPoL2TP socket for the session.
568 tunnels. Unmanaged tunnels have no userspace tunnel socket, and
572 userspace application in this case -- the tunnel socket is created by
618 tunnel is created using a UDP socket, the socket is set up as an
619 encapsulated UDP socket by setting encap_rcv and encap_destroy
620 callbacks on the UDP socket. l2tp_udp_encap_recv is called when
621 packets are received on the socket. l2tp_udp_encap_destroy is called
622 when userspace closes the socket.
631 l2tp_tunnel is always associated with a UDP or L2TP/IP socket and
633 registered with L2TP core, the reference count on the socket is
634 increased. This ensures that the socket cannot be removed while L2TP's
644 Handling tunnel socket close is perhaps the most tricky part of the
645 L2TP implementation. If userspace closes a tunnel socket, the L2TP
647 tunnel context holds a ref on the tunnel socket, the socket's
649 socket. For UDP sockets, when userspace closes the tunnel socket, the
650 socket's encap_destroy handler is invoked, which L2TP uses to initiate
651 its tunnel close actions. For L2TPIP sockets, the socket's close
654 reaches zero, the tunnel drops its socket ref.
666 Some L2TP session types also have a socket (PPP pseudowires) while
694 `net/l2tp/l2tp_ppp.c`_ implements the PPPoL2TP socket family. Each PPP
695 session has a PPPoL2TP socket.
697 The PPPoL2TP socket's sk_user_data references the l2tp_session.
700 socket. Only PPP control frames pass over this socket: PPP data
705 The L2TP PPP implementation handles the closing of a PPPoL2TP socket
710 socket in order that the socket remains extants while the session
721 Ethernet sessions do not have an associated socket.