summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rx.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-rx.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-rx.c')
-rw-r--r--epan/dissectors/packet-rx.c146
1 files changed, 71 insertions, 75 deletions
diff --git a/epan/dissectors/packet-rx.c b/epan/dissectors/packet-rx.c
index 30a7b5cf..be4684fe 100644
--- a/epan/dissectors/packet-rx.c
+++ b/epan/dissectors/packet-rx.c
@@ -67,56 +67,56 @@ static const value_string rx_ack_type[] = {
{ 0, NULL }
};
-static int proto_rx = -1;
-static int hf_rx_epoch = -1;
-static int hf_rx_cid = -1;
-static int hf_rx_seq = -1;
-static int hf_rx_serial = -1;
-static int hf_rx_callnumber = -1;
-static int hf_rx_type = -1;
-static int hf_rx_flags = -1;
-static int hf_rx_flags_clientinit = -1;
-static int hf_rx_flags_request_ack = -1;
-static int hf_rx_flags_last_packet = -1;
-static int hf_rx_flags_more_packets = -1;
-static int hf_rx_flags_free_packet = -1;
-static int hf_rx_userstatus = -1;
-static int hf_rx_securityindex = -1;
-static int hf_rx_spare = -1;
-static int hf_rx_serviceid = -1;
-static int hf_rx_bufferspace = -1;
-static int hf_rx_maxskew = -1;
-static int hf_rx_first_packet = -1;
-static int hf_rx_prev_packet = -1;
-static int hf_rx_reason = -1;
-static int hf_rx_numacks = -1;
-static int hf_rx_ack_type = -1;
-static int hf_rx_ack = -1;
-static int hf_rx_challenge = -1;
-static int hf_rx_version = -1;
-static int hf_rx_nonce = -1;
-static int hf_rx_inc_nonce = -1;
-static int hf_rx_min_level = -1;
-static int hf_rx_level = -1;
-static int hf_rx_response = -1;
-static int hf_rx_encrypted = -1;
-static int hf_rx_kvno = -1;
-static int hf_rx_ticket_len = -1;
-static int hf_rx_ticket = -1;
-static int hf_rx_ifmtu = -1;
-static int hf_rx_maxmtu = -1;
-static int hf_rx_rwind = -1;
-static int hf_rx_maxpackets = -1;
-static int hf_rx_abort = -1;
-static int hf_rx_abortcode = -1;
-
-static gint ett_rx = -1;
-static gint ett_rx_flags = -1;
-static gint ett_rx_ack = -1;
-static gint ett_rx_challenge = -1;
-static gint ett_rx_response = -1;
-static gint ett_rx_encrypted = -1;
-static gint ett_rx_abort = -1;
+static int proto_rx;
+static int hf_rx_epoch;
+static int hf_rx_cid;
+static int hf_rx_seq;
+static int hf_rx_serial;
+static int hf_rx_callnumber;
+static int hf_rx_type;
+static int hf_rx_flags;
+static int hf_rx_flags_clientinit;
+static int hf_rx_flags_request_ack;
+static int hf_rx_flags_last_packet;
+static int hf_rx_flags_more_packets;
+static int hf_rx_flags_free_packet;
+static int hf_rx_userstatus;
+static int hf_rx_securityindex;
+static int hf_rx_spare;
+static int hf_rx_serviceid;
+static int hf_rx_bufferspace;
+static int hf_rx_maxskew;
+static int hf_rx_first_packet;
+static int hf_rx_prev_packet;
+static int hf_rx_reason;
+static int hf_rx_numacks;
+static int hf_rx_ack_type;
+static int hf_rx_ack;
+static int hf_rx_challenge;
+static int hf_rx_version;
+static int hf_rx_nonce;
+static int hf_rx_inc_nonce;
+static int hf_rx_min_level;
+static int hf_rx_level;
+static int hf_rx_response;
+static int hf_rx_encrypted;
+static int hf_rx_kvno;
+static int hf_rx_ticket_len;
+static int hf_rx_ticket;
+static int hf_rx_ifmtu;
+static int hf_rx_maxmtu;
+static int hf_rx_rwind;
+static int hf_rx_maxpackets;
+static int hf_rx_abort;
+static int hf_rx_abortcode;
+
+static int ett_rx;
+static int ett_rx_flags;
+static int ett_rx_ack;
+static int ett_rx_challenge;
+static int ett_rx_response;
+static int ett_rx_encrypted;
+static int ett_rx_abort;
static dissector_handle_t afs_handle;
@@ -127,7 +127,7 @@ dissect_rx_response_encrypted(tvbuff_t *tvb, proto_tree *parent_tree, int offset
proto_item *item;
int old_offset=offset;
int i;
- guint32 callnumber;
+ uint32_t callnumber;
item = proto_tree_add_item(parent_tree, hf_rx_encrypted, tvb, offset, -1, ENC_NA);
tree = proto_item_add_subtree(item, ett_rx_encrypted);
@@ -143,7 +143,7 @@ dissect_rx_response_encrypted(tvbuff_t *tvb, proto_tree *parent_tree, int offset
/*FIXME don't know how to handle this checksum, skipping it */
offset += 4;
- /* sequrityindex : 1 byte */
+ /* securityindex : 1 byte */
proto_tree_add_item(tree, hf_rx_securityindex, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 4;
@@ -169,19 +169,15 @@ dissect_rx_response_encrypted(tvbuff_t *tvb, proto_tree *parent_tree, int offset
static int
-dissect_rx_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int offset, guint32 seq, guint32 callnumber)
+dissect_rx_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int offset, uint32_t seq, uint32_t callnumber)
{
proto_tree *tree;
proto_item *item;
- guint32 version, tl;
+ uint32_t version, tl;
int old_offset=offset;
col_add_fstr(pinfo->cinfo, COL_INFO,
- "RESPONSE "
- "Seq: %lu "
- "Call: %lu "
- "Source Port: %s "
- "Destination Port: %s ",
+ "RESPONSE Seq: %lu Call: %lu Source Port: %s Destination Port: %s ",
(unsigned long)seq,
(unsigned long)callnumber,
udp_port_to_display(pinfo->pool, pinfo->srcport),
@@ -222,7 +218,7 @@ dissect_rx_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
}
static int
-dissect_rx_abort(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int offset, guint32 seq, guint32 callnumber)
+dissect_rx_abort(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int offset, uint32_t seq, uint32_t callnumber)
{
proto_tree *tree;
proto_item *item;
@@ -253,11 +249,11 @@ dissect_rx_abort(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int
static int
-dissect_rx_challenge(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int offset, guint32 seq, guint32 callnumber)
+dissect_rx_challenge(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int offset, uint32_t seq, uint32_t callnumber)
{
proto_tree *tree;
proto_item *item;
- guint32 version;
+ uint32_t version;
int old_offset=offset;
col_add_fstr(pinfo->cinfo, COL_INFO,
@@ -293,11 +289,11 @@ dissect_rx_challenge(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
}
static int
-dissect_rx_acks(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int offset, guint32 seq, guint32 callnumber)
+dissect_rx_acks(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int offset, uint32_t seq, uint32_t callnumber)
{
proto_tree *tree;
proto_item *item;
- guint8 num, reason;
+ uint8_t num, reason;
int old_offset = offset;
@@ -327,12 +323,12 @@ dissect_rx_acks(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int
offset += 4;
/* reason : 1 byte */
- reason = tvb_get_guint8(tvb, offset);
+ reason = tvb_get_uint8(tvb, offset);
proto_tree_add_item(tree, hf_rx_reason, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
/* nACKs */
- num = tvb_get_guint8(tvb, offset);
+ num = tvb_get_uint8(tvb, offset);
proto_tree_add_uint(tree, hf_rx_numacks, tvb, offset, 1, num);
offset += 1;
@@ -406,7 +402,7 @@ dissect_rx_flags(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *parent_tree,
NULL
};
- rxinfo->flags = tvb_get_guint8(tvb, offset);
+ rxinfo->flags = tvb_get_uint8(tvb, offset);
proto_tree_add_bitmask(parent_tree, tvb, offset, hf_rx_flags, ett_rx_flags, flags, ENC_NA);
@@ -422,17 +418,17 @@ dissect_rx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *dat
const char *version_type;
int offset = 0;
struct rxinfo rxinfo;
- guint8 type;
+ uint8_t type;
nstime_t ts;
- guint32 seq, callnumber;
- guint16 serviceid;
+ uint32_t seq, callnumber;
+ uint16_t serviceid;
/* Ensure we have enough data */
if (tvb_captured_length(tvb) < 28)
return 0;
/* Make sure it's a known type */
- type = tvb_get_guint8(tvb, 20);
+ type = tvb_get_uint8(tvb, 20);
if (!try_val_to_str(type, rx_types))
return 0;
@@ -474,7 +470,7 @@ dissect_rx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *dat
offset += 4;
/* type : 1 byte */
- type = tvb_get_guint8(tvb, offset);
+ type = tvb_get_uint8(tvb, offset);
proto_tree_add_uint(tree, hf_rx_type, tvb,
offset, 1, type);
offset += 1;
@@ -487,7 +483,7 @@ dissect_rx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *dat
proto_tree_add_item(tree, hf_rx_userstatus, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
- /* sequrityindex : 1 byte */
+ /* securityindex : 1 byte */
proto_tree_add_item(tree, hf_rx_securityindex, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -568,7 +564,7 @@ dissect_rx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *dat
break;
}
- return(tvb_captured_length(tvb));
+ return tvb_captured_length(tvb);
}
void
@@ -742,7 +738,7 @@ proto_register_rx(void)
NULL, 0, NULL, HFILL }},
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_rx,
&ett_rx_flags,
&ett_rx_ack,