|
From: <sv...@va...> - 2012-07-11 14:33:21
|
tom 2012-07-11 15:33:10 +0100 (Wed, 11 Jul 2012)
New Revision: 12730
Log:
Add support for the SIOCSHWTSTAMP ioctl, based on a patch
from Arseny Solokha. Fixes BZ#296792.
Modified files:
trunk/coregrind/m_syswrap/syswrap-linux.c
trunk/include/vki/vki-linux.h
Modified: trunk/coregrind/m_syswrap/syswrap-linux.c (+8 -0)
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-linux.c 2012-07-11 15:28:13 +01:00 (rev 12729)
+++ trunk/coregrind/m_syswrap/syswrap-linux.c 2012-07-11 15:33:10 +01:00 (rev 12730)
@@ -4489,6 +4489,13 @@
(Addr)&((struct vki_ifreq *)ARG3)->ifr_map,
sizeof(((struct vki_ifreq *)ARG3)->ifr_map) );
break;
+ case VKI_SIOCSHWTSTAMP: /* Set hardware time stamping */
+ PRE_MEM_RASCIIZ( "ioctl(SIOCSHWTSTAMP)",
+ (Addr)((struct vki_ifreq *)ARG3)->vki_ifr_name );
+ PRE_MEM_READ( "ioctl(SIOCSHWTSTAMP)",
+ (Addr)((struct vki_ifreq *)ARG3)->vki_ifr_data,
+ sizeof(struct vki_hwtstamp_config) );
+ break;
case VKI_SIOCSIFTXQLEN: /* Set the tx queue length */
PRE_MEM_RASCIIZ( "ioctl(SIOCSIFTXQLEN)",
(Addr)((struct vki_ifreq *)ARG3)->vki_ifr_name );
@@ -5756,6 +5763,7 @@
case VKI_SIOCSIFFLAGS: /* set flags */
case VKI_SIOCSIFMAP: /* Set device parameters */
+ case VKI_SIOCSHWTSTAMP: /* Set hardware time stamping */
case VKI_SIOCSIFTXQLEN: /* Set the tx queue length */
case VKI_SIOCSIFDSTADDR: /* set remote PA address */
case VKI_SIOCSIFBRDADDR: /* set broadcast PA address */
Modified: trunk/include/vki/vki-linux.h (+12 -0)
===================================================================
--- trunk/include/vki/vki-linux.h 2012-07-11 15:28:13 +01:00 (rev 12729)
+++ trunk/include/vki/vki-linux.h 2012-07-11 15:33:10 +01:00 (rev 12730)
@@ -1622,6 +1622,8 @@
#define VKI_SIOCGIFMAP 0x8970 /* Get device parameters */
#define VKI_SIOCSIFMAP 0x8971 /* Set device parameters */
+#define VKI_SIOCSHWTSTAMP 0x89B0 /* Set hardware time stamping */
+
//----------------------------------------------------------------------
// From linux-2.6.8.1/include/linux/ppdev.h
//----------------------------------------------------------------------
@@ -2978,6 +2980,16 @@
#define VKI_KVM_S390_INITIAL_RESET _VKI_IO(KVMIO, 0x97)
#define VKI_KVM_NMI _VKI_IO(KVMIO, 0x9a)
+//----------------------------------------------------------------------
+// From linux-2.6/include/linux/net_stamp.h
+//----------------------------------------------------------------------
+
+struct vki_hwtstamp_config {
+ int flags;
+ int tx_type;
+ int rx_filter;
+};
+
#endif // __VKI_LINUX_H
/*--------------------------------------------------------------------*/
|