summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dcerpc-epm.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:53 +0000
commita86c5f7cae7ec9a3398300555a0b644689d946a1 (patch)
tree39fe4b107c71174fd1e8a8ceb9a4d2aa14116248 /epan/dissectors/packet-dcerpc-epm.c
parentReleasing progress-linux version 4.2.6-1~progress7.99u1. (diff)
downloadwireshark-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 'epan/dissectors/packet-dcerpc-epm.c')
-rw-r--r--epan/dissectors/packet-dcerpc-epm.c158
1 files changed, 79 insertions, 79 deletions
diff --git a/epan/dissectors/packet-dcerpc-epm.c b/epan/dissectors/packet-dcerpc-epm.c
index d809e986..1dc71126 100644
--- a/epan/dissectors/packet-dcerpc-epm.c
+++ b/epan/dissectors/packet-dcerpc-epm.c
@@ -19,52 +19,52 @@
void proto_register_epm (void);
void proto_reg_handoff_epm (void);
-static int proto_epm3 = -1;
-static int proto_epm4 = -1;
-
-static int hf_epm_opnum = -1;
-static int hf_epm_inquiry_type = -1;
-static int hf_epm_object = -1;
-static int hf_epm_if_id = -1;
-static int hf_epm_ver_maj = -1;
-static int hf_epm_ver_min = -1;
-static int hf_epm_ver_opt = -1;
-static int hf_epm_hnd = -1;
-static int hf_epm_max_ents = -1;
-static int hf_epm_num_ents = -1;
-static int hf_epm_uuid = -1;
-static int hf_epm_uuid_version = -1;
-static int hf_epm_tower_length = -1;
-/* static int hf_epm_tower_data = -1; */
-static int hf_epm_max_towers = -1;
-static int hf_epm_num_towers = -1;
-static int hf_epm_rc = -1;
-static int hf_epm_replace = -1;
-static int hf_epm_tower_num_floors = -1;
-static int hf_epm_tower_rhs_len = -1;
-static int hf_epm_tower_lhs_len = -1;
-static int hf_epm_tower_proto_id = -1;
-static int hf_epm_annotation = -1;
-static int hf_epm_ann_offset = -1;
-static int hf_epm_ann_len = -1;
-static int hf_epm_proto_named_pipes = -1;
-static int hf_epm_proto_netbios_name = -1;
-static int hf_epm_proto_ip = -1;
-static int hf_epm_proto_udp_port = -1;
-static int hf_epm_proto_tcp_port = -1;
-static int hf_epm_proto_http_port = -1;
-
-static gint ett_epm = -1;
-static gint ett_epm_tower_floor = -1;
-static gint ett_epm_entry = -1;
-
-static expert_field ei_epm_proto_undecoded = EI_INIT;
+static int proto_epm3;
+static int proto_epm4;
+
+static int hf_epm_opnum;
+static int hf_epm_inquiry_type;
+static int hf_epm_object;
+static int hf_epm_if_id;
+static int hf_epm_ver_maj;
+static int hf_epm_ver_min;
+static int hf_epm_ver_opt;
+static int hf_epm_hnd;
+static int hf_epm_max_ents;
+static int hf_epm_num_ents;
+static int hf_epm_uuid;
+static int hf_epm_uuid_version;
+static int hf_epm_tower_length;
+/* static int hf_epm_tower_data; */
+static int hf_epm_max_towers;
+static int hf_epm_num_towers;
+static int hf_epm_rc;
+static int hf_epm_replace;
+static int hf_epm_tower_num_floors;
+static int hf_epm_tower_rhs_len;
+static int hf_epm_tower_lhs_len;
+static int hf_epm_tower_proto_id;
+static int hf_epm_annotation;
+static int hf_epm_ann_offset;
+static int hf_epm_ann_len;
+static int hf_epm_proto_named_pipes;
+static int hf_epm_proto_netbios_name;
+static int hf_epm_proto_ip;
+static int hf_epm_proto_udp_port;
+static int hf_epm_proto_tcp_port;
+static int hf_epm_proto_http_port;
+
+static int ett_epm;
+static int ett_epm_tower_floor;
+static int ett_epm_entry;
+
+static expert_field ei_epm_proto_undecoded;
/* the UUID is identical for interface versions 3 and 4 */
static e_guid_t uuid_epm = { 0xe1af8308, 0x5d1f, 0x11c9, { 0x91, 0xa4, 0x08, 0x00, 0x2b, 0x14, 0xa0, 0xfa } };
-static guint16 ver_epm3 = 3;
-static guint16 ver_epm4 = 4;
+static uint16_t ver_epm3 = 3;
+static uint16_t ver_epm4 = 4;
@@ -81,13 +81,13 @@ static const value_string ep_service[] = {
[size_is(tower_len)] char tower[];
} twr_t, *twr_p_t;
*/
-static int epm_dissect_tower (tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep);
+static int epm_dissect_tower (tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep);
static int
epm_dissect_pointer_IF_ID(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
- dcerpc_info *di, guint8 *drep)
+ dcerpc_info *di, uint8_t *drep)
{
offset = dissect_ndr_uuid_t (tvb, offset, pinfo, tree, di, drep,
di->hf_index, NULL);
@@ -101,7 +101,7 @@ epm_dissect_pointer_IF_ID(tvbuff_t *tvb, int offset,
static int
epm_dissect_pointer_UUID(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
- dcerpc_info *di, guint8 *drep)
+ dcerpc_info *di, uint8_t *drep)
{
offset = dissect_ndr_uuid_t (tvb, offset, pinfo, tree, di, drep,
di->hf_index, NULL);
@@ -111,7 +111,7 @@ epm_dissect_pointer_UUID(tvbuff_t *tvb, int offset,
static int
epm_dissect_ept_lookup_rqst (tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
- dcerpc_info *di, guint8 *drep)
+ dcerpc_info *di, uint8_t *drep)
{
offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
hf_epm_inquiry_type, NULL);
@@ -139,13 +139,13 @@ epm_dissect_ept_lookup_rqst (tvbuff_t *tvb, int offset,
static int
epm_dissect_ept_entry_t(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *parent_tree,
- dcerpc_info *di, guint8 *drep)
+ dcerpc_info *di, uint8_t *drep)
{
proto_item *item=NULL;
proto_tree *tree=NULL;
int old_offset=offset;
- guint32 len;
- const guint8 *str;
+ uint32_t len;
+ const uint8_t *str;
if(di->conformant_run){
return offset;
@@ -184,7 +184,7 @@ epm_dissect_ept_entry_t(tvbuff_t *tvb, int offset,
static int
epm_dissect_ept_entry_t_array(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
- dcerpc_info *di, guint8 *drep)
+ dcerpc_info *di, uint8_t *drep)
{
offset = dissect_ndr_ucvarray(tvb, offset, pinfo, tree, di, drep,
epm_dissect_ept_entry_t);
@@ -195,7 +195,7 @@ epm_dissect_ept_entry_t_array(tvbuff_t *tvb, int offset,
static int
epm_dissect_ept_lookup_resp (tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
- dcerpc_info *di, guint8 *drep)
+ dcerpc_info *di, uint8_t *drep)
{
offset = dissect_ndr_ctx_hnd (tvb, offset, pinfo, tree, di, drep,
hf_epm_hnd, NULL);
@@ -216,7 +216,7 @@ epm_dissect_ept_lookup_resp (tvbuff_t *tvb, int offset,
static int
epm_dissect_uuid (tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
- dcerpc_info *di, guint8 *drep)
+ dcerpc_info *di, uint8_t *drep)
{
offset = dissect_ndr_uuid_t (tvb, offset, pinfo, tree, di, drep,
hf_epm_uuid, NULL);
@@ -297,12 +297,12 @@ static const value_string proto_id_vals[] = {
static int
epm_dissect_tower_data (tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
- dcerpc_info *di, guint8 *drep _U_)
+ dcerpc_info *di, uint8_t *drep _U_)
{
- guint16 num_floors, ii;
+ uint16_t num_floors, ii;
const char *uuid_name;
- guint8 u8little_endian = DREP_LITTLE_ENDIAN;
- const guint8 *str;
+ uint8_t u8little_endian = DREP_LITTLE_ENDIAN;
+ const uint8_t *str;
if(di->conformant_run){
return offset;
@@ -316,8 +316,8 @@ epm_dissect_tower_data (tvbuff_t *tvb, int offset,
proto_item *it = NULL;
proto_tree *tr = NULL;
int old_offset = offset;
- guint16 len;
- guint8 proto_id;
+ uint16_t len;
+ uint8_t proto_id;
e_guid_t uuid;
proto_item *pi;
@@ -327,7 +327,7 @@ epm_dissect_tower_data (tvbuff_t *tvb, int offset,
proto_tree_add_uint(tr, hf_epm_tower_lhs_len, tvb, offset, 2, len);
offset += 2;
- proto_id = tvb_get_guint8(tvb, offset);
+ proto_id = tvb_get_uint8(tvb, offset);
proto_tree_add_uint(tr, hf_epm_tower_proto_id, tvb, offset, 1, proto_id);
switch(proto_id){
@@ -357,7 +357,7 @@ epm_dissect_tower_data (tvbuff_t *tvb, int offset,
proto_tree_add_item(tr, hf_epm_uuid_version, tvb, offset+17, 2, ENC_BIG_ENDIAN); /* Major/minor bytes treated as big endian */
{
- guint16 version = tvb_get_ntohs(tvb, offset+17);
+ uint16_t version = tvb_get_ntohs(tvb, offset+17);
const char *service = dcerpc_get_proto_name(&uuid, version);
if (service || uuid_name) {
const char *s = service ? service : uuid_name;
@@ -369,8 +369,8 @@ epm_dissect_tower_data (tvbuff_t *tvb, int offset,
uuid.data4[2], uuid.data4[3],
uuid.data4[4], uuid.data4[5],
uuid.data4[6], uuid.data4[7],
- tvb_get_guint8(tvb, offset+17),
- tvb_get_guint8(tvb, offset+18));
+ tvb_get_uint8(tvb, offset+17),
+ tvb_get_uint8(tvb, offset+18));
}
}
break;
@@ -445,9 +445,9 @@ epm_dissect_tower_data (tvbuff_t *tvb, int offset,
}
static void
-epm_fmt_uuid_version( gchar *result, guint32 revision )
+epm_fmt_uuid_version( char *result, uint32_t revision )
{
- snprintf( result, ITEM_LABEL_LENGTH, "%d.%02d", (guint8)(( revision & 0xFF00 ) >> 8), (guint8)(revision & 0xFF) );
+ snprintf( result, ITEM_LABEL_LENGTH, "%d.%02d", (uint8_t)(( revision & 0xFF00 ) >> 8), (uint8_t)(revision & 0xFF) );
}
/* typedef struct {
@@ -458,9 +458,9 @@ epm_fmt_uuid_version( gchar *result, guint32 revision )
static int
epm_dissect_tower (tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
- dcerpc_info *di, guint8 *drep)
+ dcerpc_info *di, uint8_t *drep)
{
- guint3264 len;
+ uint3264_t len;
if(di->conformant_run){
return offset;
@@ -479,7 +479,7 @@ epm_dissect_tower (tvbuff_t *tvb, int offset,
static int
epm_dissect_tower_pointer (tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
- dcerpc_info *di, guint8 *drep)
+ dcerpc_info *di, uint8_t *drep)
{
offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
epm_dissect_tower, NDR_POINTER_PTR,
@@ -489,7 +489,7 @@ epm_dissect_tower_pointer (tvbuff_t *tvb, int offset,
static int
epm_dissect_tower_array (tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
- dcerpc_info *di, guint8 *drep)
+ dcerpc_info *di, uint8_t *drep)
{
offset = dissect_ndr_ucvarray(tvb, offset, pinfo, tree, di, drep,
epm_dissect_tower_pointer);
@@ -500,7 +500,7 @@ epm_dissect_tower_array (tvbuff_t *tvb, int offset,
static int
epm_dissect_ept_map_rqst (tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
- dcerpc_info *di, guint8 *drep)
+ dcerpc_info *di, uint8_t *drep)
{
/* [in, ptr] uuid_p_t object */
offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep,
@@ -526,7 +526,7 @@ epm_dissect_ept_map_rqst (tvbuff_t *tvb, int offset,
static int
epm_dissect_ept_map_resp (tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
- dcerpc_info *di, guint8 *drep)
+ dcerpc_info *di, uint8_t *drep)
{
/* [in, out] ept_lookup_handle_t *entry_handle */
offset = dissect_ndr_ctx_hnd (tvb, offset, pinfo, tree, di, drep,
@@ -551,7 +551,7 @@ epm_dissect_ept_map_resp (tvbuff_t *tvb, int offset,
static int
epm_dissect_ept_entry_t_ucarray(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
- dcerpc_info *di, guint8 *drep)
+ dcerpc_info *di, uint8_t *drep)
{
offset = dissect_ndr_ucarray(tvb, offset, pinfo, tree, di, drep,
epm_dissect_ept_entry_t);
@@ -562,7 +562,7 @@ epm_dissect_ept_entry_t_ucarray(tvbuff_t *tvb, int offset,
static int
epm_dissect_ept_insert_rqst (tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
- dcerpc_info *di, guint8 *drep)
+ dcerpc_info *di, uint8_t *drep)
{
offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
hf_epm_num_ents, NULL);
@@ -582,7 +582,7 @@ epm_dissect_ept_insert_rqst (tvbuff_t *tvb, int offset,
static int
epm_dissect_ept_insert_resp (tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
- dcerpc_info *di, guint8 *drep)
+ dcerpc_info *di, uint8_t *drep)
{
/* [out] error_status_t *status */
offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
@@ -595,7 +595,7 @@ epm_dissect_ept_insert_resp (tvbuff_t *tvb, int offset,
static int
epm_dissect_ept_delete_rqst (tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
- dcerpc_info *di, guint8 *drep)
+ dcerpc_info *di, uint8_t *drep)
{
offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
hf_epm_num_ents, NULL);
@@ -612,7 +612,7 @@ epm_dissect_ept_delete_rqst (tvbuff_t *tvb, int offset,
static int
epm_dissect_ept_delete_resp (tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
- dcerpc_info *di, guint8 *drep)
+ dcerpc_info *di, uint8_t *drep)
{
/* [out] error_status_t *status */
offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
@@ -626,7 +626,7 @@ epm_dissect_ept_delete_resp (tvbuff_t *tvb, int offset,
static int
epm_dissect_ept_lookup_handle_free_rqst (tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
- dcerpc_info *di, guint8 *drep)
+ dcerpc_info *di, uint8_t *drep)
{
/* [in, out] ept_lookup_handle_t *entry_handle */
offset = dissect_ndr_ctx_hnd (tvb, offset, pinfo, tree, di, drep,
@@ -638,7 +638,7 @@ epm_dissect_ept_lookup_handle_free_rqst (tvbuff_t *tvb, int offset,
static int
epm_dissect_ept_lookup_handle_free_resp (tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
- dcerpc_info *di, guint8 *drep)
+ dcerpc_info *di, uint8_t *drep)
{
/* [in, out] ept_lookup_handle_t *entry_handle */
offset = dissect_ndr_ctx_hnd (tvb, offset, pinfo, tree, di, drep,
@@ -651,7 +651,7 @@ epm_dissect_ept_lookup_handle_free_resp (tvbuff_t *tvb, int offset,
}
-static dcerpc_sub_dissector epm_dissectors[] = {
+static const dcerpc_sub_dissector epm_dissectors[] = {
{ 0, "Insert",
epm_dissect_ept_insert_rqst,
epm_dissect_ept_insert_resp },
@@ -742,7 +742,7 @@ proto_register_epm (void)
{ &hf_epm_tower_proto_id,
{ "Protocol", "epm.tower.proto_id", FT_UINT8, BASE_HEX, VALS(proto_id_vals), 0x0, "Protocol identifier", HFILL }}
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_epm,
&ett_epm_tower_floor,
&ett_epm_entry