CAP_SOCKET(3N)CAP_SOCKET(3N)NAMEcap_socket - create a socket with privilege
SYNOPSIS
#include <cap_net.h>
int cap_socket(int domain, int type, int protocol);
DESCRIPTIONcap_socket asserts appropriate privilege for the creation of sockets with
privileged protocol types, like SOCK_RAW or SOCK_IGMP .
If _POSIX_CAP is in effect, a process calling this function should have
CAP_NETWORK_MGT capability in the permitted vector of its capability set.
RETURN VALUEScap_socket returns a descriptor referencing the socket if successful, -1
otherwise.
ERRORScap_socket has the same error codes as socket(2).
SEE ALSOcapability(4), socket(2), sysconf(3c).
Page 1