From 8c997ee5763266ccf2322faf142f04cc68532bfd Mon Sep 17 00:00:00 2001 From: etxrab Date: Sun, 24 Oct 2010 15:22:44 +0000 Subject: Back out 34627 and friends again. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34633 f5534014-38df-0310-8fa8-9805f1628bb7 --- epan/dissectors/packet-ieee802154.h | 61 ++++++++----------------------------- 1 file changed, 13 insertions(+), 48 deletions(-) (limited to 'epan/dissectors/packet-ieee802154.h') diff --git a/epan/dissectors/packet-ieee802154.h b/epan/dissectors/packet-ieee802154.h index c106be5f38..428f573359 100644 --- a/epan/dissectors/packet-ieee802154.h +++ b/epan/dissectors/packet-ieee802154.h @@ -27,9 +27,6 @@ #ifndef PACKET_IEEE802154_H #define PACKET_IEEE802154_H -/* Protocol Abbreviation */ -#define IEEE802154_PROTOABBREV_WPAN "wpan" - /* Packet Overhead from MAC header + footer (excluding addressing) */ #define IEEE802154_MAX_FRAME_LEN 127 #define IEEE802154_FCS_LEN 2 @@ -51,7 +48,7 @@ #define IEEE802154_CMD_ASRSP_PAN_FULL 0x01 #define IEEE802154_CMD_ASRSP_PAN_DENIED 0x02 -/* Bit Masks for Capability Information Field +/* Bit Masks for Capability Information Feild Included in Association Req. command */ #define IEEE802154_CMD_CINFO_ALT_PAN_COORD 0x01 #define IEEE802154_CMD_CINFO_DEVICE_TYPE 0x02 @@ -102,7 +99,7 @@ #define IEEE802154_FCF_SEC_EN 0x0008 #define IEEE802154_FCF_FRAME_PND 0x0010 #define IEEE802154_FCF_ACK_REQ 0x0020 -#define IEEE802154_FCF_INTRA_PAN 0x0040 /* known as PAN ID Compression in IEEE 802.15.4-2006 */ +#define IEEE802154_FCF_INTRA_PAN 0x0040 #define IEEE802154_FCF_DADDR_MASK 0x0C00 /* destination addressing mask */ #define IEEE802154_FCF_VERSION 0x3000 #define IEEE802154_FCF_SADDR_MASK 0xC000 /* source addressing mask */ @@ -167,7 +164,7 @@ typedef enum { /* Macro to check for payload encryption. */ #define IEEE802154_IS_ENCRYPTED(_level_) ((_level_) & 0x4) -/* Structure containing information regarding all necessary packet fields. */ +/* Structure containing information regarding all necessary packet feilds. */ typedef struct { /* Frame control field. */ gint32 version; @@ -183,11 +180,15 @@ typedef struct { /* Addressing Info. */ guint16 dst_pan; + union { + guint16 addr16; + guint64 addr64; + } dst; guint16 src_pan; - guint16 dst16; - guint64 dst64; - guint16 src16; - guint64 src64; + union { + guint16 addr16; + guint64 addr64; + } src; /* Security Info. */ ieee802154_security_level security_level; @@ -201,47 +202,11 @@ typedef struct { /* Command ID (only if frame_type == 0x3) */ guint8 command_id; - GHashTable *short_table; } ieee802154_packet; -typedef struct { - guint proto; - GHashTable *long_table; - GHashTable *short_table; -} ieee802154_addr_t; - -/* Key used by the short address hash table. */ -typedef struct { - guint16 pan; - guint16 addr; -} ieee802154_short_addr; - -/* A mapping record for a frame, pointed to by hash table */ -typedef struct { - int proto; /* protocol that created this record */ - guint start_fnum; - guint end_fnum; - guint64 addr64; - /*guint32 frame_counter; TODO for frame counter sequence checks. */ -} ieee802154_map_rec; - -#define IEEE802154_USER_MAPPING 0 - -typedef struct { - guint16 src_pan; - guint16 src16; - ieee802154_map_rec *map_rec; -} ieee802154_hints_t; /* Some Helper Function Definitions. */ -extern gchar *print_eui64(guint64); -extern gchar *print_eui64_oui(guint64); -extern proto_item *proto_tree_add_eui64(proto_tree *, int, tvbuff_t *, gint, gint, gint64); - -/* Short to Extended Address Prototypes */ -extern ieee802154_map_rec *ieee802154_addr_update(ieee802154_addr_t *, guint16, guint16, guint64, int, guint); -extern guint ieee802154_short_addr_hash(gconstpointer); -extern gboolean ieee802154_short_addr_equal(gconstpointer, gconstpointer); - +extern gchar *print_eui64(guint64); +extern gchar *print_eui64_oui(guint64); #endif /* PACKET_IEEE802154_H */ -- cgit v1.2.3