Lines Matching full:data
47 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
105 static int dgram_free(BIO *data);
114 static int dgram_sctp_free(BIO *data);
174 char *data;
221 bio_dgram_data *data = NULL;
225 data = OPENSSL_malloc(sizeof(bio_dgram_data));
226 if (data == NULL)
228 memset(data, 0x00, sizeof(bio_dgram_data));
229 bi->ptr = data;
237 bio_dgram_data *data;
243 data = (bio_dgram_data *)a->ptr;
244 if(data != NULL) OPENSSL_free(data);
267 bio_dgram_data *data = (bio_dgram_data *)b->ptr;
271 if (data->next_timeout.tv_sec > 0 || data->next_timeout.tv_usec > 0)
285 data->socket_timeout.tv_sec = timeout / 1000;
286 data->socket_timeout.tv_usec = (timeout % 1000) * 1000;
289 sz.i = sizeof(data->socket_timeout);
291 &(data->socket_timeout), (void *)&sz) < 0)
294 OPENSSL_assert(sz.s<=sizeof(data->socket_timeout));
301 memcpy(&timeleft, &(data->next_timeout), sizeof(struct timeval));
319 if ((data->socket_timeout.tv_sec == 0 && data->socket_timeout.tv_usec == 0) ||
320 (data->socket_timeout.tv_sec > timeleft.tv_sec) ||
321 (data->socket_timeout.tv_sec == timeleft.tv_sec &&
322 data->socket_timeout.tv_usec >= timeleft.tv_usec))
342 bio_dgram_data *data = (bio_dgram_data *)b->ptr;
345 if (data->next_timeout.tv_sec > 0 || data->next_timeout.tv_usec > 0)
348 int timeout = data->socket_timeout.tv_sec * 1000 +
349 data->socket_timeout.tv_usec / 1000;
354 if ( setsockopt(b->num, SOL_SOCKET, SO_RCVTIMEO, &(data->socket_timeout),
365 bio_dgram_data *data = (bio_dgram_data *)b->ptr;
396 if ( ! data->connected && ret >= 0)
405 data->_errno = get_last_socket_error();
417 bio_dgram_data *data = (bio_dgram_data *)b->ptr;
420 if ( data->connected )
424 int peerlen = sizeof(data->peer);
426 if (data->peer.sa.sa_family == AF_INET)
427 peerlen = sizeof(data->peer.sa_in);
429 else if (data->peer.sa.sa_family == AF_INET6)
430 peerlen = sizeof(data->peer.sa_in6);
433 ret=sendto(b->num, (char *)in, inl, 0, &data->peer.sa, peerlen);
435 ret=sendto(b->num, in, inl, 0, &data->peer.sa, peerlen);
445 data->_errno = get_last_socket_error();
448 if ( data->_errno == EMSGSIZE)
462 bio_dgram_data *data = NULL;
477 data = (bio_dgram_data *)b->ptr;
531 memcpy(&data->peer,to,sizeof(data->peer.sa_in));
535 memcpy(&data->peer,to,sizeof(data->peer.sa_in6));
539 memcpy(&data->peer,to,sizeof(data->peer.sa));
603 data->mtu = sockopt_val - 8 - 20;
604 ret = data->mtu;
619 data->mtu = sockopt_val - 8 - 40;
620 ret = data->mtu;
633 switch (data->peer.sa.sa_family)
641 if (IN6_IS_ADDR_V4MAPPED(&data->peer.sa_in6.sin6_addr))
654 return data->mtu;
657 data->mtu = num;
665 data->connected = 1;
669 data->peer,to,sizeof(data->peer.sa_in));
673 memcpy(&data->peer,to,sizeof(data->peer.sa_in6));
677 memcpy(&data->peer,to,sizeof(data->peer.sa));
683 data->connected = 0;
684 memset(&(data->peer), 0x00, sizeof(data->peer));
688 switch (data->peer.sa.sa_family)
691 ret=sizeof(data->peer.sa_in);
695 ret=sizeof(data->peer.sa_in6);
699 ret=sizeof(data->peer.sa);
704 memcpy(ptr,&data->peer,(ret=num));
711 memcpy(&data->peer,to,sizeof(data->peer.sa_in));
715 memcpy(&data->peer,to,sizeof(data->peer.sa_in6));
719 memcpy(&data->peer,to,sizeof(data->peer.sa));
724 memcpy(&(data->next_timeout), ptr, sizeof(struct timeval));
828 if ( data->_errno == WSAETIMEDOUT)
830 if ( data->_errno == EAGAIN)
834 data->_errno = 0;
841 if ( data->_errno == EMSGSIZE)
844 data->_errno = 0;
893 /* Activate SCTP-AUTH for DATA and FORWARD-TSN chunks */
959 bio_dgram_sctp_data *data = NULL;
963 data = OPENSSL_malloc(sizeof(bio_dgram_sctp_data));
964 if (data == NULL)
966 memset(data, 0x00, sizeof(bio_dgram_sctp_data));
968 data->prinfo.pr_policy = SCTP_PR_SCTP_NONE;
970 bi->ptr = data;
978 bio_dgram_sctp_data *data;
984 data = (bio_dgram_sctp_data *)a->ptr;
985 if(data != NULL) OPENSSL_free(data);
1012 bio_dgram_sctp_data *data = (bio_dgram_sctp_data *)b->ptr;
1025 memset(&data->rcvinfo, 0x00, sizeof(struct bio_dgram_sctp_rcvinfo));
1049 data->rcvinfo.rcv_sid = rcvinfo->rcv_sid;
1050 data->rcvinfo.rcv_ssn = rcvinfo->rcv_ssn;
1051 data->rcvinfo.rcv_flags = rcvinfo->rcv_flags;
1052 data->rcvinfo.rcv_ppid = rcvinfo->rcv_ppid;
1053 data->rcvinfo.rcv_tsn = rcvinfo->rcv_tsn;
1054 data->rcvinfo.rcv_cumtsn = rcvinfo->rcv_cumtsn;
1055 data->rcvinfo.rcv_context = rcvinfo->rcv_context;
1064 data->rcvinfo.rcv_sid = sndrcvinfo->sinfo_stream;
1065 data->rcvinfo.rcv_ssn = sndrcvinfo->sinfo_ssn;
1066 data->rcvinfo.rcv_flags = sndrcvinfo->sinfo_flags;
1067 data->rcvinfo.rcv_ppid = sndrcvinfo->sinfo_ppid;
1068 data->rcvinfo.rcv_tsn = sndrcvinfo->sinfo_tsn;
1069 data->rcvinfo.rcv_cumtsn = sndrcvinfo->sinfo_cumtsn;
1070 data->rcvinfo.rcv_context = sndrcvinfo->sinfo_context;
1097 if (data->saved_message.length > 0)
1099 dgram_sctp_write(data->saved_message.bio, data->saved_message.data,
1100 data->saved_message.length);
1101 OPENSSL_free(data->saved_message.data);
1102 data->saved_message.length = 0;
1130 if (data->handle_notifications != NULL)
1131 data->handle_notifications(b, data->notification_context, (void*) out);
1183 data->_errno = get_last_socket_error();
1188 if (!data->peer_auth_tested)
1216 data->peer_auth_tested = 1;
1225 bio_dgram_sctp_data *data = (bio_dgram_sctp_data *)b->ptr;
1226 struct bio_dgram_sctp_sndinfo *sinfo = &(data->sndinfo);
1227 struct bio_dgram_sctp_prinfo *pinfo = &(data->prinfo);
1243 /* If we're send anything else than application data,
1258 if (data->save_shutdown && !BIO_dgram_sctp_wait_for_dry(b))
1260 data->saved_message.bio = b;
1261 data->saved_message.length = inl;
1262 data->saved_message.data = OPENSSL_malloc(inl);
1263 memcpy(data->saved_message.data, in, inl);
1324 data->_errno = get_last_socket_error();
1333 bio_dgram_sctp_data *data = NULL;
1338 data = (bio_dgram_sctp_data *)b->ptr;
1348 data->mtu = 16384;
1349 ret = data->mtu;
1357 data->mtu = 16384;
1358 ret = data->mtu;
1372 data->in_handshake = 1;
1374 data->in_handshake = 0;
1376 ret = setsockopt(b->num, IPPROTO_SCTP, SCTP_NODELAY, &data->in_handshake, sizeof(int));
1427 data->ccs_sent = 1;
1434 data->ccs_rcvd = 1;
1437 if (data->ccs_rcvd == 1 && data->ccs_sent == 1)
1464 data->ccs_rcvd = 0;
1465 data->ccs_sent = 0;
1473 memcpy(ptr, &(data->sndinfo), num);
1481 memcpy(&(data->sndinfo), ptr, num);
1488 memcpy(ptr, &data->rcvinfo, num);
1497 memcpy(&(data->rcvinfo), ptr, num);
1504 memcpy(ptr, &(data->prinfo), num);
1512 memcpy(&(data->prinfo), ptr, num);
1517 data->save_shutdown = 1;
1519 data->save_shutdown = 0;
1536 bio_dgram_sctp_data *data = (bio_dgram_sctp_data *) b->ptr;
1540 data->handle_notifications = handle_notifications;
1541 data->notification_context = context;
1562 bio_dgram_sctp_data *data = (bio_dgram_sctp_data *)b->ptr;
1658 if (data->handle_notifications != NULL)
1659 data->handle_notifications(b, data->notification_context, (void*) &snp);
1706 bio_dgram_sctp_data *data = (bio_dgram_sctp_data *)b->ptr;
1747 if (data->handle_notifications != NULL)
1748 data->handle_notifications(b, data->notification_context, (void*) &snp);