aboutsummaryrefslogtreecommitdiffstats
path: root/enterprises.tsv
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2020-10-22 01:10:57 -0700
committerGuy Harris <gharris@sonic.net>2020-10-22 02:58:07 -0700
commitd0270415a9d198eae0b8c739b17780e6c347ebcd (patch)
treecf745f012fc0e4197558c6acac267704988dd95d /enterprises.tsv
parente16ef82d7c4ae292c9a46530124aef268c35011f (diff)
editcap, tshark: process IDBs in the middle of input files.
Instead of grabbing the set of IDBs found at open time, have a loop using wtap_get_next_interface_description() to read all unread IDBs run after opening the input file, after reading a packet from the input file, and after getting an EOF on the input file. Add a routine wtap_uses_interface_ids() to check whether the file type and subtype for a dump file uses interface IDs and requires IDBs. If so, in the aforementioned loop, add the IDBs to the dump stream. Add a routine wtap_dump_add_idb() to add IDBs to a dump stream. Have it call a file-format-specific routine to add the IDBs; the only file type that supports it is pcapng, and it 1) writes out the IDB and 2) adds it to the set of IDBs for the stream. Add a wtap_dump_params_init_no_idbs() routine that prevents the IDBs from the input file from being used to initialize the output file; use it in cases where we're using the aforementioned loop to copy over IDBs. Don't require any IDBs to be present when opening a pcapng file for writing; 1) the simplest pcapng file has just an SHB in it, 2) that requirement causes dumps that don't provide IDBs at open time to fail, and 3) the real issue is that we don't want packets with an interface ID not corresponding to a known IDB, and we already have a check for that. (There are some hacks here; eventually, when everything processes the IDBs in such a loop, we may be able to get rid of the "two favors of dump parameter initialization" hack.) Fixes #15844. Addresses the same issue in #15502, but there are other issues there that also need to be addressed. In addition, the merge code also needs to be changed to handle this.
Diffstat (limited to 'enterprises.tsv')
0 files changed, 0 insertions, 0 deletions