2 #include <sys/socket.h>
8 #define MSG_WAITFORONE 0x10000
10 #ifndef MSG_SENDPAGE_NOTLAST
11 #define MSG_SENDPAGE_NOTLAST 0x20000
14 #define MSG_FASTOPEN 0x20000000
16 #ifndef MSG_CMSG_CLOEXEC
17 # define MSG_CMSG_CLOEXEC 0x40000000
20 static size_t syscall_arg__scnprintf_msg_flags(char *bf, size_t size,
21 struct syscall_arg *arg)
23 int printed = 0, flags = arg->val;
26 return scnprintf(bf, size, "NONE");
27 #define P_MSG_FLAG(n) \
28 if (flags & MSG_##n) { \
29 printed += scnprintf(bf + printed, size - printed, "%s%s", printed ? "|" : "", #n); \
35 P_MSG_FLAG(DONTROUTE);
49 P_MSG_FLAG(WAITFORONE);
50 P_MSG_FLAG(SENDPAGE_NOTLAST);
52 P_MSG_FLAG(CMSG_CLOEXEC);
56 printed += scnprintf(bf + printed, size - printed, "%s%#x", printed ? "|" : "", flags);
61 #define SCA_MSG_FLAGS syscall_arg__scnprintf_msg_flags