Lines Matching defs:so
98 inet_aifaddr(struct socket * so, const char * name,
119 return (ifioctl(so, SIOCAIFADDR, (caddr_t)&ifra, current_proc()));
127 struct socket * so;
155 receive_packet(struct socket * so, void * pp, int psize,
321 receive_packet(struct socket * so, void * pp, int psize, int * actual_size)
333 error = soreceive(so, (struct sockaddr **) 0, auio, 0, 0, &rcvflg);
347 struct socket * so = *timer_arg;
352 socket_lock(so, 1);
353 sowakeup(so, &so->so_rcv);
354 socket_unlock(so, 1);
406 timer_arg = context->so;
410 error = receive_packet(context->so, context->reply,
484 socket_lock(context->so, 1);
485 error = sbwait(&context->so->so_rcv);
486 socket_unlock(context->so, 1);
596 timer_arg = context->so;
600 error = receive_packet(context->so, context->reply,
660 timer_arg = context->so;
680 socket_lock(context->so, 1);
681 error = sbwait(&context->so->so_rcv);
682 socket_unlock(context->so, 1);
796 if (context->so != NULL) {
801 error = ifioctl(context->so, SIOCAUTOADDR,
806 soclose(context->so);
849 error = socreate(AF_INET, &context->so, SOCK_DGRAM, 0);
855 /* assign 127.0.0.1 to lo0 so that the bind will succeed */
858 error = inet_aifaddr(context->so, "lo0", &lo_addr, &lo_mask, NULL);
869 error = ifioctl(context->so, SIOCAUTOADDR, (caddr_t)&context->ifr, procp);
876 error = ifioctl(context->so, SIOCPROTOATTACH, (caddr_t)&context->ifr,
889 error = sobind(context->so, (struct sockaddr *)&sin);
896 socket_lock(context->so, 1);
897 context->so->so_state |= SS_NBIO;
898 socket_unlock(context->so, 1);