mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-27 20:36:31 -04:00
unix: add IoctlGetHwTstamp/IoctlGetHwTstamp on Linux
Add the ioctls to get/set the hardware timestamping configuration (SIOCSHWTSTAMP and SIOCGHWTSTAMP) along with relevant symbols. The usage is described in https://www.kernel.org/doc/Documentation/networking/timestamping.txt Change-Id: Ib7509feaf28218aeae497eff9ca6c0a532aa73c0 GitHub-Last-Rev: 47dc9dfec291d2b8f0c3df3aca1b3d3d510baecb GitHub-Pull-Request: golang/sys#224 Reviewed-on: https://go-review.googlesource.com/c/sys/+/620376 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
This commit is contained in:
committed by
Gopher Robot
parent
3932916d5c
commit
a57fdb8507
@@ -144,6 +144,7 @@ struct termios2 {
|
||||
#include <linux/netfilter.h>
|
||||
#include <linux/netfilter_ipv4.h>
|
||||
#include <linux/netlink.h>
|
||||
#include <linux/net_tstamp.h>
|
||||
#include <linux/nexthop.h>
|
||||
#include <linux/nfc.h>
|
||||
#include <linux/nl80211.h>
|
||||
@@ -4107,6 +4108,24 @@ type EthtoolDrvinfo C.struct_ethtool_drvinfo
|
||||
|
||||
type EthtoolTsInfo C.struct_ethtool_ts_info
|
||||
|
||||
type HwTstampConfig C.struct_hwtstamp_config
|
||||
|
||||
const (
|
||||
HWTSTAMP_FILTER_NONE = C.HWTSTAMP_FILTER_NONE
|
||||
HWTSTAMP_FILTER_ALL = C.HWTSTAMP_FILTER_ALL
|
||||
HWTSTAMP_FILTER_SOME = C.HWTSTAMP_FILTER_SOME
|
||||
HWTSTAMP_FILTER_PTP_V1_L4_EVENT = C.HWTSTAMP_FILTER_PTP_V1_L4_EVENT
|
||||
HWTSTAMP_FILTER_PTP_V2_L4_EVENT = C.HWTSTAMP_FILTER_PTP_V2_L4_EVENT
|
||||
HWTSTAMP_FILTER_PTP_V2_L2_EVENT = C.HWTSTAMP_FILTER_PTP_V2_L2_EVENT
|
||||
HWTSTAMP_FILTER_PTP_V2_EVENT = C.HWTSTAMP_FILTER_PTP_V2_EVENT
|
||||
)
|
||||
|
||||
const (
|
||||
HWTSTAMP_TX_OFF = C.HWTSTAMP_TX_OFF
|
||||
HWTSTAMP_TX_ON = C.HWTSTAMP_TX_ON
|
||||
HWTSTAMP_TX_ONESTEP_SYNC = C.HWTSTAMP_TX_ONESTEP_SYNC
|
||||
)
|
||||
|
||||
type (
|
||||
HIDRawReportDescriptor C.struct_hidraw_report_descriptor
|
||||
HIDRawDevInfo C.struct_hidraw_devinfo
|
||||
|
||||
Reference in New Issue
Block a user