summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-zbee-security.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:33 +0000
commit9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9 (patch)
tree2784370cda9bbf2da9114d70f05399c0b229d28c /epan/dissectors/packet-zbee-security.h
parentAdding debian version 4.2.6-1. (diff)
downloadwireshark-9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9.tar.xz
wireshark-9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9.zip
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/packet-zbee-security.h')
-rw-r--r--epan/dissectors/packet-zbee-security.h57
1 files changed, 29 insertions, 28 deletions
diff --git a/epan/dissectors/packet-zbee-security.h b/epan/dissectors/packet-zbee-security.h
index aa897ac5..1865ff5d 100644
--- a/epan/dissectors/packet-zbee-security.h
+++ b/epan/dissectors/packet-zbee-security.h
@@ -16,41 +16,42 @@
/* Structure containing the fields stored in the Aux Header */
typedef struct{
/* The fields of the Aux Header */
- guint8 control; /* needed to decrypt */
- guint32 counter; /* needed to decrypt */
- guint64 src64; /* needed to decrypt */
- guint8 key_seqno;
+ uint8_t control; /* needed to decrypt */
+ uint32_t counter; /* needed to decrypt */
+ uint64_t src64; /* needed to decrypt */
+ uint8_t key_seqno;
- guint8 level;
- guint8 key_id; /* needed to decrypt */
- gboolean nonce;
+ uint8_t level;
+ uint8_t key_id; /* needed to decrypt */
+ bool nonce;
} zbee_security_packet;
/* Bit masks for the Security Control Field. */
-#define ZBEE_SEC_CONTROL_LEVEL 0x07
-#define ZBEE_SEC_CONTROL_KEY 0x18
-#define ZBEE_SEC_CONTROL_NONCE 0x20
+#define ZBEE_SEC_CONTROL_LEVEL 0x07
+#define ZBEE_SEC_CONTROL_KEY 0x18
+#define ZBEE_SEC_CONTROL_NONCE 0x20
+#define ZBEE_SEC_CONTROL_VERIFIED_FC 0x40
/* ZigBee security levels. */
-#define ZBEE_SEC_NONE 0x00
-#define ZBEE_SEC_MIC32 0x01
-#define ZBEE_SEC_MIC64 0x02
-#define ZBEE_SEC_MIC128 0x03
-#define ZBEE_SEC_ENC 0x04
-#define ZBEE_SEC_ENC_MIC32 0x05
-#define ZBEE_SEC_ENC_MIC64 0x06
-#define ZBEE_SEC_ENC_MIC128 0x07
+#define ZBEE_SEC_NONE 0x00
+#define ZBEE_SEC_MIC32 0x01
+#define ZBEE_SEC_MIC64 0x02
+#define ZBEE_SEC_MIC128 0x03
+#define ZBEE_SEC_ENC 0x04
+#define ZBEE_SEC_ENC_MIC32 0x05
+#define ZBEE_SEC_ENC_MIC64 0x06
+#define ZBEE_SEC_ENC_MIC128 0x07
/* ZigBee Key Types */
-#define ZBEE_SEC_KEY_LINK 0x00
-#define ZBEE_SEC_KEY_NWK 0x01
-#define ZBEE_SEC_KEY_TRANSPORT 0x02
-#define ZBEE_SEC_KEY_LOAD 0x03
+#define ZBEE_SEC_KEY_LINK 0x00
+#define ZBEE_SEC_KEY_NWK 0x01
+#define ZBEE_SEC_KEY_TRANSPORT 0x02
+#define ZBEE_SEC_KEY_LOAD 0x03
/* ZigBee Security Constants. */
-#define ZBEE_SEC_CONST_L 2
-#define ZBEE_SEC_CONST_NONCE_LEN (ZBEE_SEC_CONST_BLOCKSIZE-ZBEE_SEC_CONST_L-1)
-#define ZBEE_SEC_CONST_BLOCKSIZE 16
+#define ZBEE_SEC_CONST_L 2
+#define ZBEE_SEC_CONST_NONCE_LEN (ZBEE_SEC_CONST_BLOCKSIZE-ZBEE_SEC_CONST_L-1)
+#define ZBEE_SEC_CONST_BLOCKSIZE 16
/* CCM* Flags */
#define ZBEE_SEC_CCM_FLAG_L 0x01 /* 3-bit encoding of (L-1). */
@@ -64,11 +65,11 @@ typedef struct{
extern void zbee_security_register (module_t *module, int proto);
/* Security Dissector Routine. */
-extern tvbuff_t *dissect_zbee_secure(tvbuff_t *, packet_info *, proto_tree *, guint);
-extern gboolean zbee_sec_ccm_decrypt(const gchar *, const gchar *, const gchar *, const gchar *, gchar *, guint, guint, guint);
+extern tvbuff_t *dissect_zbee_secure(tvbuff_t *, packet_info *, proto_tree *, unsigned);
+extern bool zbee_sec_ccm_decrypt(const char *, const char *, const char *, const char *, char *, unsigned, unsigned, unsigned);
/* nwk key ring update */
-extern void zbee_sec_add_key_to_keyring(packet_info *, const guint8 *);
+extern void zbee_sec_add_key_to_keyring(packet_info *, const uint8_t *);
#endif /* PACKET_ZBEE_SECURITY_H */