tsix_sendto_mac(3N)

tsix_sendto_mac - send a message with a specified MAC label

As shipped in IRIX 6.5.19. Last changed in IRIX 6.5.15.

NAME
     tsix_sendto_mac - send a message with a specified MAC label

SYNOPSIS
     #include <sys/mac.h>
     #include <t6net.h>

     int tsix_sendto_mac(int fd, const void *msg, int len,
                         int flags, void *to, int tolen,
                         mac_t lbl);

DESCRIPTION
     tsix_sendto_mac transmits a message to another socket, temporarily
     overriding the default MAC label associated with that message with the
     MAC label pointed to by lbl.  tsix_sendto_mac is otherwise identical to
     sendto(2).

CAPABILITIES
     tsix_sendto_mac requires the same capabilities as its undelying function
     t6sendto.

     If _SC_CAP is in effect, a process calling this function must have
     CAP_MAC_UPGRADE, CAP_MAC_DOWNGRADE, CAP_MAC_RELABEL_OPEN, and CAP_MAC_MLD
     capabilities in the permitted vector of its capability set.

RETURN VALUES
     If _SC_IP_SECOPTS is not in effect, tsix_sendto_mac always returns
     success.

     tsix_sendto_mac returns the number of bytes sent, or -1 if an error
     occurred.

ERRORS
     [EINVAL]       Invalid argument.

     [ENOSYS]       Function not implemented.

     [EBADF]        An invalid descriptor was specified.

     [ENOTSOCK]     The argument s is not a socket.

     [EFAULT]       An invalid user space address was specified for a
                    parameter.

     [EMSGSIZE]     The socket requires that message be sent atomically, and
                    the size of the message to be sent made this impossible.

     [EWOULDBLOCK]  The socket is marked non-blocking and the requested
                    operation would block.
     [ENOBUFS]      The system was unable to allocate an internal buffer.  The
                    operation may succeed when buffers become available.

     [ECONNREFUSED] The remote port was invalid when using the send call on a
                    connected datagram socket.

     [EISCONN]      A sendto or sendmsg call was used on a connected socket.

     [EACCES]       The requested operation specified a broadcast address as
                    the destination but the SO_BROADCAST socket option was not
                    enabled (see setsockopt(2)).

     [EHOSTUNREACH] The remote host was unreachable via the network.

     [ENETUNREACH]  The remote network is unknown to the routing system.

     [EHOSTDOWN]    The remote host was determined to be down, possibly due to
                    a failure to resolve its MAC-level address (see arp(7P)).

     [EINTR]        The operation was interrupted by delivery of a signal
                    before any data could be buffered to be sent.

     [ENOMEM]       There was insufficient memory available to complete the
                    operation.

     [ENOSR]        There were insufficient STREAMS resources available for
                    the operation to complete.

SEE ALSO
     sendto(2), sysconf(3c), tsix_recvfrom_mac(3c), t6sendto(3n)