History

socket: Add SO_TIMESTAMPING_NEW

Add SO_TIMESTAMPING_NEW variant of socket timestamp options. This is the y2038 safe versions of the SO_TIMESTAMPING_OLD for all architectures.

Deepa Dinamani committed 7 years ago

Commit 97184751 parent 887feae12 files · +88 −30Browse files

Showing the changes to include/uapi (2 of 12 files). Show all

Unified · Split

2 files
  1. include/uapi/asm-generic/socket.h +3 −2
  2. include/uapi/linux/errqueue.h +4 −0
include/uapi/asm-generic/socket.h+3−2
@@ -112,6 +112,7 @@ · 111 unmodified lines
112 112
113#define SO_TIMESTAMP_NEW 63113#define SO_TIMESTAMP_NEW 63
114#define SO_TIMESTAMPNS_NEW 64114#define SO_TIMESTAMPNS_NEW 64
115#define SO_TIMESTAMPING_NEW 65
115 116
116#if !defined(__KERNEL__)117#if !defined(__KERNEL__)
117 118
@@ -119,13 +120,13 @@ · 1 unmodified line
119/* on 64-bit and x32, avoid the ?: operator */120/* on 64-bit and x32, avoid the ?: operator */
120#define SO_TIMESTAMP SO_TIMESTAMP_OLD121#define SO_TIMESTAMP SO_TIMESTAMP_OLD
121#define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD122#define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
123#define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
122#else124#else
123#define SO_TIMESTAMP (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMP_OLD : SO_TIMESTAMP_NEW)125#define SO_TIMESTAMP (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMP_OLD : SO_TIMESTAMP_NEW)
124#define SO_TIMESTAMPNS (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMPNS_OLD : SO_TIMESTAMPNS_NEW)126#define SO_TIMESTAMPNS (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMPNS_OLD : SO_TIMESTAMPNS_NEW)
127#define SO_TIMESTAMPING (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMPING_OLD : SO_TIMESTAMPING_NEW)
125#endif128#endif
126 129
127#define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
128
129#define SCM_TIMESTAMP SO_TIMESTAMP130#define SCM_TIMESTAMP SO_TIMESTAMP
130#define SCM_TIMESTAMPNS SO_TIMESTAMPNS131#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
131#define SCM_TIMESTAMPING SO_TIMESTAMPING132#define SCM_TIMESTAMPING SO_TIMESTAMPING
include/uapi/linux/errqueue.h+4−0
@@ -41,6 +41,10 @@ struct scm_timestamping { · 40 unmodified lines
41 struct timespec ts[3];41 struct timespec ts[3];
42};42};
43 43
44struct scm_timestamping64 {
45 struct __kernel_timespec ts[3];
46};
47
44/* The type of scm_timestamping, passed in sock_extended_err ee_info.48/* The type of scm_timestamping, passed in sock_extended_err ee_info.
45 * This defines the type of ts[0]. For SCM_TSTAMP_SND only, if ts[0]49 * This defines the type of ts[0]. For SCM_TSTAMP_SND only, if ts[0]
46 * is zero, then this is a hardware timestamp and recorded in ts[2].50 * is zero, then this is a hardware timestamp and recorded in ts[2].

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t