#defineSYS_SOCKET 1 /* sys_socket(2) */#defineSYS_BIND 2 /* sys_bind(2) */#defineSYS_CONNECT 3 /* sys_connect(2) */...#defineSYS_SENDMMSG 20 /* sys_sendmmsg(2) *//*Argument list sizes for compat_sys_socketcall*/#defineAL(x) ((x) * sizeof(u32))staticunsignedcharnas[...
(int__user *)a[2],0);break;caseSYS_GETSOCKNAME: ...caseSYS_GETPEERNAME: ...caseSYS_SOCKETPAIR: ...caseSYS_SEND: ...caseSYS_SENDTO: ...caseSYS_RECV: ...caseSYS_RECVFROM: ...caseSYS_SHUTDOWN: ...caseSYS_SETSOCKOPT: ...caseSYS_GETSOCKOPT: ...caseSYS_SENDMSG: ...caseSYS_SEN...
socket.sendmsg(buffers[, ancdata[, flags[, address]]]) Send normal and ancillary data to the socket, gathering the non-ancillary data from a series of buffers and concatenating it into a single message. The buffers argument specifies the non-ancillary data as an iterable of bytes-like objects...
#define _XOPEN_SOURCE 520 #include <sys/socket.h> ssize_t sendmsg(intsocket_descriptor, const struct msghdr *message_structure, intflags) Service Program Name: QSOSRV1 Default Public Authority: *USE Threadsafe: Yes Thesendmsg()function is used to send data or descriptors or ancillary data or...
send(2), sendto(2), and sendmsg(2) send data over a socket, and recv(2), recvfrom(2), recvmsg(2) receive data from a socket. poll(2) and select(2) wait for arriving data or a readiness to send data. In addition, the standard I/O operations like write(2), writev(2), send...
printf("Invalid length: %d.\n",h->h_length); return; } /* Print the primary address and any alternates. */ for (p=h->h_addr_list; *p; p++) { printf("%s address: %s\n", p==h->h_addr_list ? "primary " : "alternate ", ...
If the socket protocol supports broadcast and the specified address is a broadcast address for the socket protocol,sendto()fails if theSO_BROADCASToption is not set for the socket. Thetoargument specifies the address of the target. Thelenargument specifies the length of the message. If the mess...
AF_*与PF_*的宏都定义在bits/socket.h中,两者值相同,所以可以混用。 协议族及其地址值 由上,sockaddr 放不下多数协议族地址,而设计了下面的sockaddr_storage。 #include <bits/socket.h> struct sockaddr_storage { sa_famiy_t sa_family; ...
send, sendto, sendmsg - send a message on a socket SYNOPSIS #include <sys/types.h> #include <sys/socket.h> ssize_t send(int sockfd, const void *buf, size_t len, int flags); ssize_t sendto(int sockfd, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr...
The sendmsg and recvmsg functions can be used with connected or unconnected sockets. If the socket is unconnected, msg_name and msg_namelen specify the destination or source of the message. Otherwise, these arguments should be null. msg_iov specifies an array of noncontiguous buffer segments, ...