hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/include/uapi/linux/errqueue.h
....@@ -3,6 +3,14 @@
33 #define _UAPI_LINUX_ERRQUEUE_H
44
55 #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
+};
614
715 struct sock_extended_err {
816 __u32 ee_errno;
....@@ -11,7 +19,10 @@
1119 __u8 ee_code;
1220 __u8 ee_pad;
1321 __u32 ee_info;
14
- __u32 ee_data;
22
+ union {
23
+ __u32 ee_data;
24
+ struct sock_ee_data_rfc4884 ee_rfc4884;
25
+ };
1526 };
1627
1728 #define SO_EE_ORIGIN_NONE 0
....@@ -30,15 +41,28 @@
3041 #define SO_EE_CODE_TXTIME_INVALID_PARAM 1
3142 #define SO_EE_CODE_TXTIME_MISSED 2
3243
44
+#define SO_EE_RFC4884_FLAG_INVALID 1
45
+
3346 /**
3447 * struct scm_timestamping - timestamps exposed through cmsg
3548 *
3649 * The timestamping interfaces SO_TIMESTAMPING, MSG_TSTAMP_*
3750 * 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.
3955 */
4056 struct scm_timestamping {
57
+#ifdef __KERNEL__
58
+ struct __kernel_old_timespec ts[3];
59
+#else
4160 struct timespec ts[3];
61
+#endif
62
+};
63
+
64
+struct scm_timestamping64 {
65
+ struct __kernel_timespec ts[3];
4266 };
4367
4468 /* The type of scm_timestamping, passed in sock_extended_err ee_info.