aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-json.c
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2023-04-18 12:40:03 -0700
committerGuy Harris <gharris@sonic.net>2023-04-18 13:45:32 -0700
commit99c0b44fa42a0eb163faabd36fb25e42411bcaf5 (patch)
tree4f30d812cd118a073efd6c87896664baac5d4553 /epan/dissectors/packet-json.c
parent568a22c9b03241468e8f1898986c967f31ac035b (diff)
Decouple the media_type dissector table from HTTP.
Put the header containing the structure that should be passed to dissectors in the media_type dissector table, and the code that creates the media_type dissector table, into epan/dissectors/packet-media-type.h and epan/dissectors/packet-media-type.h, respectively. Change the names of types, enum values, structure fields, and variables to speak of "media containers" and "content" rather than to speak of HTTP or messages; HTTP is not the only protocol or data format that can contain media type headers and data whose type is specified by media type headers.
Diffstat (limited to 'epan/dissectors/packet-json.c')
-rw-r--r--epan/dissectors/packet-json.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/epan/dissectors/packet-json.c b/epan/dissectors/packet-json.c
index 9dbc75a28d..638fc4318f 100644
--- a/epan/dissectors/packet-json.c
+++ b/epan/dissectors/packet-json.c
@@ -24,7 +24,7 @@
#include <wiretap/wtap.h>
-#include "packet-http.h"
+#include "packet-media-type.h"
#include "packet-acdr.h"
#include "packet-json.h"
@@ -483,7 +483,7 @@ dissect_json(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
json_parser_data_t parser_data;
tvbparse_t *tt;
- http_message_info_t *message_info;
+ media_content_info_t *content_info;
const char *data_name;
int offset;
@@ -510,14 +510,14 @@ dissect_json(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
/*
* No information from "match_string"
*/
- message_info = (http_message_info_t *)data;
- if (message_info == NULL) {
+ content_info = (media_content_info_t *)data;
+ if (content_info == NULL) {
/*
* No information from dissector data
*/
data_name = NULL;
} else {
- data_name = message_info->media_str;
+ data_name = content_info->media_str;
if (! (data_name && data_name[0])) {
/*
* No information from dissector data