diff options
author | Ole Troan <ot@cisco.com> | 2017-06-13 21:15:40 +0200 |
---|---|---|
committer | Pavel Kotucek <pkotucek@cisco.com> | 2017-06-27 12:01:34 +0200 |
commit | ed92925f4d5535d7dd3e6de058ae90af209d5a8f (patch) | |
tree | de87748974eac8e7260e11267ef446f2599708a6 /src/vppinfra | |
parent | 75c3995b218c1604ccee7f9aa052191214f4067f (diff) |
FLOWPROBE: Add flowstartns, flowendns and tcpcontrolbits
- fixed problem with tcp_flag
- changed flowtimestamp into NTP format
Change-Id: I4ef05d6c69c5c078a0c80d59c5ccb0c85b924ba6
Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/vppinfra')
-rw-r--r-- | src/vppinfra/time.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/vppinfra/time.h b/src/vppinfra/time.h index 3b89cf789fe..3fdc7d43ea8 100644 --- a/src/vppinfra/time.h +++ b/src/vppinfra/time.h @@ -242,6 +242,15 @@ unix_time_now_nsec (void) return 1e9 * ts.tv_sec + ts.tv_nsec; } +always_inline void +unix_time_now_nsec_fraction (u32 * sec, u32 * nsec) +{ + struct timespec ts; + syscall (SYS_clock_gettime, CLOCK_REALTIME, &ts); + *sec = ts.tv_sec; + *nsec = ts.tv_nsec; +} + always_inline f64 unix_usage_now (void) { @@ -274,6 +283,11 @@ unix_time_now_nsec (void) return 0; } +always_inline void +unix_time_now_nsec_fraction (u32 * sec, u32 * nsec) +{ +} + always_inline f64 unix_usage_now (void) { |