Lines Matching refs:sockets

484 	old_timeout = sockets[sock_id].in_timeout;
485 sockets[sock_id].in_timeout = timeout;
491 old_in_gram = sockets[sock_id].inq;
492 sockets[sock_id].inq = NULL;
496 if (sockets[sock_id].input[i] != NULL) {
497 if (sockets[sock_id].input[i](sock_id) < 0) {
498 sockets[sock_id].in_timeout = old_timeout;
499 if (sockets[sock_id].inq != NULL)
500 nuke_grams(&sockets[sock_id].inq);
501 sockets[sock_id].inq = old_in_gram;
509 while ((in_gram = sockets[sock_id].inq) != NULL) {
516 del_gram(&sockets[sock_id].inq, in_gram, B_TRUE);
520 del_gram(&sockets[sock_id].inq, in_gram, B_FALSE);
523 sockets[sock_id].in_timeout = old_timeout;
531 if (sockets[sock_id].pcb == NULL)
535 if (tcp == NULL || sockets[sock_id].pcb == NULL) {
536 if (sockets[sock_id].so_error != 0)
544 sockets[sock_id].in_timeout = old_timeout;
545 sockets[sock_id].inq = old_in_gram;
569 if ((tcp = sockets[sock_id].pcb) == NULL)
572 while ((in_gram = sockets[sock_id].inq) != NULL) {
579 del_gram(&sockets[sock_id].inq, in_gram, B_TRUE);
583 del_gram(&sockets[sock_id].inq, in_gram, B_FALSE);
587 if (sockets[sock_id].pcb == NULL)
597 sockets[sock_id].so_state |= SS_CANTRCVMORE;
829 if ((tcp = sockets[sock_id].pcb) == NULL) {
843 if (sockets[sock_id].pcb != NULL)
865 if (sockets[sock_id].pcb == NULL)
886 if ((tcp = sockets[sock_id].pcb) == NULL) {
902 if (sockets[sock_id].pcb != NULL)
959 if (sockets[sock_id].pcb == NULL)
979 if (sockets[sock_id].pcb != NULL) {
990 if (sockets[sock_id].pcb == NULL)
1013 sockets[sock_id].pcb = NULL;
1023 if ((tcp = (tcp_t *)(sockets[sock_id].pcb)) == NULL) {
1059 if ((listener = (tcp_t *)(sockets[sock_id].pcb)) == NULL ||
1067 if (sockets[sock_id].in_timeout > tcp_accept_timeout)
1068 timeout = prom_gettime() + sockets[sock_id].in_timeout;
1100 bkmem_free((caddr_t)(sockets[new_sock_id].pcb), sizeof (tcp_t));
1107 sockets[new_sock_id].pcb = eager;
1146 if (sockets[i].type != INETBOOT_STREAM ||
1147 ((tcp = (tcp_t *)sockets[i].pcb) == NULL) ||
1186 if ((tcp = (tcp_t *)sockets[sock_id].pcb) == NULL) {
1197 requested_port = ntohs(sockets[sock_id].bind.sin_port);
1200 tcp->tcp_bound_source = sockets[sock_id].bind.sin_addr.s_addr;
1213 reuseaddr = sockets[sock_id].so_opt & SO_REUSEADDR;
1223 sockets[sock_id].bind.sin_port = tcp->tcp_lport;
1238 if (sockets[i].type != INETBOOT_STREAM)
1241 if ((tmp_tcp = (tcp_t *)sockets[i].pcb) == NULL)
1269 if ((tcp = (tcp_t *)(sockets[sock_id].pcb)) == NULL) {
1276 dstaddr = sockets[sock_id].remote.sin_addr.s_addr;
1277 dstport = sockets[sock_id].remote.sin_port;
1308 ipv4_getipaddr(&(sockets[sock_id].bind.sin_addr));
1310 if (ntohl(sockets[sock_id].bind.sin_addr.s_addr) ==
1315 tcp->tcp_bound_source = sockets[sock_id].bind.sin_addr.s_addr;
1714 timeout = sockets[sock_id].in_timeout;
1716 sockets[sock_id].in_timeout = tcp->tcp_rto;
1720 if (sockets[sock_id].inq == NULL) {
1723 if (sockets[sock_id].input[i] != NULL) {
1724 if (sockets[sock_id].input[i](sock_id) < 0) {
1726 sockets[sock_id].in_timeout =
1735 while ((in_gram = sockets[sock_id].inq) != NULL) {
1746 del_gram(&sockets[sock_id].inq, in_gram, B_TRUE);
1750 del_gram(&sockets[sock_id].inq, in_gram, B_FALSE);
1760 if (sockets[sock_id].pcb == NULL) {
1766 if (tcp == NULL || sockets[sock_id].pcb == NULL) {
1769 "error %d\n", state, sockets[sock_id].so_error);
1771 if (sockets[sock_id].so_error != 0)
1791 sockets[sock_id].in_timeout = timeout;
1835 if (sockets[i].type == INETBOOT_STREAM &&
1836 (tcp = (tcp_t *)sockets[i].pcb) != NULL) {
1870 if (sockets[i].type == INETBOOT_STREAM &&
1871 (tcp = (tcp_t *)sockets[i].pcb) != NULL) {
1927 sockets[sock_id].pcb = NULL;
1929 sockets[sock_id].so_error = err;
4092 if (++tcp->tcp_rack_cnt == 2 || sockets[sock_id].inq == NULL) {
4175 if (sockets[sock_id].pcb == NULL)
5218 if ((sockets[sock_id].pcb == NULL) || (sockets[sock_id].pcb != tcp))
6747 if (sockets[sock_id].so_rcvbuf <= 0)
6776 add_grams(&sockets[sock_id].inq, in_gram);
6779 sockets[sock_id].so_rcvbuf -= in_mp->b_wptr - in_mp->b_rptr;
6786 if (sockets[sock_id].so_rcvbuf > 0 &&
6801 if ((tcp = sockets[sock_id].pcb) == NULL)
6817 sockets[sock_id].inq, tcp->tcp_rcv_list);
6819 if ((sockets[sock_id].inq != NULL) ||
6831 add_grams(&sockets[sock_id].inq, in_gram);