aboutsummaryrefslogtreecommitdiffstats
path: root/net/packet
diff options
context:
space:
mode:
authorEric Dumazet <dada1@cosmosbay.com>2007-03-18 20:33:16 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:24:04 -0400
commitae40eb1ef30ab4120bd3c8b7e3da99ee53d27a23 (patch)
treeb5ae288b3c27d13bde9648c41d7db3cfe1884bc2 /net/packet
parentcb69cc52364690d7789940c480b3a9490784b680 (diff)
[NET]: Introduce SIOCGSTAMPNS ioctl to get timestamps with nanosec resolution
Now network timestamps use ktime_t infrastructure, we can add a new ioctl() SIOCGSTAMPNS command to get timestamps in 'struct timespec'. User programs can thus access to nanosecond resolution. Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> CC: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/packet')
-rw-r--r--net/packet/af_packet.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index f9866a8456a1..6f8c72d2413b 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -1545,6 +1545,8 @@ static int packet_ioctl(struct socket *sock, unsigned int cmd,
1545 } 1545 }
1546 case SIOCGSTAMP: 1546 case SIOCGSTAMP:
1547 return sock_get_timestamp(sk, (struct timeval __user *)arg); 1547 return sock_get_timestamp(sk, (struct timeval __user *)arg);
1548 case SIOCGSTAMPNS:
1549 return sock_get_timestampns(sk, (struct timespec __user *)arg);
1548 1550
1549#ifdef CONFIG_INET 1551#ifdef CONFIG_INET
1550 case SIOCADDRT: 1552 case SIOCADDRT: