Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/unpcb.h
Show First 20 Lines • Show All 80 Lines • ▼ Show 20 Lines | struct unpcb { | ||||
struct vnode *unp_vnode; /* if associated with file */ | struct vnode *unp_vnode; /* if associated with file */ | ||||
struct xucred unp_peercred; /* peer credentials, if applicable */ | struct xucred unp_peercred; /* peer credentials, if applicable */ | ||||
LIST_ENTRY(unpcb) unp_reflink; /* link in unp_refs list */ | LIST_ENTRY(unpcb) unp_reflink; /* link in unp_refs list */ | ||||
LIST_ENTRY(unpcb) unp_link; /* glue on list of all PCBs */ | LIST_ENTRY(unpcb) unp_link; /* glue on list of all PCBs */ | ||||
struct unp_head unp_refs; /* referencing socket linked list */ | struct unp_head unp_refs; /* referencing socket linked list */ | ||||
unp_gen_t unp_gencnt; /* generation count of this instance */ | unp_gen_t unp_gencnt; /* generation count of this instance */ | ||||
struct file *unp_file; /* back-pointer to file for gc. */ | struct file *unp_file; /* back-pointer to file for gc. */ | ||||
u_int unp_msgcount; /* references from message queue */ | u_int unp_msgcount; /* references from message queue */ | ||||
u_int unp_gcrefs; /* garbage collector refcount */ | |||||
ino_t unp_ino; /* fake inode number */ | ino_t unp_ino; /* fake inode number */ | ||||
LIST_ENTRY(unpcb) unp_dead; /* link in dead list */ | |||||
} __aligned(CACHE_LINE_SIZE); | } __aligned(CACHE_LINE_SIZE); | ||||
/* | /* | ||||
* Flags in unp_flags. | * Flags in unp_flags. | ||||
* | * | ||||
* UNP_HAVEPC - indicates that the unp_peercred member is filled in | * UNP_HAVEPC - indicates that the unp_peercred member is filled in | ||||
* and is really the credentials of the connected peer. This is used | * and is really the credentials of the connected peer. This is used | ||||
* to determine whether the contents should be sent to the user or | * to determine whether the contents should be sent to the user or | ||||
Show All 10 Lines | |||||
*/ | */ | ||||
#define UNP_CONNECTING 0x010 /* Currently connecting. */ | #define UNP_CONNECTING 0x010 /* Currently connecting. */ | ||||
#define UNP_BINDING 0x020 /* Currently binding. */ | #define UNP_BINDING 0x020 /* Currently binding. */ | ||||
#define UNP_NASCENT 0x040 /* Newborn child socket. */ | #define UNP_NASCENT 0x040 /* Newborn child socket. */ | ||||
/* | /* | ||||
* Flags in unp_gcflag. | * Flags in unp_gcflag. | ||||
*/ | */ | ||||
#define UNPGC_REF 0x1 /* unpcb has external ref. */ | #define UNPGC_DEAD 0x1 /* unpcb might be dead. */ | ||||
#define UNPGC_DEAD 0x2 /* unpcb might be dead. */ | #define UNPGC_IGNORE_RIGHTS 0x2 /* Attached rights are freed */ | ||||
#define UNPGC_SCANNED 0x4 /* Has been scanned. */ | |||||
#define UNPGC_IGNORE_RIGHTS 0x8 /* Attached rights are freed */ | |||||
#define sotounpcb(so) ((struct unpcb *)((so)->so_pcb)) | #define sotounpcb(so) ((struct unpcb *)((so)->so_pcb)) | ||||
#endif /* _KERNEL || _WANT_UNPCB */ | #endif /* _KERNEL || _WANT_UNPCB */ | ||||
/* | /* | ||||
* UNPCB structure exported to user-land via sysctl(3). | * UNPCB structure exported to user-land via sysctl(3). | ||||
* | * | ||||
▲ Show 20 Lines • Show All 51 Lines • Show Last 20 Lines |