forked from osmocom/wireshark
libpcap: don't generate a fake interface for LINKTYPE_ERF files.
The ERF code will generate interfaces based on the ERF records in the file, so don't bother adding an additional dummy interface.
This commit is contained in:
parent
d195847bb1
commit
d69d1271f0
|
@ -603,25 +603,16 @@ done:
|
|||
if (wth->file_encap == WTAP_ENCAP_ERF) {
|
||||
/*Reset the ERF interface lookup table*/
|
||||
libpcap->encap_priv = erf_priv_create();
|
||||
} else {
|
||||
/*
|
||||
* 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);
|
||||
}
|
||||
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
* XXX - this will be a bit weird if you're trying to convert
|
||||
* a LINKTYPE_ERF pcap file to a pcapng file; it'll have a
|
||||
* placeholder interface added here, *plus* interfaces
|
||||
* added from the ERF records. Ideally, at some point in
|
||||
* the future, libpcap will have a more pcapng-friendly API
|
||||
* for capturing, and the DAG capture code will use it, so that
|
||||
* if you're capturing on more than one interface, they'll all
|
||||
* get regular IDBs, with no need for the placeholder.
|
||||
*/
|
||||
wtap_add_generated_idb(wth);
|
||||
|
||||
return WTAP_OPEN_MINE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue