Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

__skb_recv_datagram(9) [suse man page]

__SKB_RECV_DATAGRAM(9)						 Linux Networking					    __SKB_RECV_DATAGRAM(9)

NAME
__skb_recv_datagram - Receive a datagram skbuff SYNOPSIS
struct sk_buff * __skb_recv_datagram(struct sock * sk, unsigned flags, int * peeked, int * err); ARGUMENTS
sk socket flags MSG_ flags peeked returns non-zero if this packet has been seen before err error code returned DESCRIPTION
Get a datagram skbuff, understands the peeking, nonblocking wakeups and possible races. This replaces identical code in packet, raw and udp, as well as the IPX AX.25 and Appletalk. It also finally fixes the long standing peek and read race for datagram sockets. If you alter this routine remember it must be re-entrant. This function will lock the socket if a skb is returned, so the caller needs to unlock the socket in that case (usually by calling skb_free_datagram) * It does not lock socket since today. This function is * free of race conditions. This measure should/can improve * significantly datagram socket latencies at high loads, * when data copying to user space takes lots of time. * (BTW I've just killed the last cli in IP/IPv6/core/netlink/packet * 8) Great win.) * --ANK (980729) The order of the tests when we find no data waiting are specified quite explicitly by POSIX 1003.1g, don't change them without having the standard around please. COPYRIGHT
Kernel Hackers Manual 2.6. July 2010 __SKB_RECV_DATAGRAM(9)

Check Out this Related Man Page

CLNP(4) 						   BSD Kernel Interfaces Manual 						   CLNP(4)

NAME
clnp -- Connectionless-Mode Network Protocol SYNOPSIS
#include <sys/socket.h> #include <netiso/iso.h> #include <netiso/clnp.h> int socket(AF_ISO, SOCK_RAW, 0); DESCRIPTION
CLNP is the connectionless-mode network protocol used by the connectionless-mode network service. This protocol is specified in ISO 8473. It may be accessed through a ``raw socket'' for debugging purposes only. CLNP sockets are connectionless, and are normally used with the sendto(2) and recvfrom(2) system calls, though the connect(2) call may also be used to fix the destination for future packets (in which case the read(2) or recv(2) and write(2) or send(2) system calls may be used). Outgoing packets automatically have a CLNP header prepended to them. Incoming packets received by the user contain the full CLNP header. The following setsockopt(2) options apply to CLNP: CLNPOPT_FLAGS Sets the flags which are passed to clnp when sending a datagram. Valid flags are: CLNP_NO_SEG Do not allow segmentation CLNP_NO_ER Suppress ER pdus CLNP_NO_CKSUM Do not generate the CLNP checksum CLNPOPT_OPTS Sets CLNP options. The options must be formatted exactly as specified by ISO 8473, section 7.5 ``Options Part''. Once an option has been set, it will be sent on all packets until a different option is set. CONGESTION EXPERIENCE BIT
Whenever a packet is transmitted, the globally unique quality of service option is added to the packet. The sequencing preferred bit and the low transit delay bit are set in this option. If a packet is forwarded containing the globally unique quality of service option, and the interface through which the packet will be trans- mitted has a queue length greater than congest_threshold, then the congestion experienced bit is set in the quality of service option. The threshold value stored in congest_threshold may be tuned. When a packet is received with the globally unique quality of service option present, and the congestion experienced bit is set, then the transport congestion control function is called. DIAGNOSTICS
A socket operation may fail with one of the following errors returned: [EISCONN] When trying to establish a connection on a socket which already has one, or when trying to send a datagram with the destina- tion address specified and the socket is already connected; [ENOTCONN] When trying to send a datagram, but no destination address is specified, and the socket hasn't been connected; [ENOBUFS] When the system runs out of memory for an internal data structure; [EADDRNOTAVAIL] When an attempt is made to create a socket with a network address for which no network interface exists; [EHOSTUNREACH] When trying to send a datagram, but no route to the destination address exists. [EINVAL] When specifying unsupported options. SEE ALSO
recv(2), send(2), intro(4), iso(4) BUGS
Packets are sent with the type code of 0x1d (technically an invalid packet type) for lack of a better way to identify raw CLNP packets. No more than MLEN bytes of options can be specified. BSD
April 2, 1994 BSD
Man Page