blob: 790ae1e34630bb690439a52f4da86ea152b1b525 [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
Ben Cheng655a7c02013-10-16 16:09:24 -07007#ifndef _UAPI_LINUX_ERRQUEUE_H
8#define _UAPI_LINUX_ERRQUEUE_H
9#include <linux/types.h>
Christopher Ferris24f97eb2019-05-20 12:58:13 -070010#include <linux/time_types.h>
Christopher Ferris25c18d42020-10-14 17:42:58 -070011struct sock_ee_data_rfc4884 {
12 __u16 len;
13 __u8 flags;
14 __u8 reserved;
15};
Ben Cheng655a7c02013-10-16 16:09:24 -070016struct sock_extended_err {
Tao Baod7db5942015-01-28 10:07:51 -080017 __u32 ee_errno;
18 __u8 ee_origin;
19 __u8 ee_type;
20 __u8 ee_code;
Tao Baod7db5942015-01-28 10:07:51 -080021 __u8 ee_pad;
22 __u32 ee_info;
Christopher Ferris25c18d42020-10-14 17:42:58 -070023 union {
24 __u32 ee_data;
25 struct sock_ee_data_rfc4884 ee_rfc4884;
26 };
Ben Cheng655a7c02013-10-16 16:09:24 -070027};
Ben Cheng655a7c02013-10-16 16:09:24 -070028#define SO_EE_ORIGIN_NONE 0
29#define SO_EE_ORIGIN_LOCAL 1
30#define SO_EE_ORIGIN_ICMP 2
31#define SO_EE_ORIGIN_ICMP6 3
Ben Cheng655a7c02013-10-16 16:09:24 -070032#define SO_EE_ORIGIN_TXSTATUS 4
Christopher Ferris1308ad32017-11-14 17:32:13 -080033#define SO_EE_ORIGIN_ZEROCOPY 5
Christopher Ferris9ce28842018-10-25 12:11:39 -070034#define SO_EE_ORIGIN_TXTIME 6
Ben Cheng655a7c02013-10-16 16:09:24 -070035#define SO_EE_ORIGIN_TIMESTAMPING SO_EE_ORIGIN_TXSTATUS
Tao Baod7db5942015-01-28 10:07:51 -080036#define SO_EE_OFFENDER(ee) ((struct sockaddr *) ((ee) + 1))
Christopher Ferris1308ad32017-11-14 17:32:13 -080037#define SO_EE_CODE_ZEROCOPY_COPIED 1
Christopher Ferris9ce28842018-10-25 12:11:39 -070038#define SO_EE_CODE_TXTIME_INVALID_PARAM 1
39#define SO_EE_CODE_TXTIME_MISSED 2
Christopher Ferris25c18d42020-10-14 17:42:58 -070040#define SO_EE_RFC4884_FLAG_INVALID 1
Christopher Ferris82d75042015-01-26 10:57:07 -080041struct scm_timestamping {
Tao Baod7db5942015-01-28 10:07:51 -080042 struct timespec ts[3];
Christopher Ferris82d75042015-01-26 10:57:07 -080043};
Christopher Ferris24f97eb2019-05-20 12:58:13 -070044struct scm_timestamping64 {
45 struct __kernel_timespec ts[3];
46};
Christopher Ferris82d75042015-01-26 10:57:07 -080047enum {
Tao Baod7db5942015-01-28 10:07:51 -080048 SCM_TSTAMP_SND,
Tao Baod7db5942015-01-28 10:07:51 -080049 SCM_TSTAMP_SCHED,
50 SCM_TSTAMP_ACK,
Christopher Ferris82d75042015-01-26 10:57:07 -080051};
Nick Kralevicha67e4de2013-01-14 11:28:26 -080052#endif