Lines Matching refs: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 */
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::
392 /* Note, the tunnel socket must be bound already, else it
406 /* session_fd is the fd of the session's PPPoL2TP socket.
407 * tunnel_fd is the fd of the tunnel UDP / L2TPIP socket.
421 only PPPoL2TP sockets. The PPPoL2TP socket is used as described in
423 are automatically created on a connect() of the socket instead of
426 - Tunnels are managed using a tunnel management socket which is a
427 dedicated PPPoL2TP socket, connected to (invalid) session
429 tunnel management socket is connected and is destroyed when the
430 socket is closed.
433 socket is connected to a non-zero session id. Session parameters
435 when the socket is closed.
439 session, then create a PPPoL2TP socket for the session.
445 tunnels. Unmanaged tunnels have no userspace tunnel socket, and
449 userspace application in this case -- the tunnel socket is created by
495 tunnel is created using a UDP socket, the socket is set up as an
496 encapsulated UDP socket by setting encap_rcv and encap_destroy
497 callbacks on the UDP socket. l2tp_udp_encap_recv is called when
498 packets are received on the socket. l2tp_udp_encap_destroy is called
499 when userspace closes the socket.
508 l2tp_tunnel is always associated with a UDP or L2TP/IP socket and
510 registered with L2TP core, the reference count on the socket is
511 increased. This ensures that the socket cannot be removed while L2TP's
520 derived from the socket's sk_user_data.
522 Handling tunnel socket close is perhaps the most tricky part of the
523 L2TP implementation. If userspace closes a tunnel socket, the L2TP
525 tunnel context holds a ref on the tunnel socket, the socket's
527 socket. For UDP sockets, when userspace closes the tunnel socket, the
528 socket's encap_destroy handler is invoked, which L2TP uses to initiate
529 its tunnel close actions. For L2TPIP sockets, the socket's close
532 reaches zero, the tunnel puts its socket ref. When the socket is
546 Some L2TP session types also have a socket (PPP pseudowires) while
548 socket reference count as the reference count for session
566 the tunnel socket.
572 tunnel can be identified using the tunnel socket's sk_user_data and
579 `net/l2tp/l2tp_ppp.c`_ implements the PPPoL2TP socket family. Each PPP
580 session has a PPPoL2TP socket.
582 The PPPoL2TP socket's sk_user_data references the l2tp_session.
585 socket. Only PPP control frames pass over this socket: PPP data
590 The L2TP PPP implementation handles the closing of a PPPoL2TP socket
595 ref on their associated socket, so code must be careful to sock_hold
596 the socket where necessary. For all the details, see commit
607 Ethernet sessions do not have an associated socket.
643 data associated with the socket so it is important that each
644 socket is uniquely identified by its address.