diff options
author | Eric Dumazet | 2007-03-19 01:33:16 +0100 |
---|---|---|
committer | David S. Miller | 2007-04-26 07:24:04 +0200 |
commit | ae40eb1ef30ab4120bd3c8b7e3da99ee53d27a23 (patch) | |
tree | b5ae288b3c27d13bde9648c41d7db3cfe1884bc2 /net/x25 | |
parent | [TCP/DCCP/RANDOM]: Remove unused exports. (diff) | |
download | kernel-qcow2-linux-ae40eb1ef30ab4120bd3c8b7e3da99ee53d27a23.tar.gz kernel-qcow2-linux-ae40eb1ef30ab4120bd3c8b7e3da99ee53d27a23.tar.xz kernel-qcow2-linux-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 <dada1@cosmosbay.com>
CC: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/x25')
-rw-r--r-- | net/x25/af_x25.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index e62ba41b05c5..a19884315622 100644 --- a/net/x25/af_x25.c +++ b/net/x25/af_x25.c @@ -1280,6 +1280,12 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) rc = sock_get_timestamp(sk, (struct timeval __user *)argp); break; + case SIOCGSTAMPNS: + rc = -EINVAL; + if (sk) + rc = sock_get_timestampns(sk, + (struct timespec __user *)argp); + break; case SIOCGIFADDR: case SIOCSIFADDR: case SIOCGIFDSTADDR: @@ -1521,6 +1527,12 @@ static int compat_x25_ioctl(struct socket *sock, unsigned int cmd, rc = compat_sock_get_timestamp(sk, (struct timeval __user*)argp); break; + case SIOCGSTAMPNS: + rc = -EINVAL; + if (sk) + rc = compat_sock_get_timestampns(sk, + (struct timespec __user*)argp); + break; case SIOCGIFADDR: case SIOCSIFADDR: case SIOCGIFDSTADDR: |