msghdr: decode IP_RECVFRAGSIZE control message
Added in v4.10-rc1~202^2~340^2~2. * xlat/ip_cmsg_types.in (SCM_SECURITY): Provide fallback message, reorder. (IP_RECVFRAGSIZE): New constant. * msghdr.c (print_cmsg_int): New function. (cmsg_ip_printers) <IP_RECVFRAGSIZE>: New printer.
This commit is contained in:
parent
156777f967
commit
8a7ba35d04
10
msghdr.c
10
msghdr.c
@ -132,6 +132,15 @@ print_cmsg_ip_pktinfo(struct tcb *tcp, const void *cmsg_data,
|
||||
tprints("}");
|
||||
}
|
||||
|
||||
static void
|
||||
print_cmsg_int(struct tcb *tcp, const void *cmsg_data,
|
||||
const unsigned int data_len)
|
||||
{
|
||||
const int *p = cmsg_data;
|
||||
|
||||
tprintf("[%d]", *p);
|
||||
}
|
||||
|
||||
static void
|
||||
print_cmsg_uint(struct tcb *tcp, const void *cmsg_data,
|
||||
const unsigned int data_len)
|
||||
@ -229,6 +238,7 @@ static const struct {
|
||||
[IP_RECVERR] = { print_cmsg_ip_recverr, sizeof(struct sock_ee) },
|
||||
[IP_ORIGDSTADDR] = { print_cmsg_ip_origdstaddr, sizeof(struct sockaddr_in) },
|
||||
[IP_CHECKSUM] = { print_cmsg_uint, sizeof(unsigned int) },
|
||||
[IP_RECVFRAGSIZE] = { print_cmsg_int, sizeof(int) },
|
||||
[SCM_SECURITY] = { print_scm_security, 1 }
|
||||
};
|
||||
|
||||
|
@ -1,9 +1,10 @@
|
||||
IP_TOS 1
|
||||
IP_TTL 2
|
||||
SCM_SECURITY 3
|
||||
IP_RECVOPTS 6
|
||||
IP_RETOPTS 7
|
||||
IP_PKTINFO 8
|
||||
IP_RECVERR 11
|
||||
IP_ORIGDSTADDR 20
|
||||
IP_CHECKSUM 23
|
||||
SCM_SECURITY
|
||||
IP_RECVFRAGSIZE 25
|
||||
|
Loading…
x
Reference in New Issue
Block a user