diff options
| author | Eric Dumazet <[email protected]> | 2007-03-19 00:33:16 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2007-04-26 05:24:04 +0000 |
| commit | ae40eb1ef30ab4120bd3c8b7e3da99ee53d27a23 (patch) | |
| tree | b5ae288b3c27d13bde9648c41d7db3cfe1884bc2 /net/packet/af_packet.c | |
| parent | [TCP/DCCP/RANDOM]: Remove unused exports. (diff) | |
| download | kernel-ae40eb1ef30ab4120bd3c8b7e3da99ee53d27a23.tar.gz kernel-ae40eb1ef30ab4120bd3c8b7e3da99ee53d27a23.zip | |
[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 <[email protected]>
CC: Stephen Hemminger <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/packet/af_packet.c')
| -rw-r--r-- | net/packet/af_packet.c | 2 |
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, } case SIOCGSTAMP: return sock_get_timestamp(sk, (struct timeval __user *)arg); + case SIOCGSTAMPNS: + return sock_get_timestampns(sk, (struct timespec __user *)arg); #ifdef CONFIG_INET case SIOCADDRT: |
