diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:53 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:53 +0000 |
commit | a86c5f7cae7ec9a3398300555a0b644689d946a1 (patch) | |
tree | 39fe4b107c71174fd1e8a8ceb9a4d2aa14116248 /epan/dissectors/packet-ipsec-tcp.c | |
parent | Releasing progress-linux version 4.2.6-1~progress7.99u1. (diff) | |
download | wireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.tar.xz wireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.zip |
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | epan/dissectors/packet-ipsec-tcp.c | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/epan/dissectors/packet-ipsec-tcp.c b/epan/dissectors/packet-ipsec-tcp.c index 82f834de..a997587d 100644 --- a/epan/dissectors/packet-ipsec-tcp.c +++ b/epan/dissectors/packet-ipsec-tcp.c @@ -27,18 +27,18 @@ void proto_reg_handoff_tcpencap(void); static dissector_handle_t tcpencap_handle; -static int hf_tcpencap_unknown = -1; -static int hf_tcpencap_zero = -1; -static int hf_tcpencap_seq = -1; -static int hf_tcpencap_ike_direction = -1; -static int hf_tcpencap_esp_zero = -1; -static int hf_tcpencap_magic = -1; -static int hf_tcpencap_proto = -1; -static int hf_tcpencap_magic2 = -1; - -static int proto_tcpencap = -1; -static gint ett_tcpencap = -1; -static gint ett_tcpencap_unknown = -1; +static int hf_tcpencap_unknown; +static int hf_tcpencap_zero; +static int hf_tcpencap_seq; +static int hf_tcpencap_ike_direction; +static int hf_tcpencap_esp_zero; +static int hf_tcpencap_magic; +static int hf_tcpencap_proto; +static int hf_tcpencap_magic2; + +static int proto_tcpencap; +static int ett_tcpencap; +static int ett_tcpencap_unknown; static const value_string tcpencap_ikedir_vals[] = { { 0x0000, "Server to client" }, @@ -65,24 +65,24 @@ static dissector_handle_t udp_handle; static int -packet_is_tcpencap(tvbuff_t *tvb, packet_info *pinfo, guint32 offset) +packet_is_tcpencap(tvbuff_t *tvb, packet_info *pinfo, uint32_t offset) { if ( /* Must be zero */ tvb_get_ntohl(tvb, offset + 0) != 0 || /* Lower 12 bits must be zero */ (tvb_get_ntohs(tvb, offset + 6) & 0xfff) != 0 || /* Protocol must be UDP or ESP */ - (tvb_get_guint8(tvb, offset + 13) != 17 && - tvb_get_guint8(tvb, offset + 13) != 50) + (tvb_get_uint8(tvb, offset + 13) != 17 && + tvb_get_uint8(tvb, offset + 13) != 50) ) { - return FALSE; + return false; } if(check_if_ndmp(tvb, pinfo)){ - return FALSE; + return false; } - return TRUE; + return true; } /* @@ -98,9 +98,9 @@ dissect_tcpencap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data proto_item *tree_item = NULL; proto_item *unknown_item = NULL; tvbuff_t *next_tvb; - guint32 reported_length = tvb_reported_length(tvb); - guint32 offset; - guint8 protocol; + uint32_t reported_length = tvb_reported_length(tvb); + uint32_t offset; + uint8_t protocol; col_set_str(pinfo->cinfo, COL_PROTOCOL, "TCPENCAP"); col_clear(pinfo->cinfo, COL_INFO); @@ -147,21 +147,21 @@ dissect_tcpencap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data return tvb_captured_length(tvb); } -static gboolean +static bool dissect_tcpencap_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { - guint32 reported_length = tvb_reported_length(tvb); - guint32 captured_length = tvb_captured_length(tvb); + uint32_t reported_length = tvb_reported_length(tvb); + uint32_t captured_length = tvb_captured_length(tvb); if (reported_length <= TRAILERLENGTH + 8 || /* Ensure we have enough bytes for packet_is_tcpencap analysis */ (reported_length - captured_length) > (TRAILERLENGTH - 13) || !packet_is_tcpencap(tvb, pinfo, reported_length - TRAILERLENGTH) ) { - return FALSE; + return false; } dissect_tcpencap(tvb, pinfo, tree, data); - return TRUE; + return true; } void @@ -203,7 +203,7 @@ proto_register_tcpencap(void) }; - static gint *ett[] = { + static int *ett[] = { &ett_tcpencap, &ett_tcpencap_unknown, }; |