summaryrefslogtreecommitdiffstats
path: root/ssl/record/record.h
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2015-03-26 13:12:24 +0000
committerMatt Caswell <matt@openssl.org>2015-03-26 17:25:48 +0000
commite5bf62f716f71e4df6995a07d1fbc4cad82a2637 (patch)
tree51e3b4d40c88d232744a055aed3527d1fcadf729 /ssl/record/record.h
parent3497ac5d333af98947d0356146a0898e2398d321 (diff)
Define SEQ_NUM_SIZE
Replace the hard coded value 8 (the size of the sequence number) with a constant defined in a macro. Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'ssl/record/record.h')
-rw-r--r--ssl/record/record.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/ssl/record/record.h b/ssl/record/record.h
index 29fc752e6a..99af914b5b 100644
--- a/ssl/record/record.h
+++ b/ssl/record/record.h
@@ -127,6 +127,8 @@ typedef struct ssl3_buffer_st {
int left;
} SSL3_BUFFER;
+#define SEQ_NUM_SIZE 8
+
typedef struct ssl3_record_st {
/* type of record */
/*
@@ -166,15 +168,15 @@ typedef struct ssl3_record_st {
/* sequence number, needed by DTLS1 */
/*
* r
- */ unsigned char seq_num[8];
+ */ unsigned char seq_num[SEQ_NUM_SIZE];
} SSL3_RECORD;
typedef struct dtls1_bitmap_st {
- unsigned long map; /* track 32 packets on 32-bit systems and 64
- * - on 64-bit systems */
+ /* Track 32 packets on 32-bit systems and 64 - on 64-bit systems */
+ unsigned long map;
- unsigned char max_seq_num[8]; /* max record number seen so far, 64-bit
- * value in big-endian encoding */
+ /* Max record number seen so far, 64-bit value in big-endian encoding */
+ unsigned char max_seq_num[SEQ_NUM_SIZE];
} DTLS1_BITMAP;
typedef struct record_pqueue_st {