.. | .. |
---|
3 | 3 | #define _UAPI_LINUX_ERRQUEUE_H |
---|
4 | 4 | |
---|
5 | 5 | #include <linux/types.h> |
---|
| 6 | +#include <linux/time_types.h> |
---|
| 7 | + |
---|
| 8 | +/* RFC 4884: return offset to extension struct + validation */ |
---|
| 9 | +struct sock_ee_data_rfc4884 { |
---|
| 10 | + __u16 len; |
---|
| 11 | + __u8 flags; |
---|
| 12 | + __u8 reserved; |
---|
| 13 | +}; |
---|
6 | 14 | |
---|
7 | 15 | struct sock_extended_err { |
---|
8 | 16 | __u32 ee_errno; |
---|
.. | .. |
---|
11 | 19 | __u8 ee_code; |
---|
12 | 20 | __u8 ee_pad; |
---|
13 | 21 | __u32 ee_info; |
---|
14 | | - __u32 ee_data; |
---|
| 22 | + union { |
---|
| 23 | + __u32 ee_data; |
---|
| 24 | + struct sock_ee_data_rfc4884 ee_rfc4884; |
---|
| 25 | + }; |
---|
15 | 26 | }; |
---|
16 | 27 | |
---|
17 | 28 | #define SO_EE_ORIGIN_NONE 0 |
---|
.. | .. |
---|
30 | 41 | #define SO_EE_CODE_TXTIME_INVALID_PARAM 1 |
---|
31 | 42 | #define SO_EE_CODE_TXTIME_MISSED 2 |
---|
32 | 43 | |
---|
| 44 | +#define SO_EE_RFC4884_FLAG_INVALID 1 |
---|
| 45 | + |
---|
33 | 46 | /** |
---|
34 | 47 | * struct scm_timestamping - timestamps exposed through cmsg |
---|
35 | 48 | * |
---|
36 | 49 | * The timestamping interfaces SO_TIMESTAMPING, MSG_TSTAMP_* |
---|
37 | 50 | * communicate network timestamps by passing this struct in a cmsg with |
---|
38 | | - * recvmsg(). See Documentation/networking/timestamping.txt for details. |
---|
| 51 | + * recvmsg(). See Documentation/networking/timestamping.rst for details. |
---|
| 52 | + * User space sees a timespec definition that matches either |
---|
| 53 | + * __kernel_timespec or __kernel_old_timespec, in the kernel we |
---|
| 54 | + * require two structure definitions to provide both. |
---|
39 | 55 | */ |
---|
40 | 56 | struct scm_timestamping { |
---|
| 57 | +#ifdef __KERNEL__ |
---|
| 58 | + struct __kernel_old_timespec ts[3]; |
---|
| 59 | +#else |
---|
41 | 60 | struct timespec ts[3]; |
---|
| 61 | +#endif |
---|
| 62 | +}; |
---|
| 63 | + |
---|
| 64 | +struct scm_timestamping64 { |
---|
| 65 | + struct __kernel_timespec ts[3]; |
---|
42 | 66 | }; |
---|
43 | 67 | |
---|
44 | 68 | /* The type of scm_timestamping, passed in sock_extended_err ee_info. |
---|