• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.5.8/xnu-1228.15.4/bsd/netinet/

Lines Matching defs:pcb

736 	struct inpcb *pcb;
746 pcb = in_pcblookup_hash(inp->inp_pcbinfo, sin->sin_addr, sin->sin_port,
750 if (pcb != NULL) {
751 in_pcb_checkstate(pcb, WNT_RELEASE, 0);
1070 /* if the address is gone keep the old route in the pcb */
1220 * We may have found the pcb in the last lookup - check this first.
1448 struct inpcb *inp, *pcb;
1471 /* pcb was found, its count was upped. need to decrease it here */
1484 pcb = sotoinpcb(&pcbinfo->nat_dummy_socket);
1485 pcb->inp_vflag |= INP_IPV4;
1487 pcb->inp_lport = *lport;
1488 pcb->inp_laddr.s_addr = laddr.s_addr;
1490 pcb->inp_faddr = faddr;
1491 pcb->inp_fport = fport;
1494 in_pcbinshash(pcb, 1);
1512 pcb = sotoinpcb(&pcbinfo->nat_dummy_socket);
1513 pcb->inp_vflag |= INP_IPV4;
1527 in_pcb_detach_port(pcb); /* will restore dummy pcb */
1541 pcb = sotoinpcb(&pcbinfo->nat_dummy_socket);
1542 pcb->inp_vflag |= INP_IPV4;
1557 in_pcb_detach_port(pcb); /* restores dummy pcb */
1566 in_pcb_detach_port(pcb); /* restores dummy pcb */
1572 pcb->inp_laddr, pcb->inp_lport, 0, NULL);
1574 /* pcb was found, its count was upped. need to decrease it here */
1576 in_pcb_detach_port(pcb);
1581 pcb->inp_faddr = faddr;
1582 pcb->inp_fport = fport;
1583 in_pcbrehash(pcb);
1597 in_pcb_detach_port(pcb);
1602 *lport = pcb->inp_lport;
1606 pcb->nat_owner = owner_id;
1607 pcb->nat_cookie = cookie;
1608 pcb->inp_ppcb = (caddr_t) pcbinfo->dummy_cb;
1715 /* pcb was found, its count was upped. need to decrease it here */
1716 /* if we found it, that pcb is already locked by the caller */
1766 * Deallocate the pcb
1804 * The pcb list will contain the pcb until the ripper can clean it up if
1807 * This function will be called to either mark the pcb as
1810 in_pcb_checkstate(struct inpcb *pcb, int mode, int locked)
1813 volatile UInt32 *wantcnt = (volatile UInt32 *)&pcb->inp_wantcnt;
1819 case WNT_STOPUSING: /* try to mark the pcb as ready for recycling */
1824 socket_lock(pcb->inp_socket, 1);
1825 pcb->inp_state = INPCB_STATE_DEAD;
1827 if (pcb->inp_socket->so_usecount < 0)
1828 panic("in_pcb_checkstate STOP pcb=%p so=%p usecount is negative\n", pcb, pcb->inp_socket);
1830 socket_unlock(pcb->inp_socket, 1);
1842 case WNT_ACQUIRE: /* try to increase reference to pcb */
1851 // printf("in_pcb_checkstate: ACQ PCB was STOPUSING while release. odd pcb=%p\n", pcb);
1859 case WNT_RELEASE: /* release reference. if result is null and pcb state is DEAD,
1864 socket_lock(pcb->inp_socket, 1);
1869 panic("in_pcb_checkstate pcb=%p release with zero count", pcb);
1872 printf("in_pcb_checkstate: REL PCB was STOPUSING while release. odd pcb=%p\n", pcb);
1875 socket_unlock(pcb->inp_socket, 1);
1881 if (pcb->inp_state == INPCB_STATE_DEAD)
1883 if (pcb->inp_socket->so_usecount < 0)
1884 panic("in_pcb_checkstate RELEASE pcb=%p so=%p usecount is negative\n", pcb, pcb->inp_socket);
1887 socket_unlock(pcb->inp_socket, 1);
1893 panic("in_pcb_checkstate: so=%p not a valid state =%x\n", pcb->inp_socket, mode);