systemd_journal: Add more fields.

Add more unofficial fields.

Change-Id: If402d98ef2d51913a798c18e9bb22ad23f8a1dd3
Reviewed-on: https://code.wireshark.org/review/29478
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
Gerald Combs 2018-09-07 14:50:16 -07:00
parent 4c9cbcd5ac
commit 5a06361582
1 changed files with 20 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/* packet-systemd-journal-export.c
/* packet-systemd-journal.c
* Routines for systemd journal export (application/vnd.fdo.journal) dissection
* Copyright 2018, Gerald Combs <gerald@wireshark.org>
*
@ -16,6 +16,7 @@
* Registered MIME type: application/vnd.fdo.journal
*
* To do:
* - Rename systemd_journal to sdjournal? It's easier to type.
* - Add an extcap module.
* - Add errno strings.
* - Pretty-print _CAP_EFFECTIVE
@ -136,6 +137,9 @@ static int hf_sj_userspace_usec = -1;
static int hf_sj_session_id = -1;
static int hf_sj_user_id = -1;
static int hf_sj_leader = -1;
static int hf_sj_job_type = -1;
static int hf_sj_job_result = -1;
static int hf_sj_user_invocation_id = -1;
// Metadata.
static int hf_sj_binary_data_len = -1;
@ -261,6 +265,9 @@ static void init_jf_to_hf_map(void) {
{ hf_sj_session_id, "SESSION_ID" },
{ hf_sj_user_id, "USER_ID" },
{ hf_sj_leader, "LEADER" },
{ hf_sj_job_type, "JOB_TYPE" },
{ hf_sj_job_result, "JOB_RESULT" },
{ hf_sj_user_invocation_id, "USER_INVOCATION_ID" },
{ 0, NULL }
};
jf_to_hf = (journal_field_hf_map*) g_memdup(jhmap, sizeof(jhmap));
@ -747,6 +754,18 @@ proto_register_systemd_journal(void)
{ "Leader", "systemd_journal.leader",
FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }
},
{ &hf_sj_job_type,
{ "Job type", "systemd_journal.job_type",
FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }
},
{ &hf_sj_job_result,
{ "Job result", "systemd_journal.job_result",
FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }
},
{ &hf_sj_user_invocation_id,
{ "User invocation ID", "systemd_journal.user_invocation_id",
FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }
},
{ &hf_sj_binary_data_len,
{ "Binary data length", "systemd_journal.binary_data_len",