Home | History | Annotate | Download | only in netinet

Lines Matching refs:inp

261 	struct inpcb *inp;
274 inp = sotoinpcb(so);
275 if (inp == NULL) {
293 tp = intotcpcb(inp);
448 struct inpcb *inp;
457 inp = sotoinpcb(so);
458 KASSERT(inp == NULL);
479 inp = sotoinpcb(so);
481 tp = tcp_newtcpcb(family, inp);
486 inpcb_destroy(inp);
504 struct inpcb *inp;
508 inp = sotoinpcb(so);
509 if (inp == NULL)
511 tp = intotcpcb(inp);
521 struct inpcb *inp;
526 inp = sotoinpcb(so);
527 if (inp == NULL)
529 tp = intotcpcb(inp);
539 if (inp->inp_af == AF_INET) {
540 inpcb_fetch_peeraddr(inp, (struct sockaddr_in *)nam);
543 else if (inp->inp_af == AF_INET6) {
544 in6pcb_fetch_peeraddr(inp, (struct sockaddr_in6 *)nam);
556 struct inpcb *inp = NULL;
566 inp = sotoinpcb(so);
567 if (inp == NULL)
569 tp = intotcpcb(inp);
579 error = inpcb_bind(inp, sin, l);
583 error = in6pcb_bind(inp, sin6, l);
586 if (IN6_IS_ADDR_V4MAPPED(&in6p_laddr(inp)))
603 struct inpcb *inp;
609 inp = sotoinpcb(so);
610 if (inp == NULL)
612 tp = intotcpcb(inp);
620 if (inp->inp_af == AF_INET && inp->inp_lport == 0) {
621 error = inpcb_bind(inp, NULL, l);
626 if (inp->inp_af == AF_INET6 && inp->inp_lport == 0) {
627 error = in6pcb_bind(inp, NULL, l);
644 struct inpcb *inp;
650 inp = sotoinpcb(so);
651 if (inp == NULL)
653 tp = intotcpcb(inp);
666 if (inp->inp_af == AF_INET) {
667 if (inp->inp_lport == 0) {
668 error = inpcb_bind(inp, NULL, l);
672 error = inpcb_connect(inp, (struct sockaddr_in *)nam, l);
675 if (inp->inp_af == AF_INET6) {
676 if (inp->inp_lport == 0) {
677 error = in6pcb_bind(inp, NULL, l);
681 error = in6pcb_connect(inp, (struct sockaddr_in6 *)nam, l);
684 if (IN6_IS_ADDR_V4MAPPED(&in6p_faddr(inp)))
695 if (inp->inp_af == AF_INET)
696 inpcb_disconnect(inp);
698 else if (inp->inp_af == AF_INET6)
699 in6pcb_disconnect(inp);
729 struct inpcb *inp;
735 inp = sotoinpcb(so);
736 if (inp == NULL)
738 tp = intotcpcb(inp);
750 struct inpcb *inp;
756 inp = sotoinpcb(so);
757 if (inp == NULL)
759 tp = intotcpcb(inp);
785 struct inpcb *inp;
791 inp = sotoinpcb(so);
792 if (inp == NULL)
794 tp = intotcpcb(inp);
814 struct inpcb *inp;
820 inp = sotoinpcb(so);
821 if (inp == NULL)
823 tp = intotcpcb(inp);
865 struct inpcb *inp;
870 inp = sotoinpcb(so);
871 if (inp == NULL)
873 tp = intotcpcb(inp);
878 if (inp->inp_af == AF_INET) {
879 inpcb_fetch_peeraddr(inp, (struct sockaddr_in *)nam);
882 else if (inp->inp_af == AF_INET6) {
883 in6pcb_fetch_peeraddr(inp, (struct sockaddr_in6 *)nam);
895 struct inpcb *inp;
900 inp = sotoinpcb(so);
901 if (inp == NULL)
903 tp = intotcpcb(inp);
908 if (inp->inp_af == AF_INET) {
909 inpcb_fetch_sockaddr(inp, (struct sockaddr_in *)nam);
912 if (inp->inp_af == AF_INET6) {
913 in6pcb_fetch_sockaddr(inp, (struct sockaddr_in6 *)nam);
925 struct inpcb *inp;
930 inp = sotoinpcb(so);
931 if (inp == NULL)
933 tp = intotcpcb(inp);
959 struct inpcb *inp;
964 inp = sotoinpcb(so);
965 if (inp == NULL)
967 tp = intotcpcb(inp);
1002 struct inpcb *inp;
1008 inp = sotoinpcb(so);
1009 if (inp == NULL)
1011 tp = intotcpcb(inp);
1039 struct inpcb *inp = NULL;
1045 inp = sotoinpcb(so);
1046 if (inp == NULL) {
1051 tp = intotcpcb(inp);
1419 struct inpcb *inp;
1422 inp = inpcb_lookup(&tcbtable, raddr, rport, laddr, lport, 0);
1424 if (inp == NULL || (sockp = inp->inp_socket) == NULL)
1431 if (inp == NULL || (tp = intotcpcb(inp)) == NULL ||
1432 (inp->inp_socket->so_options & SO_ACCEPTCONN) != 0)
1436 KAUTH_REQ_NETWORK_SOCKET_DROP, inp->inp_socket, tp, NULL);
1454 struct inpcb *inp;
1457 inp = in6pcb_lookup(&tcbtable, raddr, rport, laddr, lport, 0, 0);
1459 if (inp == NULL || (sockp = inp->inp_socket) == NULL)
1466 if (inp == NULL || (tp = intotcpcb(inp)) == NULL ||
1467 (inp->inp_socket->so_options & SO_ACCEPTCONN) != 0)
1471 KAUTH_REQ_NETWORK_SOCKET_DROP, inp->inp_socket, tp, NULL);
1614 const struct inpcb *inp;
1656 TAILQ_FOREACH(inp, &pcbtbl->inpt_queue, inp_queue) {
1657 if (inp->inp_af != pf)
1661 KAUTH_REQ_NETWORK_SOCKET_CANSEE, inp->inp_socket, NULL,
1675 pcb.ki_family = inp->inp_socket->so_proto->
1677 pcb.ki_type = inp->inp_socket->so_proto->
1679 pcb.ki_protocol = inp->inp_socket->so_proto->
1681 pcb.ki_pflags = inp->inp_flags;
1683 pcb.ki_sostate = inp->inp_socket->so_state;
1684 pcb.ki_prstate = inp->inp_state;
1686 tp = intotcpcb(inp);
1692 PTRTOUINT64(inp), allowaddr);
1694 PTRTOUINT64(inp->inp_ppcb), allowaddr);
1696 PTRTOUINT64(inp->inp_socket), allowaddr);
1698 pcb.ki_rcvq = inp->inp_socket->so_rcv.sb_cc;
1699 pcb.ki_sndq = inp->inp_socket->so_snd.sb_cc;
1704 in->sin_port = inp->inp_lport;
1705 in->sin_addr = const_in4p_laddr(inp);
1710 in->sin_port = inp->inp_fport;
1711 in->sin_addr = const_in4p_faddr(inp);
1716 pcb.ki_family = inp->inp_socket->so_proto->
1718 pcb.ki_type = inp->inp_socket->so_proto->pr_type;
1719 pcb.ki_protocol = inp->inp_socket->so_proto->
1721 pcb.ki_pflags = inp->inp_flags;
1723 pcb.ki_sostate = inp->inp_socket->so_state;
1724 pcb.ki_prstate = inp->inp_state;
1726 tp = intotcpcb(inp);
1732 PTRTOUINT64(inp), allowaddr);
1734 PTRTOUINT64(inp->inp_ppcb), allowaddr);
1736 PTRTOUINT64(inp->inp_socket), allowaddr);
1738 pcb.ki_rcvq = inp->inp_socket->so_rcv.sb_cc;
1739 pcb.ki_sndq = inp->inp_socket->so_snd.sb_cc;
1744 in6->sin6_port = inp->inp_lport;
1745 in6->sin6_flowinfo = const_in6p_flowinfo(inp);
1746 in6->sin6_addr = const_in6p_laddr(inp);
1753 in6->sin6_port = inp->inp_fport;
1754 in6->sin6_flowinfo = const_in6p_flowinfo(inp);
1755 in6->sin6_addr = const_in6p_faddr(inp);