Lines Matching refs:inpcb

53 #define	in6pcb		inpcb	/* for KAME src sync over BSD*'s */
58 * struct inpcb is the common protocol control block structure used in most
65 LIST_HEAD(inpcbhead, inpcb);
135 * struct inpcb captures the network layer state for TCP, UDP, and raw IPv4 and
137 * hung off of inp_ppcb most of the time. Almost all fields of struct inpcb
138 * are static after creation or protected by a per-inpcb rwlock, inp_lock. A
160 * (i) - Protected by the inpcb lock
161 * (p) - Protected by the pcbinfo lock for the inpcb
162 * (l) - Protected by the pcblist lock for the inpcb
163 * (h) - Protected by the pcbhash lock for the inpcb
174 * other than TCP (where the inpcb persists during TIMEWAIT even after the
183 struct inpcb {
184 LIST_ENTRY(inpcb) inp_hash; /* (h/i) hash list */
185 LIST_ENTRY(inpcb) inp_pcbgrouphash; /* (g/i) hash list */
186 LIST_ENTRY(inpcb) inp_list; /* (p/l) list for all PCBs for proto */
192 LIST_ENTRY(inpcb) inp_pcbgroup_wild; /* (g/i/h) group wildcard entry */
236 LIST_ENTRY(inpcb) inp_portlist; /* (i/h) */
238 #define inp_zero_size offsetof(struct inpcb, inp_gencnt)
279 struct inpcb xi_inp;
300 * IPv4 and IPv6. Holds inpcb lists and information for managing them.
312 * inpcb locks (before)
321 * (h) Read using either ipi_hash_lock or inpcb lock; write requires both
327 * Global lock protecting full inpcb list traversal
401 * Global lock protecting global inpcb list, inpcb count, etc.
450 * These locking functions are for inpcb consumers outside of sys/netinet,
454 void inp_wlock(struct inpcb *);
455 void inp_wunlock(struct inpcb *);
456 void inp_rlock(struct inpcb *);
457 void inp_runlock(struct inpcb *);
460 void inp_lock_assert(struct inpcb *);
461 void inp_unlock_assert(struct inpcb *);
464 inp_lock_assert(struct inpcb *inp __unused)
469 inp_unlock_assert(struct inpcb *inp __unused)
475 void inp_apply_all(void (*func)(struct inpcb *, void *), void *arg);
476 int inp_ip_tos_get(const struct inpcb *inp);
477 void inp_ip_tos_set(struct inpcb *inp, int val);
479 inp_inpcbtosocket(struct inpcb *inp);
481 inp_inpcbtotcpcb(struct inpcb *inp);
482 void inp_4tuple_get(struct inpcb *inp, uint32_t *laddr, uint16_t *lp,
484 short inp_so_options(const struct inpcb *inp);
617 #define INPLOOKUP_RLOCKPCB 0x00000002 /* Return inpcb read-locked. */
618 #define INPLOOKUP_WLOCKPCB 0x00000004 /* Return inpcb write-locked. */
623 #define sotoinpcb(so) ((struct inpcb *)(so)->so_pcb)
670 int in_pcbbind_check_bindmulti(const struct inpcb *ni,
671 const struct inpcb *oi);
676 in_pcbgroup_byinpcb(struct inpcb *);
683 void in_pcbgroup_remove(struct inpcb *);
684 void in_pcbgroup_update(struct inpcb *);
685 void in_pcbgroup_update_mbuf(struct inpcb *, struct mbuf *);
689 int in_pcbbind(struct inpcb *, struct sockaddr *, struct ucred *);
690 int in_pcb_lport(struct inpcb *, struct in_addr *, u_short *,
692 int in_pcbbind_setup(struct inpcb *, struct sockaddr *, in_addr_t *,
694 int in_pcbconnect(struct inpcb *, struct sockaddr *, struct ucred *);
695 int in_pcbconnect_mbuf(struct inpcb *, struct sockaddr *, struct ucred *,
697 int in_pcbconnect_setup(struct inpcb *, struct sockaddr *, in_addr_t *,
698 u_short *, in_addr_t *, u_short *, struct inpcb **,
700 void in_pcbdetach(struct inpcb *);
701 void in_pcbdisconnect(struct inpcb *);
702 void in_pcbdrop(struct inpcb *);
703 void in_pcbfree(struct inpcb *);
704 int in_pcbinshash(struct inpcb *);
705 int in_pcbinshash_nopcbgroup(struct inpcb *);
706 int in_pcbladdr(struct inpcb *, struct in_addr *, struct in_addr *,
708 struct inpcb *
711 struct inpcb *
714 struct inpcb *
718 int, struct inpcb *(*)(struct inpcb *, int));
719 void in_pcbref(struct inpcb *);
720 void in_pcbrehash(struct inpcb *);
721 void in_pcbrehash_mbuf(struct inpcb *, struct mbuf *);
722 int in_pcbrele(struct inpcb *);
723 int in_pcbrele_rlocked(struct inpcb *);
724 int in_pcbrele_wlocked(struct inpcb *);