t6sendto(3N)
t6sendto - Specify security attributes to send with data on a trusted endpoint
As shipped in IRIX 6.5.30. Last changed in IRIX 6.5.15.
NAME t6sendto - Specify security attributes to send with data on a trusted endpoint SYNOPSIS cc [ flags ... ] file #include <sys/t6attrs.h> int t6sendto(int fd, const char *msg, int len, int flags, const struct sockaddr *to, int tolen, const t6attr_t attr_ptr); DESCRIPTION t6sendto() allows a privileged process to specify the security attributes to send with an IPC message. A process may only specify those attributes for which it possesses the appropriate override privilege and need not specify a full set. Any unspecified attributes are supplied by the kernel. fd is a socket created with socket(3N). The address of the target is given by to with tolen specifying its size. The length of the message is given by len. The to pointer and to_len parameters are only used if you are specifying the destination address, otherwise they should be set to 0. You may not specify the address if the trusted endpoint was created for a connection oriented protocol, such as TCP. If the message is too long to pass atomically through the underlying protocol, then the error EMSGSIZE is returned, and the message is not transmitted. A return value of -1 indicates locally detected errors only. It does not implicitly mean the message was not delivered. t6sendto() will return -1 and set errno to EINVAL if any attempt is made to specify a t6attr_t with any of these attributes: T6_NAT_CAVEATS, T6_ACL, T6_IL, T6_PID, T6_RESV10, T6_AUDIT_INFO. The flags parameter is formed from the bitwise OR of zero or more of the following: MSG_OOB Send out-of-band data and any security attributes specified by a privileged process on sockets that support this notion. The underlying protocol must also support out-of-band data. Data and attributes sent with this flag are typically not subject to the internal buffering normally applied by the network to improve network efficiency. MSG_DONTROUTE The SO_DONTROUTE option is turned on for the duration of the operation. It is used only by diagnostic or routing programs. The security attributes are specified by the attr_ptr parameter. To set up attr_ptr, see t6set_attr(3N). CAPABILITIES Only a process with the appropriate override privileges can specify the security attributes associated with the data it sends. To specify an attribute, a process must have the override privilege corresponding to the attribute. The override privilege required to specify an attribute is implementation specific. The same set of capabilities are required to set the outgoing attributes of a message as t6set_endpt_default does to set the endpoint defaults. RETURN VALUE The return value is the number of bytes actually sent, or the appropriate error. It is critical that the return value always be checked, for the addition of security means that access to an endpoint may be revoked in response to a security violation. ERRORS [EBADF] fd is an invalid file descriptor. [EINTR] The operation was interrupted by delivery of a signal before any data could be buffered to be sent. [EINVAL] tolen is not the size of a valid address for the specified address family. [EMSGSIZE] The socket requires that message be sent atomically, and the message was too long. [ENOMEM] There was insufficient memory available to complete the operation. [ENOSR] There were insufficient STREAMS resources available for the operation to complete. [ENOTSOCK] fd is not a socket. SEE ALSO libt6(3N), t6set_attr(3N), t6set_endpt_default(3N). SOURCE Trusted Systems Interoperability Group NOTES