VLC 4.0.0-dev
Loading...
Searching...
No Matches
rootbind.c File Reference
Include dependency graph for rootbind.c:

Macros

#define _XPG4_2   /* ancillary data on Solaris */
#define ENABLE_ROOTWRAP   1
#define CMSG_ALIGN(len)
#define CMSG_SPACE(len)
#define CMSG_LEN(len)
#define MSG_NOSIGNAL   0

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

◆ _XPG4_2

#define _XPG4_2   /* ancillary data on Solaris */

◆ CMSG_ALIGN

#define CMSG_ALIGN ( len)
Value:
(((len) + sizeof(intptr_t)-1) & ~(sizeof(intptr_t)-1))

◆ CMSG_LEN

#define CMSG_LEN ( len)
Value:
(CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))
#define CMSG_ALIGN(len)
Definition rootbind.c:54

Referenced by recv_fd().

◆ CMSG_SPACE

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

Referenced by recv_fd().

◆ ENABLE_ROOTWRAP

#define ENABLE_ROOTWRAP   1

◆ MSG_NOSIGNAL

#define MSG_NOSIGNAL   0

Referenced by rootwrap_bind(), and vlc_sendmsg().

Function Documentation

◆ recv_fd()

int recv_fd ( int p)
static

Receive a file descriptor from another process.

References CMSG_LEN, CMSG_SPACE, p, and recvmsg().

Referenced by rootwrap_bind().

◆ 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(), MSG_NOSIGNAL, and recv_fd().

Referenced by net_Listen().