Lines Matching defs:inp

446 	struct inpcb *inp;
450 inp = sotoinpcb(so);
451 KASSERT(inp != NULL);
454 if (ipsec_used && ipsec_in_reject(m, inp)) {
463 if (inp->inp_flags & INP_CONTROLOPTS ||
466 ip_savecontrol(inp, &opts, ip, n);
489 struct inpcb *inp;
528 TAILQ_FOREACH(inp, &udbtable.inpt_queue, inp_queue) {
529 if (inp->inp_af != AF_INET)
532 if (inp->inp_lport != *dport)
534 if (!in_nullhost(in4p_laddr(inp))) {
535 if (!in_hosteq(in4p_laddr(inp), *dst4))
538 if (!in_nullhost(in4p_faddr(inp))) {
539 if (!in_hosteq(in4p_faddr(inp), *src4) ||
540 inp->inp_fport != *sport)
545 inp->inp_socket);
556 if ((inp->inp_socket->so_options &
564 inp = inpcb_lookup(&udbtable, *src4, *sport, *dst4,
566 if (inp == 0) {
568 inp = inpcb_lookup_bound(&udbtable, *dst4, *dport);
569 if (inp == 0)
575 if (inp->inp_flags & INP_ESPINUDP) {
598 if (inp->inp_overudp_cb != NULL) {
600 ret = inp->inp_overudp_cb(mp, off, inp->inp_socket,
601 sintosa(src), inp->inp_overudp_arg);
627 if (mtod(m, struct ip *)->ip_ttl < in4p_ip_minttl(inp))
630 udp4_sendup(m, off, (struct sockaddr *)src, inp->inp_socket);
645 udp_notify(struct inpcb *inp, int errno)
647 inp->inp_socket->so_error = errno;
648 sorwakeup(inp->inp_socket);
649 sowwakeup(inp->inp_socket);
694 struct inpcb *inp;
726 inp = sotoinpcb(so);
736 inp->inp_flags &= ~INP_ESPINUDP;
740 inp->inp_flags |= INP_ESPINUDP;
766 udp_output(struct mbuf *m, struct inpcb *inp, struct mbuf *control,
804 error = ip_setpktopts(control, &pktopts, &flags, inp, cred);
818 ui->ui_dst = in4p_faddr(inp);
819 ui->ui_sport = inp->inp_lport;
820 ui->ui_dport = inp->inp_fport;
823 ro = &inp->inp_route;
842 ((struct ip *)ui)->ip_ttl = in4p_ip(inp).ip_ttl; /* XXX */
843 ((struct ip *)ui)->ip_tos = in4p_ip(inp).ip_tos; /* XXX */
846 flags |= inp->inp_socket->so_options & (SO_DONTROUTE|SO_BROADCAST);
847 return ip_output(m, inp->inp_options, ro, flags, pktopts.ippo_imo, inp);
858 struct inpcb *inp;
882 inp = sotoinpcb(so);
883 in4p_ip(inp).ip_ttl = ip_defttl;
892 struct inpcb *inp;
895 inp = sotoinpcb(so);
896 KASSERT(inp != NULL);
897 inpcb_destroy(inp);
913 struct inpcb *inp = sotoinpcb(so);
919 KASSERT(inp != NULL);
923 error = inpcb_bind(inp, sin, l);
940 struct inpcb *inp = sotoinpcb(so);
945 KASSERT(inp != NULL);
949 error = inpcb_connect(inp, (struct sockaddr_in *)nam, l);
967 struct inpcb *inp = sotoinpcb(so);
971 KASSERT(inp != NULL);
976 inpcb_disconnect(inp);
977 in4p_laddr(inp) = zeroin_addr; /* XXX */
978 inpcb_set_state(inp, INP_BOUND); /* XXX */
1075 struct inpcb *inp = sotoinpcb(so);
1081 KASSERT(inp != NULL);
1088 laddr = in4p_laddr(inp); /* XXX */
1093 error = inpcb_connect(inp, (struct sockaddr_in *)nam, l);
1102 error = udp_output(m, inp, control, l);
1106 inpcb_disconnect(inp);
1107 in4p_laddr(inp) = laddr; /* XXX */
1108 inpcb_set_state(inp, INP_BOUND); /* XXX */