Lines Matching refs:inp

134 static void	in_pcbremlists(struct inpcb *inp);
276 struct inpcb *inp;
288 inp = uma_zalloc(pcbinfo->ipi_zone, M_NOWAIT);
289 if (inp == NULL)
291 bzero(inp, inp_zero_size);
292 inp->inp_pcbinfo = pcbinfo;
293 inp->inp_socket = so;
294 inp->inp_cred = crhold(so->so_cred);
295 inp->inp_inc.inc_fibnum = so->so_fibnum;
297 error = mac_inpcb_init(inp, M_NOWAIT);
300 mac_inpcb_create(so, inp);
303 error = ipsec_init_pcbpolicy(inp);
306 mac_inpcb_destroy(inp);
313 inp->inp_vflag |= INP_IPV6PROTO;
315 inp->inp_flags |= IN6P_IPV6_V6ONLY;
318 INP_WLOCK(inp);
320 LIST_INSERT_HEAD(pcbinfo->ipi_listhead, inp, inp_list);
322 so->so_pcb = (caddr_t)inp;
325 inp->inp_flags |= IN6P_AUTOFLOWLABEL;
327 inp->inp_gencnt = ++pcbinfo->ipi_gencnt;
328 refcount_init(&inp->inp_refcount, 1); /* Reference from inpcbinfo */
334 inp->inp_route.ro_flags = RT_LLE_CACHE;
339 crfree(inp->inp_cred);
340 uma_zfree(pcbinfo->ipi_zone, inp);
348 in_pcbbind(struct inpcb *inp, struct sockaddr *nam, struct ucred *cred)
352 INP_WLOCK_ASSERT(inp);
353 INP_HASH_WLOCK_ASSERT(inp->inp_pcbinfo);
355 if (inp->inp_lport != 0 || inp->inp_laddr.s_addr != INADDR_ANY)
358 error = in_pcbbind_setup(inp, nam, &inp->inp_laddr.s_addr,
359 &inp->inp_lport, cred);
362 if (in_pcbinshash(inp) != 0) {
363 inp->inp_laddr.s_addr = INADDR_ANY;
364 inp->inp_lport = 0;
368 inp->inp_flags |= INP_ANONPORT;
378 in_pcb_lport(struct inpcb *inp, struct in_addr *laddrp, u_short *lportp,
390 pcbinfo = inp->inp_pcbinfo;
396 INP_LOCK_ASSERT(inp);
399 if (inp->inp_flags & INP_HIGHPORT) {
403 } else if (inp->inp_flags & INP_LOWPORT) {
450 if ((inp->inp_vflag & (INP_IPV4|INP_IPV6)) == INP_IPV4) {
451 KASSERT(laddrp != NULL, ("%s: laddrp NULL for v4 inp %p",
452 __func__, inp));
473 if ((inp->inp_vflag & INP_IPV6) != 0)
475 &inp->in6p_laddr, lport, lookupflags, cred);
487 if ((inp->inp_vflag & (INP_IPV4|INP_IPV6)) == INP_IPV4)
499 inp_so_options(const struct inpcb *inp)
505 if ((inp->inp_flags2 & INP_REUSEPORT) != 0)
507 if ((inp->inp_flags2 & INP_REUSEADDR) != 0)
516 * ni points to the new inp.
517 * oi points to the exisitng inp.
519 * This checks whether the existing inp also has BINDMULTI and
531 /* Check the existing inp has BINDMULTI set */
554 in_pcbbind_setup(struct inpcb *inp, struct sockaddr *nam, in_addr_t *laddrp,
557 struct socket *so = inp->inp_socket;
559 struct inpcbinfo *pcbinfo = inp->inp_pcbinfo;
568 INP_LOCK_ASSERT(inp);
621 if ((inp->inp_flags & INP_BINDANY) == 0 &&
637 priv_check_cred(inp->inp_cred,
646 ((inp->inp_flags2 & INP_BINDMULTI) == 0) &&
653 (inp->inp_cred->cr_uid !=
663 if (t && (! in_pcbbind_check_bindmulti(inp, t)))
680 ((inp->inp_flags2 & INP_BINDMULTI) == 0) &&
687 (inp->inp_vflag & INP_IPV6PROTO) == 0 ||
691 if (t && (! in_pcbbind_check_bindmulti(inp, t)))
699 error = in_pcb_lport(inp, &laddr, &lport, cred, lookupflags);
716 in_pcbconnect_mbuf(struct inpcb *inp, struct sockaddr *nam,
723 INP_WLOCK_ASSERT(inp);
724 INP_HASH_WLOCK_ASSERT(inp->inp_pcbinfo);
726 lport = inp->inp_lport;
727 laddr = inp->inp_laddr.s_addr;
729 error = in_pcbconnect_setup(inp, nam, &laddr, &lport, &faddr, &fport,
735 if (inp->inp_laddr.s_addr == INADDR_ANY && inp->inp_lport == 0) {
736 inp->inp_lport = lport;
737 inp->inp_laddr.s_addr = laddr;
738 if (in_pcbinshash(inp) != 0) {
739 inp->inp_laddr.s_addr = INADDR_ANY;
740 inp->inp_lport = 0;
746 inp->inp_lport = lport;
747 inp->inp_laddr.s_addr = laddr;
748 inp->inp_faddr.s_addr = faddr;
749 inp->inp_fport = fport;
750 in_pcbrehash_mbuf(inp, m);
753 inp->inp_flags |= INP_ANONPORT;
758 in_pcbconnect(struct inpcb *inp, struct sockaddr *nam, struct ucred *cred)
761 return (in_pcbconnect_mbuf(inp, nam, cred, NULL));
769 in_pcbladdr(struct inpcb *inp, struct in_addr *faddr, struct in_addr *laddr,
801 if ((inp->inp_socket->so_options & SO_DONTROUTE) == 0)
802 in_rtalloc_ign(&sro, 0, inp->inp_inc.inc_fibnum);
817 inp->inp_socket->so_fibnum));
820 inp->inp_socket->so_fibnum));
936 inp->inp_socket->so_fibnum));
939 inp->inp_socket->so_fibnum));
1008 in_pcbconnect_setup(struct inpcb *inp, struct sockaddr *nam,
1024 INP_LOCK_ASSERT(inp);
1025 INP_HASH_LOCK_ASSERT(inp->inp_pcbinfo);
1066 error = in_pcbladdr(inp, &faddr, &laddr, cred);
1073 inp->inp_moptions != NULL) {
1077 imo = inp->inp_moptions;
1100 oinp = in_pcblookup_hash_locked(inp->inp_pcbinfo, faddr, fport,
1108 error = in_pcbbind_setup(inp, NULL, &laddr.s_addr, &lport,
1121 in_pcbdisconnect(struct inpcb *inp)
1124 INP_WLOCK_ASSERT(inp);
1125 INP_HASH_WLOCK_ASSERT(inp->inp_pcbinfo);
1127 inp->inp_faddr.s_addr = INADDR_ANY;
1128 inp->inp_fport = 0;
1129 in_pcbrehash(inp);
1140 in_pcbdetach(struct inpcb *inp)
1143 KASSERT(inp->inp_socket != NULL, ("%s: inp_socket == NULL", __func__));
1145 inp->inp_socket->so_pcb = NULL;
1146 inp->inp_socket = NULL;
1169 in_pcbref(struct inpcb *inp)
1172 KASSERT(inp->inp_refcount > 0, ("%s: refcount 0", __func__));
1174 refcount_acquire(&inp->inp_refcount);
1190 in_pcbrele_rlocked(struct inpcb *inp)
1194 KASSERT(inp->inp_refcount > 0, ("%s: refcount 0", __func__));
1196 INP_RLOCK_ASSERT(inp);
1198 if (refcount_release(&inp->inp_refcount) == 0) {
1203 if (inp->inp_flags2 & INP_FREED) {
1204 INP_RUNLOCK(inp);
1210 KASSERT(inp->inp_socket == NULL, ("%s: inp_socket != NULL", __func__));
1212 INP_RUNLOCK(inp);
1213 pcbinfo = inp->inp_pcbinfo;
1214 uma_zfree(pcbinfo->ipi_zone, inp);
1219 in_pcbrele_wlocked(struct inpcb *inp)
1223 KASSERT(inp->inp_refcount > 0, ("%s: refcount 0", __func__));
1225 INP_WLOCK_ASSERT(inp);
1227 if (refcount_release(&inp->inp_refcount) == 0) {
1232 if (inp->inp_flags2 & INP_FREED) {
1233 INP_WUNLOCK(inp);
1239 KASSERT(inp->inp_socket == NULL, ("%s: inp_socket != NULL", __func__));
1241 INP_WUNLOCK(inp);
1242 pcbinfo = inp->inp_pcbinfo;
1243 uma_zfree(pcbinfo->ipi_zone, inp);
1251 in_pcbrele(struct inpcb *inp)
1254 return (in_pcbrele_wlocked(inp));
1267 in_pcbfree(struct inpcb *inp)
1269 struct inpcbinfo *pcbinfo = inp->inp_pcbinfo;
1271 KASSERT(inp->inp_socket == NULL, ("%s: inp_socket != NULL", __func__));
1280 INP_WLOCK_ASSERT(inp);
1284 if (inp->inp_sp != NULL)
1285 ipsec_delete_pcbpolicy(inp);
1288 inp->inp_gencnt = ++pcbinfo->ipi_gencnt;
1289 in_pcbremlists(inp);
1292 if (inp->inp_vflag & INP_IPV6PROTO) {
1293 ip6_freepcbopts(inp->in6p_outputopts);
1294 if (inp->in6p_moptions != NULL)
1295 ip6_freemoptions(inp->in6p_moptions);
1298 if (inp->inp_options)
1299 (void)m_free(inp->inp_options);
1301 if (inp->inp_moptions != NULL)
1302 inp_freemoptions(inp->inp_moptions);
1304 if (inp->inp_route.ro_rt) {
1305 RTFREE(inp->inp_route.ro_rt);
1306 inp->inp_route.ro_rt = (struct rtentry *)NULL;
1308 if (inp->inp_route.ro_lle)
1309 LLE_FREE(inp->inp_route.ro_lle); /* zeros ro_lle */
1311 inp->inp_vflag = 0;
1312 inp->inp_flags2 |= INP_FREED;
1313 crfree(inp->inp_cred);
1315 mac_inpcb_destroy(inp);
1317 if (!in_pcbrele_wlocked(inp))
1318 INP_WUNLOCK(inp);
1336 in_pcbdrop(struct inpcb *inp)
1339 INP_WLOCK_ASSERT(inp);
1345 inp->inp_flags |= INP_DROPPED;
1346 if (inp->inp_flags & INP_INHASHLIST) {
1347 struct inpcbport *phd = inp->inp_phd;
1349 INP_HASH_WLOCK(inp->inp_pcbinfo);
1350 LIST_REMOVE(inp, inp_hash);
1351 LIST_REMOVE(inp, inp_portlist);
1356 INP_HASH_WUNLOCK(inp->inp_pcbinfo);
1357 inp->inp_flags &= ~INP_INHASHLIST;
1359 in_pcbgroup_remove(inp);
1386 struct inpcb *inp;
1390 inp = sotoinpcb(so);
1391 KASSERT(inp != NULL, ("in_getsockaddr: inp == NULL"));
1393 INP_RLOCK(inp);
1394 port = inp->inp_lport;
1395 addr = inp->inp_laddr;
1396 INP_RUNLOCK(inp);
1405 struct inpcb *inp;
1409 inp = sotoinpcb(so);
1410 KASSERT(inp != NULL, ("in_getpeeraddr: inp == NULL"));
1412 INP_RLOCK(inp);
1413 port = inp->inp_fport;
1414 addr = inp->inp_faddr;
1415 INP_RUNLOCK(inp);
1425 struct inpcb *inp, *inp_temp;
1428 LIST_FOREACH_SAFE(inp, pcbinfo->ipi_listhead, inp_list, inp_temp) {
1429 INP_WLOCK(inp);
1431 if ((inp->inp_vflag & INP_IPV4) == 0) {
1432 INP_WUNLOCK(inp);
1436 if (inp->inp_faddr.s_addr != faddr.s_addr ||
1437 inp->inp_socket == NULL) {
1438 INP_WUNLOCK(inp);
1441 if ((*notify)(inp, errno))
1442 INP_WUNLOCK(inp);
1450 struct inpcb *inp;
1455 LIST_FOREACH(inp, pcbinfo->ipi_listhead, inp_list) {
1456 INP_WLOCK(inp);
1457 imo = inp->inp_moptions;
1458 if ((inp->inp_vflag & INP_IPV4) &&
1482 INP_WUNLOCK(inp);
1496 struct inpcb *inp;
1517 LIST_FOREACH(inp, head, inp_hash) {
1519 /* XXX inp locking */
1520 if ((inp->inp_vflag & INP_IPV4) == 0)
1523 if (inp->inp_faddr.s_addr == INADDR_ANY &&
1524 inp->inp_laddr.s_addr == laddr.s_addr &&
1525 inp->inp_lport == lport) {
1531 inp->inp_cred->cr_prison))
1532 return (inp);
1560 LIST_FOREACH(inp, &phd->phd_pcblist, inp_portlist) {
1563 !prison_equal_ip4(inp->inp_cred->cr_prison,
1567 /* XXX inp locking */
1568 if ((inp->inp_vflag & INP_IPV4) == 0)
1583 if ((inp->inp_vflag & INP_IPV6) != 0)
1586 if (inp->inp_faddr.s_addr != INADDR_ANY)
1588 if (inp->inp_laddr.s_addr != INADDR_ANY) {
1591 else if (inp->inp_laddr.s_addr != laddr.s_addr)
1598 match = inp;
1620 struct inpcb *inp, *tmpinp;
1631 LIST_FOREACH(inp, head, inp_pcbgrouphash) {
1633 /* XXX inp locking */
1634 if ((inp->inp_vflag & INP_IPV4) == 0)
1637 if (inp->inp_faddr.s_addr == faddr.s_addr &&
1638 inp->inp_laddr.s_addr == laddr.s_addr &&
1639 inp->inp_fport == fport &&
1640 inp->inp_lport == lport) {
1643 * the inp here, without any checks.
1646 if (prison_flag(inp->inp_cred, PR_IP4))
1649 tmpinp = inp;
1653 inp = tmpinp;
1681 LIST_FOREACH(inp, head, inp_pcbgrouphash) {
1683 /* XXX inp locking */
1684 if ((inp->inp_vflag & INP_IPV4) == 0)
1687 if (inp->inp_faddr.s_addr != INADDR_ANY ||
1688 inp->inp_lport != lport)
1691 injail = prison_flag(inp->inp_cred, PR_IP4);
1693 if (prison_check_ip4(inp->inp_cred,
1701 if (inp->inp_laddr.s_addr == laddr.s_addr) {
1705 local_exact = inp;
1706 } else if (inp->inp_laddr.s_addr == INADDR_ANY) {
1708 /* XXX inp locking, NULL check */
1709 if (inp->inp_vflag & INP_IPV6PROTO)
1710 local_wild_mapped = inp;
1714 jail_wild = inp;
1716 local_wild = inp;
1720 inp = jail_wild;
1721 if (inp == NULL)
1722 inp = local_exact;
1723 if (inp == NULL)
1724 inp = local_wild;
1726 if (inp == NULL)
1727 inp = local_wild_mapped;
1729 if (inp != NULL)
1755 LIST_FOREACH(inp, head, inp_pcbgroup_wild) {
1757 /* XXX inp locking */
1758 if ((inp->inp_vflag & INP_IPV4) == 0)
1761 if (inp->inp_faddr.s_addr != INADDR_ANY ||
1762 inp->inp_lport != lport)
1765 injail = prison_flag(inp->inp_cred, PR_IP4);
1767 if (prison_check_ip4(inp->inp_cred,
1775 if (inp->inp_laddr.s_addr == laddr.s_addr) {
1779 local_exact = inp;
1780 } else if (inp->inp_laddr.s_addr == INADDR_ANY) {
1782 /* XXX inp locking, NULL check */
1783 if (inp->inp_vflag & INP_IPV6PROTO)
1784 local_wild_mapped = inp;
1788 jail_wild = inp;
1790 local_wild = inp;
1793 inp = jail_wild;
1794 if (inp == NULL)
1795 inp = local_exact;
1796 if (inp == NULL)
1797 inp = local_wild;
1799 if (inp == NULL)
1800 inp = local_wild_mapped;
1802 if (inp != NULL)
1810 locked = INP_TRY_WLOCK(inp);
1812 locked = INP_TRY_RLOCK(inp);
1816 in_pcbref(inp);
1820 INP_WLOCK(inp);
1821 if (in_pcbrele_wlocked(inp))
1824 INP_RLOCK(inp);
1825 if (in_pcbrele_rlocked(inp))
1831 INP_WLOCK_ASSERT(inp);
1833 INP_RLOCK_ASSERT(inp);
1835 return (inp);
1850 struct inpcb *inp, *tmpinp;
1864 LIST_FOREACH(inp, head, inp_hash) {
1866 /* XXX inp locking */
1867 if ((inp->inp_vflag & INP_IPV4) == 0)
1870 if (inp->inp_faddr.s_addr == faddr.s_addr &&
1871 inp->inp_laddr.s_addr == laddr.s_addr &&
1872 inp->inp_fport == fport &&
1873 inp->inp_lport == lport) {
1876 * the inp here, without any checks.
1879 if (prison_flag(inp->inp_cred, PR_IP4))
1880 return (inp);
1882 tmpinp = inp;
1909 LIST_FOREACH(inp, head, inp_hash) {
1911 /* XXX inp locking */
1912 if ((inp->inp_vflag & INP_IPV4) == 0)
1915 if (inp->inp_faddr.s_addr != INADDR_ANY ||
1916 inp->inp_lport != lport)
1919 injail = prison_flag(inp->inp_cred, PR_IP4);
1921 if (prison_check_ip4(inp->inp_cred,
1929 if (inp->inp_laddr.s_addr == laddr.s_addr) {
1931 return (inp);
1933 local_exact = inp;
1934 } else if (inp->inp_laddr.s_addr == INADDR_ANY) {
1936 /* XXX inp locking, NULL check */
1937 if (inp->inp_vflag & INP_IPV6PROTO)
1938 local_wild_mapped = inp;
1942 jail_wild = inp;
1944 local_wild = inp;
1972 struct inpcb *inp;
1976 inp = in_pcblookup_hash_locked(pcbinfo, faddr, fport, laddr, lport,
1978 if (inp != NULL) {
1980 locked = INP_TRY_WLOCK(inp);
1982 locked = INP_TRY_RLOCK(inp);
1986 in_pcbref(inp);
1990 INP_WLOCK(inp);
1991 if (in_pcbrele_wlocked(inp))
1994 INP_RLOCK(inp);
1995 if (in_pcbrele_rlocked(inp))
2001 INP_WLOCK_ASSERT(inp);
2003 INP_RLOCK_ASSERT(inp);
2007 return (inp);
2098 in_pcbinshash_internal(struct inpcb *inp, int do_pcbgroup_update)
2102 struct inpcbinfo *pcbinfo = inp->inp_pcbinfo;
2106 INP_WLOCK_ASSERT(inp);
2109 KASSERT((inp->inp_flags & INP_INHASHLIST) == 0,
2113 if (inp->inp_vflag & INP_IPV6)
2114 hashkey_faddr = INP6_PCBHASHKEY(&inp->in6p_faddr);
2117 hashkey_faddr = inp->inp_faddr.s_addr;
2120 inp->inp_lport, inp->inp_fport, pcbinfo->ipi_hashmask)];
2123 INP_PCBPORTHASH(inp->inp_lport, pcbinfo->ipi_porthashmask)];
2129 if (phd->phd_port == inp->inp_lport)
2140 phd->phd_port = inp->inp_lport;
2144 inp->inp_phd = phd;
2145 LIST_INSERT_HEAD(&phd->phd_pcblist, inp, inp_portlist);
2146 LIST_INSERT_HEAD(pcbhash, inp, inp_hash);
2147 inp->inp_flags |= INP_INHASHLIST;
2150 in_pcbgroup_update(inp);
2167 in_pcbinshash(struct inpcb *inp)
2170 return (in_pcbinshash_internal(inp, 1));
2174 in_pcbinshash_nopcbgroup(struct inpcb *inp)
2177 return (in_pcbinshash_internal(inp, 0));
2187 in_pcbrehash_mbuf(struct inpcb *inp, struct mbuf *m)
2189 struct inpcbinfo *pcbinfo = inp->inp_pcbinfo;
2193 INP_WLOCK_ASSERT(inp);
2196 KASSERT(inp->inp_flags & INP_INHASHLIST,
2200 if (inp->inp_vflag & INP_IPV6)
2201 hashkey_faddr = INP6_PCBHASHKEY(&inp->in6p_faddr);
2204 hashkey_faddr = inp->inp_faddr.s_addr;
2207 inp->inp_lport, inp->inp_fport, pcbinfo->ipi_hashmask)];
2209 LIST_REMOVE(inp, inp_hash);
2210 LIST_INSERT_HEAD(head, inp, inp_hash);
2214 in_pcbgroup_update_mbuf(inp, m);
2216 in_pcbgroup_update(inp);
2221 in_pcbrehash(struct inpcb *inp)
2224 in_pcbrehash_mbuf(inp, NULL);
2231 in_pcbremlists(struct inpcb *inp)
2233 struct inpcbinfo *pcbinfo = inp->inp_pcbinfo;
2243 INP_WLOCK_ASSERT(inp);
2246 inp->inp_gencnt = ++pcbinfo->ipi_gencnt;
2247 if (inp->inp_flags & INP_INHASHLIST) {
2248 struct inpcbport *phd = inp->inp_phd;
2251 LIST_REMOVE(inp, inp_hash);
2252 LIST_REMOVE(inp, inp_portlist);
2258 inp->inp_flags &= ~INP_INHASHLIST;
2260 LIST_REMOVE(inp, inp_list);
2263 in_pcbgroup_remove(inp);
2274 in_losing(struct inpcb *inp)
2277 if (inp->inp_route.ro_rt) {
2278 RTFREE(inp->inp_route.ro_rt);
2279 inp->inp_route.ro_rt = (struct rtentry *)NULL;
2281 if (inp->inp_route.ro_lle)
2282 LLE_FREE(inp->inp_route.ro_lle); /* zeros ro_lle */
2294 struct inpcb *inp;
2296 inp = sotoinpcb(so);
2297 KASSERT(inp != NULL, ("in_pcbsosetlabel: so->so_pcb == NULL"));
2299 INP_WLOCK(inp);
2301 mac_inpcb_sosetlabel(so, inp);
2303 INP_WUNLOCK(inp);
2360 inp_wlock(struct inpcb *inp)
2363 INP_WLOCK(inp);
2367 inp_wunlock(struct inpcb *inp)
2370 INP_WUNLOCK(inp);
2374 inp_rlock(struct inpcb *inp)
2377 INP_RLOCK(inp);
2381 inp_runlock(struct inpcb *inp)
2384 INP_RUNLOCK(inp);
2389 inp_lock_assert(struct inpcb *inp)
2392 INP_WLOCK_ASSERT(inp);
2396 inp_unlock_assert(struct inpcb *inp)
2399 INP_UNLOCK_ASSERT(inp);
2406 struct inpcb *inp;
2409 LIST_FOREACH(inp, V_tcbinfo.ipi_listhead, inp_list) {
2410 INP_WLOCK(inp);
2411 func(inp, arg);
2412 INP_WUNLOCK(inp);
2418 inp_inpcbtosocket(struct inpcb *inp)
2421 INP_WLOCK_ASSERT(inp);
2422 return (inp->inp_socket);
2426 inp_inpcbtotcpcb(struct inpcb *inp)
2429 INP_WLOCK_ASSERT(inp);
2430 return ((struct tcpcb *)inp->inp_ppcb);
2434 inp_ip_tos_get(const struct inpcb *inp)
2437 return (inp->inp_ip_tos);
2441 inp_ip_tos_set(struct inpcb *inp, int val)
2444 inp->inp_ip_tos = val;
2448 inp_4tuple_get(struct inpcb *inp, uint32_t *laddr, uint16_t *lp,
2452 INP_LOCK_ASSERT(inp);
2453 *laddr = inp->inp_laddr.s_addr;
2454 *faddr = inp->inp_faddr.s_addr;
2455 *lp = inp->inp_lport;
2456 *fp = inp->inp_fport;
2650 db_print_inpcb(struct inpcb *inp, const char *name, int indent)
2654 db_printf("%s at %p\n", name, inp);
2659 db_printf("inp_flow: 0x%x\n", inp->inp_flow);
2661 db_print_inconninfo(&inp->inp_inc, "inp_conninfo", indent);
2665 inp->inp_ppcb, inp->inp_pcbinfo, inp->inp_socket);
2669 inp->inp_label, inp->inp_flags);
2670 db_print_inpflags(inp->inp_flags);
2674 db_printf("inp_sp: %p inp_vflag: 0x%x (", inp->inp_sp,
2675 inp->inp_vflag);
2676 db_print_inpvflag(inp->inp_vflag);
2681 inp->inp_ip_ttl, inp->inp_ip_p, inp->inp_ip_minttl);
2685 if (inp->inp_vflag & INP_IPV6) {
2687 "in6p_moptions: %p\n", inp->in6p_options,
2688 inp->in6p_outputopts, inp->in6p_moptions);
2690 "in6p_hops %u\n", inp->in6p_icmp6filt, inp->in6p_cksum,
2691 inp->in6p_hops);
2696 "inp_ip_moptions: %p\n", inp->inp_ip_tos,
2697 inp->inp_options, inp->inp_moptions);
2701 db_printf("inp_phd: %p inp_gencnt: %ju\n", inp->inp_phd,
2702 (uintmax_t)inp->inp_gencnt);
2707 struct inpcb *inp;
2713 inp = (struct inpcb *)addr;
2715 db_print_inpcb(inp, "inpcb", 0);