Home | History | Annotate | Download | only in ssl

Lines Matching refs:d1

96 	DTLS1_STATE *d1;
99 if ((d1=OPENSSL_malloc(sizeof *d1)) == NULL) return (0);
100 memset(d1,0, sizeof *d1);
102 /* d1->handshake_epoch=0; */
104 d1->unprocessed_rcds.q=pqueue_new();
105 d1->processed_rcds.q=pqueue_new();
106 d1->buffered_messages = pqueue_new();
107 d1->sent_messages=pqueue_new();
108 d1->buffered_app_data.q=pqueue_new();
112 d1->cookie_len = sizeof(s->d1->cookie);
115 if( ! d1->unprocessed_rcds.q || ! d1->processed_rcds.q
116 || ! d1->buffered_messages || ! d1->sent_messages || ! d1->buffered_app_data.q)
118 if ( d1->unprocessed_rcds.q) pqueue_free(d1->unprocessed_rcds.q);
119 if ( d1->processed_rcds.q) pqueue_free(d1->processed_rcds.q);
120 if ( d1->buffered_messages) pqueue_free(d1->buffered_messages);
121 if ( d1->sent_messages) pqueue_free(d1->sent_messages);
122 if ( d1->buffered_app_data.q) pqueue_free(d1->buffered_app_data.q);
123 OPENSSL_free(d1);
127 s->d1=d1;
138 while( (item = pqueue_pop(s->d1->unprocessed_rcds.q)) != NULL)
149 while( (item = pqueue_pop(s->d1->processed_rcds.q)) != NULL)
160 while( (item = pqueue_pop(s->d1->buffered_messages)) != NULL)
168 while ( (item = pqueue_pop(s->d1->sent_messages)) != NULL)
176 while ( (item = pqueue_pop(s->d1->buffered_app_data.q)) != NULL)
191 pqueue_free(s->d1->unprocessed_rcds.q);
192 pqueue_free(s->d1->processed_rcds.q);
193 pqueue_free(s->d1->buffered_messages);
194 pqueue_free(s->d1->sent_messages);
195 pqueue_free(s->d1->buffered_app_data.q);
197 OPENSSL_free(s->d1);
208 if (s->d1)
210 unprocessed_rcds = s->d1->unprocessed_rcds.q;
211 processed_rcds = s->d1->processed_rcds.q;
212 buffered_messages = s->d1->buffered_messages;
213 sent_messages = s->d1->sent_messages;
214 buffered_app_data = s->d1->buffered_app_data.q;
218 memset(s->d1, 0, sizeof(*(s->d1)));
222 s->d1->cookie_len = sizeof(s->d1->cookie);
225 s->d1->unprocessed_rcds.q = unprocessed_rcds;
226 s->d1->processed_rcds.q = processed_rcds;
227 s->d1->buffered_messages = buffered_messages;
228 s->d1->sent_messages = sent_messages;
229 s->d1->buffered_app_data.q = buffered_app_data;
288 if (s->d1->next_timeout.tv_sec == 0 && s->d1->next_timeout.tv_usec == 0)
290 s->d1->timeout_duration = 1;
294 get_current_time(&(s->d1->next_timeout));
297 s->d1->next_timeout.tv_sec += s->d1->timeout_duration;
298 BIO_ctrl(SSL_get_rbio(s), BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT, 0, &(s->d1->next_timeout));
306 if (s->d1->next_timeout.tv_sec == 0 && s->d1->next_timeout.tv_usec == 0)
315 if (s->d1->next_timeout.tv_sec < timenow.tv_sec ||
316 (s->d1->next_timeout.tv_sec == timenow.tv_sec &&
317 s->d1->next_timeout.tv_usec <= timenow.tv_usec))
324 memcpy(timeleft, &(s->d1->next_timeout), sizeof(struct timeval));
368 s->d1->timeout_duration *= 2;
369 if (s->d1->timeout_duration > 60)
370 s->d1->timeout_duration = 60;
377 memset(&(s->d1->next_timeout), 0, sizeof(struct timeval));
378 s->d1->timeout_duration = 1;
379 BIO_ctrl(SSL_get_rbio(s), BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT, 0, &(s->d1->next_timeout));
395 state = s->d1;
436 s->d1->listen = 1;