0001
0002 #ifndef _UAPI_LINUX_ERRQUEUE_H
0003 #define _UAPI_LINUX_ERRQUEUE_H
0004
0005 #include <linux/types.h>
0006 #include <linux/time_types.h>
0007
0008
0009 struct sock_ee_data_rfc4884 {
0010 __u16 len;
0011 __u8 flags;
0012 __u8 reserved;
0013 };
0014
0015 struct sock_extended_err {
0016 __u32 ee_errno;
0017 __u8 ee_origin;
0018 __u8 ee_type;
0019 __u8 ee_code;
0020 __u8 ee_pad;
0021 __u32 ee_info;
0022 union {
0023 __u32 ee_data;
0024 struct sock_ee_data_rfc4884 ee_rfc4884;
0025 };
0026 };
0027
0028 #define SO_EE_ORIGIN_NONE 0
0029 #define SO_EE_ORIGIN_LOCAL 1
0030 #define SO_EE_ORIGIN_ICMP 2
0031 #define SO_EE_ORIGIN_ICMP6 3
0032 #define SO_EE_ORIGIN_TXSTATUS 4
0033 #define SO_EE_ORIGIN_ZEROCOPY 5
0034 #define SO_EE_ORIGIN_TXTIME 6
0035 #define SO_EE_ORIGIN_TIMESTAMPING SO_EE_ORIGIN_TXSTATUS
0036
0037 #define SO_EE_OFFENDER(ee) ((struct sockaddr*)((ee)+1))
0038
0039 #define SO_EE_CODE_ZEROCOPY_COPIED 1
0040
0041 #define SO_EE_CODE_TXTIME_INVALID_PARAM 1
0042 #define SO_EE_CODE_TXTIME_MISSED 2
0043
0044 #define SO_EE_RFC4884_FLAG_INVALID 1
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056 struct scm_timestamping {
0057 #ifdef __KERNEL__
0058 struct __kernel_old_timespec ts[3];
0059 #else
0060 struct timespec ts[3];
0061 #endif
0062 };
0063
0064 struct scm_timestamping64 {
0065 struct __kernel_timespec ts[3];
0066 };
0067
0068
0069
0070
0071
0072 enum {
0073 SCM_TSTAMP_SND,
0074 SCM_TSTAMP_SCHED,
0075 SCM_TSTAMP_ACK,
0076 };
0077
0078 #endif