aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-http.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-08-21 23:33:23 -0700
committerGuy Harris <guy@alum.mit.edu>2016-08-22 06:34:06 +0000
commit5825f59ddccb8af2b4a06356f61195dd26c977d7 (patch)
tree5250e297808ccc0dd7dd36c688dbba8d53368c75 /epan/dissectors/packet-http.h
parentefdcb25360621e5ac14f276b37964f27f4ce0ba4 (diff)
Pass an HTTP message type to all HTTP subdissectors.
This gets complicated, because those subdissectors might be called by other dissectors as well. We need a better way of passing that sort of out-of-bound information. Pull some routines used for processing Content-Type parameters into common code; we can't guarantee that the media parameters passed in would be writable (passing it as *the* data hid that; passing a structure with that *and* the HTTP message type revealed it), so don't convert it to lower-case in place. Use that information, if available, to determine whether an IPP message is a requet or a response. Change-Id: I4bccc9f05cd0b14ad445be7ab37b3d884d841325 Reviewed-on: https://code.wireshark.org/review/17216 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-http.h')
-rw-r--r--epan/dissectors/packet-http.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/epan/dissectors/packet-http.h b/epan/dissectors/packet-http.h
index 179ca200a0..2ff906ca57 100644
--- a/epan/dissectors/packet-http.h
+++ b/epan/dissectors/packet-http.h
@@ -85,4 +85,17 @@ typedef struct _http_conv_t {
http_req_res_t *req_res_tail;
} http_conv_t;
+typedef enum _http_type {
+ HTTP_REQUEST,
+ HTTP_RESPONSE,
+ HTTP_NOTIFICATION,
+ HTTP_OTHERS
+} http_type_t;
+
+/** Passed to dissectors called by the HTTP dissector. */
+typedef struct _http_message_info_t {
+ http_type_t type; /* Message type; may be HTTP_OTHERS if not called by HTTP */
+ const char *media_str; /* Content-Type parameters */
+} http_message_info_t;
+
#endif /* __PACKET_HTTP_H__ */