VLC  2.1.0-git
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
rootbind.c File Reference
Include dependency graph for rootbind.c:

Macros

#define _XPG4_2   /* ancilliary data on Solaris */
#define ENABLE_ROOTWRAP   1
#define CMSG_ALIGN(len)   (((len) + sizeof(intptr_t)-1) & ~(sizeof(intptr_t)-1))
#define CMSG_SPACE(len)   (CMSG_ALIGN(sizeof(struct cmsghdr)) + CMSG_ALIGN(len))
#define CMSG_LEN(len)   (CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))

Functions

int rootwrap_bind (int family, int socktype, int protocol, const struct sockaddr *addr, size_t alen)
 Tries to obtain a bound TCP socket from the root process.
static int recv_fd (int p)
 Receive a file descriptor from another process.

Macro Definition Documentation

#define _XPG4_2   /* ancilliary data on Solaris */
#define CMSG_ALIGN (   len)    (((len) + sizeof(intptr_t)-1) & ~(sizeof(intptr_t)-1))
#define CMSG_LEN (   len)    (CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))

Referenced by recv_fd().

#define CMSG_SPACE (   len)    (CMSG_ALIGN(sizeof(struct cmsghdr)) + CMSG_ALIGN(len))

Referenced by recv_fd().

#define ENABLE_ROOTWRAP   1

Function Documentation

static int recv_fd ( int  p)
static

Receive a file descriptor from another process.

References CMSG_LEN, and CMSG_SPACE.

Referenced by rootwrap_bind().

int rootwrap_bind ( int  family,
int  socktype,
int  protocol,
const struct sockaddr *  addr,
size_t  alen 
)

Tries to obtain a bound TCP socket from the root process.

References getenv(), and recv_fd().

Referenced by net_Listen().