aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/k12.c
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2020-07-29 01:30:54 -0700
committerGuy Harris <gharris@sonic.net>2020-07-29 09:05:24 +0000
commitf8efccc3cc1e8d604a4fd085ab9a0f0174e9b25f (patch)
treefab66a38a9126c70da2a011a426e4a93e90d32db /wiretap/k12.c
parent12621c5b641246bc7f26fb71bbc2045a844a2810 (diff)
wiretap: generate fake IDBs for more capture file types.
That makes them work as input to a mergecap that writes pcapng files. File types that don't have a single per-file encapsulation type need more work, with multiple fake IDBs, one for each packet encapsulation type seen in the file, unless we can generate real IDBs. Change-Id: I2859e4f7fb15ec0c0f31a4044dc15638e5db7826 Reviewed-on: https://code.wireshark.org/review/37983 Petri-Dish: Guy Harris <gharris@sonic.net> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <gharris@sonic.net>
Diffstat (limited to 'wiretap/k12.c')
-rw-r--r--wiretap/k12.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/wiretap/k12.c b/wiretap/k12.c
index 04fb1a8583..efac1ffc04 100644
--- a/wiretap/k12.c
+++ b/wiretap/k12.c
@@ -1089,6 +1089,14 @@ wtap_open_return_val k12_open(wtap *wth, int *err, gchar **err_info) {
wth->priv = (void *)file_data;
wth->file_tsprec = WTAP_TSPREC_NSEC;
+ /*
+ * Add an IDB; we don't know how many interfaces were
+ * involved, so we just say one interface, about which
+ * we only know the link-layer type, snapshot length,
+ * and time stamp resolution.
+ */
+ wtap_add_generated_idb(wth);
+
return WTAP_OPEN_MINE;
}