diff options
author | Guy Harris <gharris@sonic.net> | 2021-02-19 14:46:42 -0800 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2021-02-19 23:20:24 +0000 |
commit | c80c16759ba23e29c70ec8fbe62e0a9870685a66 (patch) | |
tree | 713e51f79d78658eee7ad6eab0614d4627515d79 /epan/dissectors/packet-systemd-journal.c | |
parent | abf9e027fcc43cc9b458fb881f4f615d314ee7f6 (diff) |
wiretap: eliminate two WTAP_FILE_TYPE_SUBTYPE_ values.
Eliminate WTAP_FILE_TYPE_SUBTYPE_ERF and
WTAP_FILE_TYPE_SUBTYPE_SYSTEMD_JOURNAL - instead, fetch the values by
name, using wtap_name_to_file_type_subtype().
This requires that wtap_init() be called before epan_init(); that's
currently the case, but put in comments to indicate why it must continue
to be the case.
Diffstat (limited to 'epan/dissectors/packet-systemd-journal.c')
-rw-r--r-- | epan/dissectors/packet-systemd-journal.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/epan/dissectors/packet-systemd-journal.c b/epan/dissectors/packet-systemd-journal.c index b2d03f5914..9b450552c1 100644 --- a/epan/dissectors/packet-systemd-journal.c +++ b/epan/dissectors/packet-systemd-journal.c @@ -889,7 +889,11 @@ proto_register_systemd_journal(void) void proto_reg_handoff_systemd_journal(void) { - dissector_add_uint("wtap_fts_rec", WTAP_FILE_TYPE_SUBTYPE_SYSTEMD_JOURNAL, sje_handle); + int file_type_subtype_systemd_journal; + + file_type_subtype_systemd_journal = wtap_name_to_file_type_subtype("systemd_journal"); + if (file_type_subtype_systemd_journal != -1) + dissector_add_uint("wtap_fts_rec", file_type_subtype_systemd_journal, sje_handle); dissector_add_uint("pcapng.block_type", BLOCK_TYPE_SYSTEMD_JOURNAL, sje_handle); // It's possible to ship journal entries over HTTP/HTTPS using // systemd-journal-remote. Dissecting them on the wire isn't very |