~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/uapi/linux/net_tstamp.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/uapi/linux/net_tstamp.h (Version linux-6.12-rc7) and /include/uapi/linux/net_tstamp.h (Version linux-3.10.108)


  1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux << 
  2 /*                                                  1 /*
  3  * Userspace API for hardware time stamping of      2  * Userspace API for hardware time stamping of network packets
  4  *                                                  3  *
  5  * Copyright (C) 2008,2009 Intel Corporation        4  * Copyright (C) 2008,2009 Intel Corporation
  6  * Author: Patrick Ohly <patrick.ohly@intel.co      5  * Author: Patrick Ohly <patrick.ohly@intel.com>
  7  *                                                  6  *
  8  */                                                 7  */
  9                                                     8 
 10 #ifndef _NET_TIMESTAMPING_H                         9 #ifndef _NET_TIMESTAMPING_H
 11 #define _NET_TIMESTAMPING_H                        10 #define _NET_TIMESTAMPING_H
 12                                                    11 
 13 #include <linux/types.h>                       << 
 14 #include <linux/socket.h>   /* for SO_TIMESTAM     12 #include <linux/socket.h>   /* for SO_TIMESTAMPING */
 15                                                    13 
 16 /* SO_TIMESTAMPING flags */                    !!  14 /* SO_TIMESTAMPING gets an integer bit field comprised of these values */
 17 enum {                                             15 enum {
 18         SOF_TIMESTAMPING_TX_HARDWARE = (1<<0),     16         SOF_TIMESTAMPING_TX_HARDWARE = (1<<0),
 19         SOF_TIMESTAMPING_TX_SOFTWARE = (1<<1),     17         SOF_TIMESTAMPING_TX_SOFTWARE = (1<<1),
 20         SOF_TIMESTAMPING_RX_HARDWARE = (1<<2),     18         SOF_TIMESTAMPING_RX_HARDWARE = (1<<2),
 21         SOF_TIMESTAMPING_RX_SOFTWARE = (1<<3),     19         SOF_TIMESTAMPING_RX_SOFTWARE = (1<<3),
 22         SOF_TIMESTAMPING_SOFTWARE = (1<<4),        20         SOF_TIMESTAMPING_SOFTWARE = (1<<4),
 23         SOF_TIMESTAMPING_SYS_HARDWARE = (1<<5)     21         SOF_TIMESTAMPING_SYS_HARDWARE = (1<<5),
 24         SOF_TIMESTAMPING_RAW_HARDWARE = (1<<6)     22         SOF_TIMESTAMPING_RAW_HARDWARE = (1<<6),
 25         SOF_TIMESTAMPING_OPT_ID = (1<<7),      !!  23         SOF_TIMESTAMPING_MASK =
 26         SOF_TIMESTAMPING_TX_SCHED = (1<<8),    !!  24         (SOF_TIMESTAMPING_RAW_HARDWARE - 1) |
 27         SOF_TIMESTAMPING_TX_ACK = (1<<9),      !!  25         SOF_TIMESTAMPING_RAW_HARDWARE
 28         SOF_TIMESTAMPING_OPT_CMSG = (1<<10),   << 
 29         SOF_TIMESTAMPING_OPT_TSONLY = (1<<11), << 
 30         SOF_TIMESTAMPING_OPT_STATS = (1<<12),  << 
 31         SOF_TIMESTAMPING_OPT_PKTINFO = (1<<13) << 
 32         SOF_TIMESTAMPING_OPT_TX_SWHW = (1<<14) << 
 33         SOF_TIMESTAMPING_BIND_PHC = (1 << 15), << 
 34         SOF_TIMESTAMPING_OPT_ID_TCP = (1 << 16 << 
 35         SOF_TIMESTAMPING_OPT_RX_FILTER = (1 << << 
 36                                                << 
 37         SOF_TIMESTAMPING_LAST = SOF_TIMESTAMPI << 
 38         SOF_TIMESTAMPING_MASK = (SOF_TIMESTAMP << 
 39                                  SOF_TIMESTAMP << 
 40 };                                             << 
 41                                                << 
 42 /*                                             << 
 43  * SO_TIMESTAMPING flags are either for record << 
 44  * reporting the timestamp to user space.      << 
 45  * Recording flags can be set both via socket  << 
 46  */                                            << 
 47 #define SOF_TIMESTAMPING_TX_RECORD_MASK (SOF_T << 
 48                                          SOF_T << 
 49                                          SOF_T << 
 50                                          SOF_T << 
 51                                                << 
 52 /**                                            << 
 53  * struct so_timestamping - SO_TIMESTAMPING pa << 
 54  *                                             << 
 55  * @flags:      SO_TIMESTAMPING flags          << 
 56  * @bind_phc:   Index of PTP virtual clock bou << 
 57  *              if flag SOF_TIMESTAMPING_BIND_ << 
 58  */                                            << 
 59 struct so_timestamping {                       << 
 60         int flags;                             << 
 61         int bind_phc;                          << 
 62 };                                                 26 };
 63                                                    27 
 64 /**                                                28 /**
 65  * struct hwtstamp_config - %SIOCGHWTSTAMP and !!  29  * struct hwtstamp_config - %SIOCSHWTSTAMP parameter
 66  *                                                 30  *
 67  * @flags:      one of HWTSTAMP_FLAG_*         !!  31  * @flags:      no flags defined right now, must be zero
 68  * @tx_type:    one of HWTSTAMP_TX_*               32  * @tx_type:    one of HWTSTAMP_TX_*
 69  * @rx_filter:  one of HWTSTAMP_FILTER_*       !!  33  * @rx_type:    one of one of HWTSTAMP_FILTER_*
 70  *                                                 34  *
 71  * %SIOCGHWTSTAMP and %SIOCSHWTSTAMP expect a  !!  35  * %SIOCSHWTSTAMP expects a &struct ifreq with a ifr_data pointer to
 72  * ifr_data pointer to this structure.  For %S !!  36  * this structure. dev_ifsioc() in the kernel takes care of the
 73  * driver or hardware does not support the req !!  37  * translation between 32 bit userspace and 64 bit kernel. The
 74  * the driver may use a more general filter mo !!  38  * structure is intentionally chosen so that it has the same layout on
 75  * @rx_filter will indicate the actual mode on !!  39  * 32 and 64 bit systems, don't break this!
 76  */                                                40  */
 77 struct hwtstamp_config {                           41 struct hwtstamp_config {
 78         int flags;                                 42         int flags;
 79         int tx_type;                               43         int tx_type;
 80         int rx_filter;                             44         int rx_filter;
 81 };                                                 45 };
 82                                                    46 
 83 /* possible values for hwtstamp_config->flags  << 
 84 enum hwtstamp_flags {                          << 
 85         /*                                     << 
 86          * With this flag, the user could get  << 
 87          * PHC index. Note this PHC index is n << 
 88          * is a failover, the bond active inte << 
 89          * will be the PHC index.              << 
 90          */                                    << 
 91         HWTSTAMP_FLAG_BONDED_PHC_INDEX = (1<<0 << 
 92 #define HWTSTAMP_FLAG_BONDED_PHC_INDEX  HWTSTA << 
 93                                                << 
 94         HWTSTAMP_FLAG_LAST = HWTSTAMP_FLAG_BON << 
 95         HWTSTAMP_FLAG_MASK = (HWTSTAMP_FLAG_LA << 
 96 };                                             << 
 97                                                << 
 98 /* possible values for hwtstamp_config->tx_typ     47 /* possible values for hwtstamp_config->tx_type */
 99 enum hwtstamp_tx_types {                           48 enum hwtstamp_tx_types {
100         /*                                         49         /*
101          * No outgoing packet will need hardwa     50          * No outgoing packet will need hardware time stamping;
102          * should a packet arrive which asks f     51          * should a packet arrive which asks for it, no hardware
103          * time stamping will be done.             52          * time stamping will be done.
104          */                                        53          */
105         HWTSTAMP_TX_OFF,                           54         HWTSTAMP_TX_OFF,
106                                                    55 
107         /*                                         56         /*
108          * Enables hardware time stamping for      57          * Enables hardware time stamping for outgoing packets;
109          * the sender of the packet decides wh     58          * the sender of the packet decides which are to be
110          * time stamped by setting %SOF_TIMEST     59          * time stamped by setting %SOF_TIMESTAMPING_TX_SOFTWARE
111          * before sending the packet.              60          * before sending the packet.
112          */                                        61          */
113         HWTSTAMP_TX_ON,                            62         HWTSTAMP_TX_ON,
114                                                    63 
115         /*                                         64         /*
116          * Enables time stamping for outgoing      65          * Enables time stamping for outgoing packets just as
117          * HWTSTAMP_TX_ON does, but also enabl     66          * HWTSTAMP_TX_ON does, but also enables time stamp insertion
118          * directly into Sync packets. In this     67          * directly into Sync packets. In this case, transmitted Sync
119          * packets will not received a time st     68          * packets will not received a time stamp via the socket error
120          * queue.                                  69          * queue.
121          */                                        70          */
122         HWTSTAMP_TX_ONESTEP_SYNC,                  71         HWTSTAMP_TX_ONESTEP_SYNC,
123                                                << 
124         /*                                     << 
125          * Same as HWTSTAMP_TX_ONESTEP_SYNC, b << 
126          * stamp insertion directly into PDela << 
127          * case, neither transmitted Sync nor  << 
128          * receive a time stamp via the socket << 
129          */                                    << 
130         HWTSTAMP_TX_ONESTEP_P2P,               << 
131                                                << 
132         /* add new constants above here */     << 
133         __HWTSTAMP_TX_CNT                      << 
134 };                                                 72 };
135                                                    73 
136 /* possible values for hwtstamp_config->rx_fil     74 /* possible values for hwtstamp_config->rx_filter */
137 enum hwtstamp_rx_filters {                         75 enum hwtstamp_rx_filters {
138         /* time stamp no incoming packet at al     76         /* time stamp no incoming packet at all */
139         HWTSTAMP_FILTER_NONE,                      77         HWTSTAMP_FILTER_NONE,
140                                                    78 
141         /* time stamp any incoming packet */       79         /* time stamp any incoming packet */
142         HWTSTAMP_FILTER_ALL,                       80         HWTSTAMP_FILTER_ALL,
143                                                    81 
144         /* return value: time stamp all packet     82         /* return value: time stamp all packets requested plus some others */
145         HWTSTAMP_FILTER_SOME,                      83         HWTSTAMP_FILTER_SOME,
146                                                    84 
147         /* PTP v1, UDP, any kind of event pack     85         /* PTP v1, UDP, any kind of event packet */
148         HWTSTAMP_FILTER_PTP_V1_L4_EVENT,           86         HWTSTAMP_FILTER_PTP_V1_L4_EVENT,
149         /* PTP v1, UDP, Sync packet */             87         /* PTP v1, UDP, Sync packet */
150         HWTSTAMP_FILTER_PTP_V1_L4_SYNC,            88         HWTSTAMP_FILTER_PTP_V1_L4_SYNC,
151         /* PTP v1, UDP, Delay_req packet */        89         /* PTP v1, UDP, Delay_req packet */
152         HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ,       90         HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ,
153         /* PTP v2, UDP, any kind of event pack     91         /* PTP v2, UDP, any kind of event packet */
154         HWTSTAMP_FILTER_PTP_V2_L4_EVENT,           92         HWTSTAMP_FILTER_PTP_V2_L4_EVENT,
155         /* PTP v2, UDP, Sync packet */             93         /* PTP v2, UDP, Sync packet */
156         HWTSTAMP_FILTER_PTP_V2_L4_SYNC,            94         HWTSTAMP_FILTER_PTP_V2_L4_SYNC,
157         /* PTP v2, UDP, Delay_req packet */        95         /* PTP v2, UDP, Delay_req packet */
158         HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ,       96         HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ,
159                                                    97 
160         /* 802.AS1, Ethernet, any kind of even     98         /* 802.AS1, Ethernet, any kind of event packet */
161         HWTSTAMP_FILTER_PTP_V2_L2_EVENT,           99         HWTSTAMP_FILTER_PTP_V2_L2_EVENT,
162         /* 802.AS1, Ethernet, Sync packet */      100         /* 802.AS1, Ethernet, Sync packet */
163         HWTSTAMP_FILTER_PTP_V2_L2_SYNC,           101         HWTSTAMP_FILTER_PTP_V2_L2_SYNC,
164         /* 802.AS1, Ethernet, Delay_req packet    102         /* 802.AS1, Ethernet, Delay_req packet */
165         HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ,      103         HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ,
166                                                   104 
167         /* PTP v2/802.AS1, any layer, any kind    105         /* PTP v2/802.AS1, any layer, any kind of event packet */
168         HWTSTAMP_FILTER_PTP_V2_EVENT,             106         HWTSTAMP_FILTER_PTP_V2_EVENT,
169         /* PTP v2/802.AS1, any layer, Sync pac    107         /* PTP v2/802.AS1, any layer, Sync packet */
170         HWTSTAMP_FILTER_PTP_V2_SYNC,              108         HWTSTAMP_FILTER_PTP_V2_SYNC,
171         /* PTP v2/802.AS1, any layer, Delay_re    109         /* PTP v2/802.AS1, any layer, Delay_req packet */
172         HWTSTAMP_FILTER_PTP_V2_DELAY_REQ,         110         HWTSTAMP_FILTER_PTP_V2_DELAY_REQ,
173                                                << 
174         /* NTP, UDP, all versions and packet m << 
175         HWTSTAMP_FILTER_NTP_ALL,               << 
176                                                << 
177         /* add new constants above here */     << 
178         __HWTSTAMP_FILTER_CNT                  << 
179 };                                             << 
180                                                << 
181 /* SCM_TIMESTAMPING_PKTINFO control message */ << 
182 struct scm_ts_pktinfo {                        << 
183         __u32 if_index;                        << 
184         __u32 pkt_length;                      << 
185         __u32 reserved[2];                     << 
186 };                                             << 
187                                                << 
188 /*                                             << 
189  * SO_TXTIME gets a struct sock_txtime with fl << 
190  * field comprised of these values.            << 
191  */                                            << 
192 enum txtime_flags {                            << 
193         SOF_TXTIME_DEADLINE_MODE = (1 << 0),   << 
194         SOF_TXTIME_REPORT_ERRORS = (1 << 1),   << 
195                                                << 
196         SOF_TXTIME_FLAGS_LAST = SOF_TXTIME_REP << 
197         SOF_TXTIME_FLAGS_MASK = (SOF_TXTIME_FL << 
198                                  SOF_TXTIME_FL << 
199 };                                             << 
200                                                << 
201 struct sock_txtime {                           << 
202         __kernel_clockid_t      clockid;/* ref << 
203         __u32                   flags;  /* as  << 
204 };                                                111 };
205                                                   112 
206 #endif /* _NET_TIMESTAMPING_H */                  113 #endif /* _NET_TIMESTAMPING_H */
207                                                   114 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php