Lines Matching defs:d1

94 	DTLS1_STATE *d1;
97 if ((d1=OPENSSL_malloc(sizeof *d1)) == NULL) return (0);
98 memset(d1,0, sizeof *d1);
100 /* d1->handshake_epoch=0; */
102 d1->bitmap.length=64;
104 d1->bitmap.length=sizeof(d1->bitmap.map) * 8;
106 pq_64bit_init(&(d1->bitmap.map));
107 pq_64bit_init(&(d1->bitmap.max_seq_num));
109 pq_64bit_init(&(d1->next_bitmap.map));
110 pq_64bit_init(&(d1->next_bitmap.max_seq_num));
112 d1->unprocessed_rcds.q=pqueue_new();
113 d1->processed_rcds.q=pqueue_new();
114 d1->buffered_messages = pqueue_new();
115 d1->sent_messages=pqueue_new();
119 d1->cookie_len = sizeof(s->d1->cookie);
122 if( ! d1->unprocessed_rcds.q || ! d1->processed_rcds.q
123 || ! d1->buffered_messages || ! d1->sent_messages)
125 if ( d1->unprocessed_rcds.q) pqueue_free(d1->unprocessed_rcds.q);
126 if ( d1->processed_rcds.q) pqueue_free(d1->processed_rcds.q);
127 if ( d1->buffered_messages) pqueue_free(d1->buffered_messages);
128 if ( d1->sent_messages) pqueue_free(d1->sent_messages);
129 OPENSSL_free(d1);
133 s->d1=d1;
145 while( (item = pqueue_pop(s->d1->unprocessed_rcds.q)) != NULL)
150 pqueue_free(s->d1->unprocessed_rcds.q);
152 while( (item = pqueue_pop(s->d1->processed_rcds.q)) != NULL)
157 pqueue_free(s->d1->processed_rcds.q);
159 while( (item = pqueue_pop(s->d1->buffered_messages)) != NULL)
166 pqueue_free(s->d1->buffered_messages);
168 while ( (item = pqueue_pop(s->d1->sent_messages)) != NULL)
175 pqueue_free(s->d1->sent_messages);
177 pq_64bit_free(&(s->d1->bitmap.map));
178 pq_64bit_free(&(s->d1->bitmap.max_seq_num));
180 pq_64bit_free(&(s->d1->next_bitmap.map));
181 pq_64bit_free(&(s->d1->next_bitmap.max_seq_num));
183 OPENSSL_free(s->d1);