Commit 8f772029 authored by James Ko's avatar James Ko Committed by AndersBroman
Browse files

Add support for IEEE 802.15.4 32-bit FCS

Make FCS length a variable.
Modify protocol configuration to include FCS type option.

Change-Id: I1e08f5b6b43907833464c20d798163343ce67a76
Reviewed-on: https://code.wireshark.org/review/32139


Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: AndersBroman's avatarAnders Broman <a.broman58@gmail.com>
parent 0a035b14
Pipeline #49409433 passed with stage
in 38 minutes and 55 seconds
This diff is collapsed.
......@@ -369,6 +369,12 @@ typedef enum {
#define IEEE802159_MPX_WISUN_SUBID_6LOWPAN 1
#define IEEE802159_MPX_WISUN_SUBID_SECURITY 2
typedef enum {
IEEE802154_FCS_OK_BIT = 0, /* TI CC24xx CRC_OK bit */
IEEE802154_FCS_16_BIT = 1, /* ITU-T CRC16 */
IEEE802154_FCS_32_BIT = 2, /* CCITT CRC32 */
} ieee802154_fcs_type_t;
/* Structure containing information regarding all necessary packet fields. */
typedef struct {
/* Frame control field. */
......@@ -571,4 +577,6 @@ extern ieee802154_map_tab_t ieee802154_map;
extern const value_string ieee802154_mpx_kmp_id_vals[];
extern gint ieee802154_fcs_len;
#endif /* PACKET_IEEE802154_H */
......@@ -1070,7 +1070,7 @@ static int dissect_wisun_netricity_sc(tvbuff_t *tvb, packet_info *pinfo, proto_t
pinfo->fragmented = save_fragmented;
} else {
// the decryption function expects the tvb with the FCS as part of the reported length
frame = tvb_new_subset_length_caplen(frame, 0, -1, tvb_reported_length(frame)+IEEE802154_FCS_LEN);
frame = tvb_new_subset_length_caplen(frame, 0, -1, tvb_reported_length(frame)+ieee802154_fcs_len);
tvbuff_t *payload = ieee802154_decrypt_payload(frame, mhr_len, pinfo, ieee802154_tree, packet);
if (payload) {
guint pie_size = ieee802154_dissect_payload_ies(payload, pinfo, ieee802154_tree, packet);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment