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/ipv4/af_inet.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/ipv4/af_inet.c')
| -rw-r--r-- | net/ipv4/af_inet.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index cf358c84c440..df41856fc603 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c @@ -755,6 +755,9 @@ int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) case SIOCGSTAMP: err = sock_get_timestamp(sk, (struct timeval __user *)arg); break; + case SIOCGSTAMPNS: + err = sock_get_timestampns(sk, (struct timespec __user *)arg); + break; case SIOCADDRT: case SIOCDELRT: case SIOCRTMSG: |
