diff options
author | Rich Salz <rsalz@akamai.com> | 2016-01-22 14:54:01 -0500 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-01-24 18:25:04 -0500 |
commit | cf2cede4a75f5e269f791bf1dcc029bba8c1f689 (patch) | |
tree | 093d88fcb4a288e899114adf1ecd2e208ac94758 /ssl/ssl_locl.h | |
parent | 68ed0b2480023424f280e98cda7199d913f3d7cc (diff) |
Move pqueue into ssl
This is an internal facility, never documented, not for
public consumption. Move it into ssl (where it's only used
for DTLS).
I also made the typedef's for pqueue and pitem follow our style: they
name structures, not pointers.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'ssl/ssl_locl.h')
-rw-r--r-- | ssl/ssl_locl.h | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/ssl/ssl_locl.h b/ssl/ssl_locl.h index d9ff1c2db3..3745f0f0e2 100644 --- a/ssl/ssl_locl.h +++ b/ssl/ssl_locl.h @@ -1390,6 +1390,30 @@ typedef struct hm_fragment_st { unsigned char *reassembly; } hm_fragment; +typedef struct pqueue_st pqueue; +typedef struct pitem_st pitem; + +struct pitem_st { + unsigned char priority[8]; /* 64-bit value in big-endian encoding */ + void *data; + pitem *next; +}; + +typedef struct pitem_st *piterator; + +pitem *pitem_new(unsigned char *prio64be, void *data); +void pitem_free(pitem *item); +pqueue* pqueue_new(void); +void pqueue_free(pqueue *pq); +pitem *pqueue_insert(pqueue *pq, pitem *item); +pitem *pqueue_peek(pqueue *pq); +pitem *pqueue_pop(pqueue *pq); +pitem *pqueue_find(pqueue *pq, unsigned char *prio64be); +pitem *pqueue_iterator(pqueue *pq); +pitem *pqueue_next(piterator *iter); +void pqueue_print(pqueue *pq); +int pqueue_size(pqueue *pq); + typedef struct dtls1_state_st { unsigned char cookie[DTLS1_COOKIE_LENGTH]; unsigned int cookie_len; @@ -1401,9 +1425,9 @@ typedef struct dtls1_state_st { unsigned short handshake_read_seq; /* Buffered handshake messages */ - pqueue buffered_messages; + pqueue *buffered_messages; /* Buffered (sent) handshake records */ - pqueue sent_messages; + pqueue *sent_messages; unsigned int link_mtu; /* max on-the-wire DTLS packet size */ unsigned int mtu; /* max DTLS packet size */ |