Wireshark  4.3.0
The Wireshark network protocol analyzer
packet-http2.h
1 /* packet-http2.h
2  * Routines for HTTP/2 dissection
3  *
4  * Wireshark - Network traffic analyzer
5  * By Gerald Combs <gerald@wireshark.org>
6  * Copyright 1998 Gerald Combs
7  *
8  * SPDX-License-Identifier: GPL-2.0-or-later
9  */
10 #ifndef __PACKET_HTTP2_H__
11 #define __PACKET_HTTP2_H__
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif /* __cplusplus */
16 
17 /* http2 standard headers */
18 #define HTTP2_HEADER_CONTENT_ENCODING "content-encoding"
19 #define HTTP2_HEADER_STATUS ":status"
20 #define HTTP2_HEADER_STATUS_PARTIAL_CONTENT "206"
21 #define HTTP2_HEADER_METHOD ":method"
22 #define HTTP2_HEADER_METHOD_CONNECT "CONNECT"
23 #define HTTP2_HEADER_TRANSFER_ENCODING "transfer-encoding"
24 #define HTTP2_HEADER_PATH ":path"
25 #define HTTP2_HEADER_AUTHORITY ":authority"
26 #define HTTP2_HEADER_SCHEME ":scheme"
27 #define HTTP2_HEADER_CONTENT_TYPE "content-type"
28 #define HTTP2_HEADER_UNKNOWN "<unknown>"
29 /* http2 for grpc */
30 #define HTTP2_HEADER_GRPC_ENCODING "grpc-encoding"
31 
32 int dissect_http2_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_ );
33 
53 const gchar* http2_get_header_value(packet_info *pinfo, const gchar* name, gboolean the_other_direction);
54 
60 guint32 http2_get_stream_id(packet_info *pinfo);
61 
66 WS_DLL_PUBLIC gboolean
67 http2_get_stream_id_le(guint streamid, guint sub_stream_id, guint *sub_stream_id_out);
68 
73 WS_DLL_PUBLIC gboolean
74 http2_get_stream_id_ge(guint streamid, guint sub_stream_id, guint *sub_stream_id_out);
75 
76 WS_DLL_PUBLIC void
77 dissect_http2_settings_ext(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* http2_tree, guint offset);
78 
79 #ifdef __cplusplus
80 }
81 #endif /* __cplusplus */
82 
83 #endif
84 
85 /*
86  * Editor modelines - https://www.wireshark.org/tools/modelines.html
87  *
88  * Local variables:
89  * c-basic-offset: 4
90  * tab-width: 8
91  * indent-tabs-mode: nil
92  * End:
93  *
94  * vi: set shiftwidth=4 tabstop=8 expandtab:
95  * :indentSize=4:tabSize=8:noTabs=true:
96  */
Definition: packet_info.h:44
Definition: proto.h:904
Definition: tvbuff-int.h:35