diff --git a/epan/dissectors/file-pcapng-darwin.c b/epan/dissectors/file-pcapng-darwin.c index 23d46c5a7e..c11994918f 100644 --- a/epan/dissectors/file-pcapng-darwin.c +++ b/epan/dissectors/file-pcapng-darwin.c @@ -142,7 +142,8 @@ static void dissect_darwin_process_info_option(proto_tree *option_tree, proto_item *option_item, packet_info *pinfo, tvbuff_t *tvb, int offset, int unknown_option_hf, - guint32 option_code, guint32 option_length) + guint32 option_code, guint32 option_length, + guint encoding _U_) { char *str; e_guid_t uuid; @@ -202,17 +203,17 @@ proto_register_pcapng_darwin_process_info(void) { &hf_pcapng_darwin_process_id, { "Darwin Process ID", "pcapng.darwin.process_id", FT_UINT32, BASE_DEC_HEX, NULL, 0x00, - "Process ID for Darwin Proces Info", HFILL } + "Process ID for Darwin Process Info", HFILL } }, { &hf_pcapng_option_darwin_process_name, { "Darwin Process Name", "pcapng.darwin.process_name", FT_STRING, BASE_NONE, NULL, 0x00, - "Process name for Darwin Proces Info", HFILL } + "Process name for Darwin Process Info", HFILL } }, { &hf_pcapng_option_darwin_process_uuid, { "Darwin Process UUID", "pcapng.darwin.process_uuid", FT_GUID, BASE_NONE, NULL, 0x00, - "Process UUID for Darwin Proces Info", HFILL } + "Process UUID for Darwin Process Info", HFILL } }, }; diff --git a/epan/dissectors/file-pcapng.c b/epan/dissectors/file-pcapng.c index 263720d05a..423c1cd22b 100644 --- a/epan/dissectors/file-pcapng.c +++ b/epan/dissectors/file-pcapng.c @@ -561,6 +561,7 @@ gint dissect_options(proto_tree *tree, packet_info *pinfo, option_item = proto_tree_add_item(options_tree, hf_pcapng_option, tvb, offset, -1, ENC_NA); option_tree = proto_item_add_subtree(option_item, ett_pcapng_option); + /* TODO: could have done this once outside of loop? */ switch (block_type) { case BLOCK_SECTION_HEADER: hfj_pcapng_option_code = hf_pcapng_option_code_section_header; @@ -1239,7 +1240,7 @@ gint dissect_options(proto_tree *tree, packet_info *pinfo, /* Use local block handling if available */ if (p_local_block_callback) { p_local_block_callback->option_dissector(option_tree, option_item, pinfo, tvb, offset, - hf_pcapng_option_data, option_code, option_length); + hf_pcapng_option_data, option_code, option_length, encoding); } else { proto_tree_add_item(option_tree, hf_pcapng_option_data, tvb, offset, option_length, ENC_NA); @@ -1247,6 +1248,7 @@ gint dissect_options(proto_tree *tree, packet_info *pinfo, offset += option_length; } + /* Pad this option out to next 4 bytes */ if ((option_length % 4) != 0) { proto_item_set_len(option_item, option_length + 2 * 2 + (4 - option_length % 4)); option_length = 4 - option_length % 4; diff --git a/epan/dissectors/file-pcapng.h b/epan/dissectors/file-pcapng.h index 7cbfc265fe..d31dce7bd6 100644 --- a/epan/dissectors/file-pcapng.h +++ b/epan/dissectors/file-pcapng.h @@ -28,7 +28,8 @@ typedef void (local_block_dissect_t)(proto_tree *tree, packet_info *pinfo, tvbuf typedef void (local_block_option_dissect_t)(proto_tree *option_tree, proto_item *option_item, packet_info *pinfo, tvbuff_t *tvb, int offset, int unknown_option_hf, - guint32 option_code, guint32 option_length); + guint32 option_code, guint32 option_length, + guint encoding); typedef struct { const char* name;