socket: add support for sending and receiving descriptors

Add support for the SCM_RIGHTS control message used in communication
with the privops helper.
This commit is contained in:
Miroslav Lichvar
2019-11-18 18:04:43 +01:00
parent c4d6f98bed
commit f231efb811
2 changed files with 30 additions and 4 deletions

View File

@@ -38,6 +38,7 @@
/* Flags for receiving and sending messages */
#define SCK_FLAG_MSG_ERRQUEUE 1
#define SCK_FLAG_MSG_DESCRIPTOR 2
/* Maximum number of received messages */
#define SCK_MAX_RECV_MESSAGES 4
@@ -70,6 +71,8 @@ typedef struct {
int l2_length;
int tx_flags;
} timestamp;
int descriptor;
} SCK_Message;
/* Initialisation function */