Lines Matching refs:num

100 static int dgram_write(BIO *h, const char *buf, int num);
109 static int dgram_sctp_write(BIO *h, const char *buf, int num);
224 bi->num=0;
256 SHUTDOWN2(a->num);
280 if (getsockopt(b->num, SOL_SOCKET, SO_RCVTIMEO,
290 if ( getsockopt(b->num, SOL_SOCKET, SO_RCVTIMEO,
326 if (setsockopt(b->num, SOL_SOCKET, SO_RCVTIMEO,
330 if ( setsockopt(b->num, SOL_SOCKET, SO_RCVTIMEO, &timeleft,
350 if (setsockopt(b->num, SOL_SOCKET, SO_RCVTIMEO,
354 if ( setsockopt(b->num, SOL_SOCKET, SO_RCVTIMEO, &(data->socket_timeout),
389 ret=recvfrom(b->num,out,outl,0,&sa.peer.sa,(void *)&sa.len);
421 ret=writesocket(b->num,in,inl);
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);
457 static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr)
482 num=0;
492 b->num= *((int *)ptr);
493 b->shutdown=(int)num;
500 if (ip != NULL) *ip=b->num;
501 ret=b->num;
510 b->shutdown=(int)num;
523 if (connect(b->num, to, sizeof(struct sockaddr)) < 0)
551 if (getsockname(b->num, &addr.sa, &addr_len) < 0)
560 if ((ret = setsockopt(b->num, IPPROTO_IP, IP_MTU_DISCOVER,
567 if ((ret = setsockopt(b->num, IPPROTO_IPV6, IPV6_MTU_DISCOVER,
584 if (getsockname(b->num, &addr.sa, &addr_len) < 0)
593 if ((ret = getsockopt(b->num, IPPROTO_IP, IP_MTU, (void *)&sockopt_val,
609 if ((ret = getsockopt(b->num, IPPROTO_IPV6, IPV6_MTU, (void *)&sockopt_val,
657 data->mtu = num;
658 ret = num;
702 if (num==0 || num>ret)
703 num=ret;
704 memcpy(ptr,&data->peer,(ret=num));
732 if (setsockopt(b->num, SOL_SOCKET, SO_RCVTIMEO,
737 if ( setsockopt(b->num, SOL_SOCKET, SO_RCVTIMEO, ptr,
750 if (getsockopt(b->num, SOL_SOCKET, SO_RCVTIMEO,
761 if ( getsockopt(b->num, SOL_SOCKET, SO_RCVTIMEO,
781 if (setsockopt(b->num, SOL_SOCKET, SO_SNDTIMEO,
786 if ( setsockopt(b->num, SOL_SOCKET, SO_SNDTIMEO, ptr,
799 if (getsockopt(b->num, SOL_SOCKET, SO_SNDTIMEO,
810 if ( getsockopt(b->num, SOL_SOCKET, SO_SNDTIMEO,
962 bi->num=0;
1002 ret = setsockopt(b->num, IPPROTO_SCTP, SCTP_AUTH_DELETE_KEY,
1035 n = recvmsg(b->num, &msg, 0);
1111 i = setsockopt(b->num, IPPROTO_SCTP, SCTP_EVENT, &event, sizeof(struct sctp_event));
1115 i = getsockopt(b->num, IPPROTO_SCTP, SCTP_EVENTS, &event, &eventsize);
1120 i = setsockopt(b->num, IPPROTO_SCTP, SCTP_EVENTS, &event, sizeof(struct sctp_event_subscribe));
1153 ret = getsockopt(b->num, SOL_SOCKET, SO_RCVBUF, &optval, &optlen);
1161 ret = getsockopt(b->num, IPPROTO_SCTP, SCTP_PARTIAL_DELIVERY_POINT,
1197 ii = getsockopt(b->num, IPPROTO_SCTP, SCTP_PEER_AUTH_CHUNKS, authchunks, &optlen);
1316 ret = sendmsg(b->num, &msg, 0);
1330 static long dgram_sctp_ctrl(BIO *b, int cmd, long num, void *ptr)
1371 if (num > 0)
1376 ret = setsockopt(b->num, IPPROTO_SCTP, SCTP_NODELAY, &data->in_handshake, sizeof(int));
1385 ret = getsockopt(b->num, IPPROTO_SCTP, SCTP_AUTH_ACTIVE_KEY, &authkeyid, &sockopt_len);
1406 ret = setsockopt(b->num, IPPROTO_SCTP, SCTP_AUTH_KEY, authkey, sockopt_len);
1412 ret = setsockopt(b->num, IPPROTO_SCTP, SCTP_AUTH_ACTIVE_KEY,
1422 ret = getsockopt(b->num, IPPROTO_SCTP, SCTP_AUTH_ACTIVE_KEY, &authkeyid, &sockopt_len);
1427 ret = setsockopt(b->num, IPPROTO_SCTP, SCTP_AUTH_ACTIVE_KEY,
1448 ret = getsockopt(b->num, IPPROTO_SCTP, SCTP_AUTH_ACTIVE_KEY, &authkeyid, &sockopt_len);
1457 ret = setsockopt(b->num, IPPROTO_SCTP, SCTP_AUTH_DEACTIVATE_KEY,
1465 ret = setsockopt(b->num, IPPROTO_SCTP, SCTP_AUTH_DELETE_KEY,
1477 if (num > (long) sizeof(struct bio_dgram_sctp_sndinfo))
1478 num = sizeof(struct bio_dgram_sctp_sndinfo);
1480 memcpy(ptr, &(data->sndinfo), num);
1481 ret = num;
1485 if (num > (long) sizeof(struct bio_dgram_sctp_sndinfo))
1486 num = sizeof(struct bio_dgram_sctp_sndinfo);
1488 memcpy(&(data->sndinfo), ptr, num);
1492 if (num > (long) sizeof(struct bio_dgram_sctp_rcvinfo))
1493 num = sizeof(struct bio_dgram_sctp_rcvinfo);
1495 memcpy(ptr, &data->rcvinfo, num);
1497 ret = num;
1501 if (num > (long) sizeof(struct bio_dgram_sctp_rcvinfo))
1502 num = sizeof(struct bio_dgram_sctp_rcvinfo);
1504 memcpy(&(data->rcvinfo), ptr, num);
1508 if (num > (long) sizeof(struct bio_dgram_sctp_prinfo))
1509 num = sizeof(struct bio_dgram_sctp_prinfo);
1511 memcpy(ptr, &(data->prinfo), num);
1512 ret = num;
1516 if (num > (long) sizeof(struct bio_dgram_sctp_prinfo))
1517 num = sizeof(struct bio_dgram_sctp_prinfo);
1519 memcpy(&(data->prinfo), ptr, num);
1523 if (num > 0)
1533 ret=dgram_ctrl(b, cmd, num, ptr);
1577 ret = setsockopt(b->num, IPPROTO_SCTP, SCTP_EVENT, &event, sizeof(struct sctp_event));
1580 ret = getsockopt(b->num, IPPROTO_SCTP, SCTP_EVENTS, &event, &eventsize);
1586 ret = setsockopt(b->num, IPPROTO_SCTP, SCTP_EVENTS, &event, sizeof(struct sctp_event_subscribe));
1603 n = recvmsg(b->num, &msg, MSG_PEEK);
1626 n = recvmsg(b->num, &msg, 0);
1645 ret = setsockopt(b->num, IPPROTO_SCTP, SCTP_EVENT, &event, sizeof(struct sctp_event));
1648 ret = getsockopt(b->num, IPPROTO_SCTP, SCTP_EVENTS, &event, &eventsize);
1654 ret = setsockopt(b->num, IPPROTO_SCTP, SCTP_EVENTS, &event, sizeof(struct sctp_event_subscribe));
1683 sockflags = fcntl(b->num, F_GETFL, 0);
1684 fcntl(b->num, F_SETFL, O_NONBLOCK);
1687 n = recvmsg(b->num, &msg, MSG_PEEK);
1691 fcntl(b->num, F_SETFL, sockflags);
1729 sockflags = fcntl(b->num, F_GETFL, 0);
1730 fcntl(b->num, F_SETFL, O_NONBLOCK);
1731 n = recvmsg(b->num, &msg, MSG_PEEK);
1732 fcntl(b->num, F_SETFL, sockflags);
1752 n = recvmsg(b->num, &msg, 0);