diff options
author | Guy Harris <gharris@sonic.net> | 2021-03-11 13:56:40 -0800 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2021-03-11 13:56:40 -0800 |
commit | 2561f1e9f891aeb61b4d2fc16e553c870b1d6c7c (patch) | |
tree | f3134c1edba567ad499a6a2f4e3eda2315694fd3 /wiretap/libpcap.c | |
parent | 98485a1c277801bbe23c6e7b873f1cb6937bd243 (diff) |
libwiretap: don't have a central table of file type/subtype name mappings.
Let individual file type/subtype modules register their
backwards-compatibility names, rather than having a centralized table
that would need to be updated along with the module.
Diffstat (limited to 'wiretap/libpcap.c')
-rw-r--r-- | wiretap/libpcap.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/wiretap/libpcap.c b/wiretap/libpcap.c index a7d3a125ac..c86b0e8966 100644 --- a/wiretap/libpcap.c +++ b/wiretap/libpcap.c @@ -1414,7 +1414,23 @@ void register_pcap(void) pcap_nokia_file_type_subtype = wtap_register_file_type_subtype(&pcap_nokia_info); /* - * Register name for backwards compatibility with the + * We now call the libpcap file format just pcap, but we allow + * the various variants of it to be specified using names + * containing "libpcap" as well as "pcap", for backwards + * compatibility. + * + * Register names for that purpose. + */ + wtap_register_compatibility_file_subtype_name("libpcap", "pcap"); + wtap_register_compatibility_file_subtype_name("nseclibpcap", "nsecpcap"); + wtap_register_compatibility_file_subtype_name("aixlibpcap", "aixpcap"); + wtap_register_compatibility_file_subtype_name("modlibpcap", "modpcap"); + wtap_register_compatibility_file_subtype_name("nokialibpcap", "nokiapcap"); + wtap_register_compatibility_file_subtype_name("rh6_1libpcap", "rh6_1pcap"); + wtap_register_compatibility_file_subtype_name("suse6_3libpcap", "suse6_3pcap"); + + /* + * Register names for backwards compatibility with the * wtap_filetypes table in Lua. */ wtap_register_backwards_compatibility_lua_name("PCAP", |