| .. | .. |
|---|
| 2 | 2 | #ifndef _ASM_SOCKET_H |
|---|
| 3 | 3 | #define _ASM_SOCKET_H |
|---|
| 4 | 4 | |
|---|
| 5 | +#include <linux/posix_types.h> |
|---|
| 5 | 6 | #include <asm/sockios.h> |
|---|
| 6 | 7 | |
|---|
| 7 | 8 | /* For setsockopt(2) */ |
|---|
| .. | .. |
|---|
| 20 | 21 | #define SO_BSDCOMPAT 0x0400 |
|---|
| 21 | 22 | #define SO_RCVLOWAT 0x0800 |
|---|
| 22 | 23 | #define SO_SNDLOWAT 0x1000 |
|---|
| 23 | | -#define SO_RCVTIMEO 0x2000 |
|---|
| 24 | | -#define SO_SNDTIMEO 0x4000 |
|---|
| 24 | +#define SO_RCVTIMEO_OLD 0x2000 |
|---|
| 25 | +#define SO_SNDTIMEO_OLD 0x4000 |
|---|
| 25 | 26 | #define SO_ACCEPTCONN 0x8000 |
|---|
| 26 | 27 | |
|---|
| 27 | 28 | #define SO_SNDBUF 0x1001 |
|---|
| .. | .. |
|---|
| 32 | 33 | #define SO_TYPE 0x1008 |
|---|
| 33 | 34 | #define SO_PROTOCOL 0x1028 |
|---|
| 34 | 35 | #define SO_DOMAIN 0x1029 |
|---|
| 35 | | - |
|---|
| 36 | 36 | |
|---|
| 37 | 37 | /* Linux specific, keep the same. */ |
|---|
| 38 | 38 | #define SO_NO_CHECK 0x000b |
|---|
| .. | .. |
|---|
| 45 | 45 | #define SO_GET_FILTER SO_ATTACH_FILTER |
|---|
| 46 | 46 | |
|---|
| 47 | 47 | #define SO_PEERNAME 0x001c |
|---|
| 48 | | -#define SO_TIMESTAMP 0x001d |
|---|
| 49 | | -#define SCM_TIMESTAMP SO_TIMESTAMP |
|---|
| 50 | 48 | |
|---|
| 51 | 49 | #define SO_PEERSEC 0x001e |
|---|
| 52 | 50 | #define SO_PASSSEC 0x001f |
|---|
| 53 | | -#define SO_TIMESTAMPNS 0x0021 |
|---|
| 54 | | -#define SCM_TIMESTAMPNS SO_TIMESTAMPNS |
|---|
| 55 | 51 | |
|---|
| 56 | 52 | #define SO_MARK 0x0022 |
|---|
| 57 | | - |
|---|
| 58 | | -#define SO_TIMESTAMPING 0x0023 |
|---|
| 59 | | -#define SCM_TIMESTAMPING SO_TIMESTAMPING |
|---|
| 60 | 53 | |
|---|
| 61 | 54 | #define SO_RXQ_OVFL 0x0024 |
|---|
| 62 | 55 | |
|---|
| .. | .. |
|---|
| 104 | 97 | #define SO_TXTIME 0x003f |
|---|
| 105 | 98 | #define SCM_TXTIME SO_TXTIME |
|---|
| 106 | 99 | |
|---|
| 100 | +#define SO_BINDTOIFINDEX 0x0041 |
|---|
| 101 | + |
|---|
| 107 | 102 | /* Security levels - as per NRL IPv6 - don't actually do anything */ |
|---|
| 108 | 103 | #define SO_SECURITY_AUTHENTICATION 0x5001 |
|---|
| 109 | 104 | #define SO_SECURITY_ENCRYPTION_TRANSPORT 0x5002 |
|---|
| 110 | 105 | #define SO_SECURITY_ENCRYPTION_NETWORK 0x5004 |
|---|
| 111 | 106 | |
|---|
| 107 | +#define SO_TIMESTAMP_OLD 0x001d |
|---|
| 108 | +#define SO_TIMESTAMPNS_OLD 0x0021 |
|---|
| 109 | +#define SO_TIMESTAMPING_OLD 0x0023 |
|---|
| 110 | + |
|---|
| 111 | +#define SO_TIMESTAMP_NEW 0x0046 |
|---|
| 112 | +#define SO_TIMESTAMPNS_NEW 0x0042 |
|---|
| 113 | +#define SO_TIMESTAMPING_NEW 0x0043 |
|---|
| 114 | + |
|---|
| 115 | +#define SO_RCVTIMEO_NEW 0x0044 |
|---|
| 116 | +#define SO_SNDTIMEO_NEW 0x0045 |
|---|
| 117 | + |
|---|
| 118 | +#define SO_DETACH_REUSEPORT_BPF 0x0047 |
|---|
| 119 | + |
|---|
| 120 | +#define SO_NETNS_COOKIE 0x0050 |
|---|
| 121 | + |
|---|
| 122 | +#if !defined(__KERNEL__) |
|---|
| 123 | + |
|---|
| 124 | + |
|---|
| 125 | +#if __BITS_PER_LONG == 64 |
|---|
| 126 | +#define SO_TIMESTAMP SO_TIMESTAMP_OLD |
|---|
| 127 | +#define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD |
|---|
| 128 | +#define SO_TIMESTAMPING SO_TIMESTAMPING_OLD |
|---|
| 129 | + |
|---|
| 130 | +#define SO_RCVTIMEO SO_RCVTIMEO_OLD |
|---|
| 131 | +#define SO_SNDTIMEO SO_SNDTIMEO_OLD |
|---|
| 132 | +#else |
|---|
| 133 | +#define SO_TIMESTAMP (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMP_OLD : SO_TIMESTAMP_NEW) |
|---|
| 134 | +#define SO_TIMESTAMPNS (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMPNS_OLD : SO_TIMESTAMPNS_NEW) |
|---|
| 135 | +#define SO_TIMESTAMPING (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMPING_OLD : SO_TIMESTAMPING_NEW) |
|---|
| 136 | + |
|---|
| 137 | +#define SO_RCVTIMEO (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_RCVTIMEO_OLD : SO_RCVTIMEO_NEW) |
|---|
| 138 | +#define SO_SNDTIMEO (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_SNDTIMEO_OLD : SO_SNDTIMEO_NEW) |
|---|
| 139 | +#endif |
|---|
| 140 | + |
|---|
| 141 | +#define SCM_TIMESTAMP SO_TIMESTAMP |
|---|
| 142 | +#define SCM_TIMESTAMPNS SO_TIMESTAMPNS |
|---|
| 143 | +#define SCM_TIMESTAMPING SO_TIMESTAMPING |
|---|
| 144 | + |
|---|
| 145 | +#endif |
|---|
| 146 | + |
|---|
| 112 | 147 | #endif /* _ASM_SOCKET_H */ |
|---|