diff options
author | Anders Broman <anders.broman@ericsson.com> | 2012-03-13 08:36:52 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2012-03-13 08:36:52 +0000 |
commit | bb611755e98a63e40357723cfa53b2cbd263dd3f (patch) | |
tree | 353b56668ed674445897eb708d3c47a4b62d72e4 /wiretap | |
parent | cd1debf18387d901b09e5ad289bd3795855136e4 (diff) |
Add data structure to hold information from ISB:s
svn path=/trunk/; revision=41522
Diffstat (limited to 'wiretap')
-rw-r--r-- | wiretap/file_access.c | 2 | ||||
-rw-r--r-- | wiretap/pcapng.c | 5 | ||||
-rw-r--r-- | wiretap/wtap.h | 22 |
3 files changed, 27 insertions, 2 deletions
diff --git a/wiretap/file_access.c b/wiretap/file_access.c index 51a92f0ff0..5675cc22ef 100644 --- a/wiretap/file_access.c +++ b/wiretap/file_access.c @@ -1027,6 +1027,8 @@ wtap_dumper* wtap_dump_open_ng(const char *filename, int filetype, int encap, descr.if_filter_bpf_bytes= NULL; descr.if_os = NULL; descr.if_fcslen = -1; + descr.num_stat_entries = 0; /* Number of ISB:s */ + descr.interface_statistics = NULL; wdh->number_of_interfaces= 1; wdh->interface_data= g_array_new(FALSE, FALSE, sizeof(wtapng_if_descr_t)); g_array_append_val(wdh->interface_data, descr); diff --git a/wiretap/pcapng.c b/wiretap/pcapng.c index 5a99b137d6..333ad4042f 100644 --- a/wiretap/pcapng.c +++ b/wiretap/pcapng.c @@ -329,7 +329,8 @@ typedef struct wtapng_name_res_s { /* XXX */ } wtapng_name_res_t; -/* Interface Statistics */ +#if 0 +/* Interface Statistics moved to wtap.h*/ typedef struct wtapng_if_stats_s { /* mandatory */ guint32 interface_id; @@ -345,7 +346,7 @@ typedef struct wtapng_if_stats_s { guint64 isb_osdrop; guint64 isb_usrdeliv; } wtapng_if_stats_t; - +#endif typedef struct wtapng_block_s { guint32 type; /* block_type as defined by pcapng */ diff --git a/wiretap/wtap.h b/wiretap/wtap.h index 6ac2322210..2ab8b10f0e 100644 --- a/wiretap/wtap.h +++ b/wiretap/wtap.h @@ -939,8 +939,30 @@ typedef struct wtapng_if_descr_s { gchar *if_os; /**< NULL if not available, 12 A UTF-8 string containing the name of the operating system of the machine in which this interface is installed. */ gint8 if_fcslen; /**< -1 if unknown or changes between packets, opt 13 An integer value that specified the length of the Frame Check Sequence (in bits) for this interface. */ /* XXX: guint64 if_tsoffset; opt 14 A 64 bits integer value that specifies an offset (in seconds)...*/ + guint8 num_stat_entries; + GArray *interface_statistics; /**< An array holding the interface statistics from pcapng ISB:s or equivalent(?)*/ } wtapng_if_descr_t; + +/** + * Interface Statistics. pcap-ng Interface Statistics Block (ISB). + */ +typedef struct wtapng_if_stats_s { + /* mandatory */ + guint32 interface_id; + guint32 ts_high; + guint32 ts_low; + /* options */ + gchar *opt_comment; /**< NULL if not available */ + guint64 isb_starttime; + guint64 isb_endtime; + guint64 isb_ifrecv; + guint64 isb_ifdrop; + guint64 isb_filteraccept; + guint64 isb_osdrop; + guint64 isb_usrdeliv; +} wtapng_if_stats_t; + struct Buffer; struct wtap_dumper; |