aboutsummaryrefslogtreecommitdiffstats
path: root/net/x25/af_x25.c
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/x25/af_x25.c
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/x25/af_x25.c')
-rw-r--r--net/x25/af_x25.c12
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)
1280 rc = sock_get_timestamp(sk, 1280 rc = sock_get_timestamp(sk,
1281 (struct timeval __user *)argp); 1281 (struct timeval __user *)argp);
1282 break; 1282 break;
1283 case SIOCGSTAMPNS:
1284 rc = -EINVAL;
1285 if (sk)
1286 rc = sock_get_timestampns(sk,
1287 (struct timespec __user *)argp);
1288 break;
1283 case SIOCGIFADDR: 1289 case SIOCGIFADDR:
1284 case SIOCSIFADDR: 1290 case SIOCSIFADDR:
1285 case SIOCGIFDSTADDR: 1291 case SIOCGIFDSTADDR:
@@ -1521,6 +1527,12 @@ static int compat_x25_ioctl(struct socket *sock, unsigned int cmd,
1521 rc = compat_sock_get_timestamp(sk, 1527 rc = compat_sock_get_timestamp(sk,
1522 (struct timeval __user*)argp); 1528 (struct timeval __user*)argp);
1523 break; 1529 break;
1530 case SIOCGSTAMPNS:
1531 rc = -EINVAL;
1532 if (sk)
1533 rc = compat_sock_get_timestampns(sk,
1534 (struct timespec __user*)argp);
1535 break;
1524 case SIOCGIFADDR: 1536 case SIOCGIFADDR:
1525 case SIOCSIFADDR: 1537 case SIOCSIFADDR:
1526 case SIOCGIFDSTADDR: 1538 case SIOCGIFDSTADDR: