Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/uipc_socket.c
Show First 20 Lines • Show All 3,979 Lines • ▼ Show 20 Lines | |||||
* information-hiding if we decide that some of this information should be | * information-hiding if we decide that some of this information should be | ||||
* hidden from users. | * hidden from users. | ||||
*/ | */ | ||||
void | void | ||||
sotoxsocket(struct socket *so, struct xsocket *xso) | sotoxsocket(struct socket *so, struct xsocket *xso) | ||||
{ | { | ||||
xso->xso_len = sizeof *xso; | xso->xso_len = sizeof *xso; | ||||
xso->xso_so = so; | xso->xso_so = (kvaddr_t)so; | ||||
xso->so_type = so->so_type; | xso->so_type = so->so_type; | ||||
xso->so_options = so->so_options; | xso->so_options = so->so_options; | ||||
xso->so_linger = so->so_linger; | xso->so_linger = so->so_linger; | ||||
xso->so_state = so->so_state; | xso->so_state = so->so_state; | ||||
xso->so_pcb = so->so_pcb; | xso->so_pcb = (kvaddr_t)so->so_pcb; | ||||
xso->xso_protocol = so->so_proto->pr_protocol; | xso->xso_protocol = so->so_proto->pr_protocol; | ||||
xso->xso_family = so->so_proto->pr_domain->dom_family; | xso->xso_family = so->so_proto->pr_domain->dom_family; | ||||
xso->so_timeo = so->so_timeo; | xso->so_timeo = so->so_timeo; | ||||
xso->so_error = so->so_error; | xso->so_error = so->so_error; | ||||
xso->so_uid = so->so_cred->cr_uid; | xso->so_uid = so->so_cred->cr_uid; | ||||
xso->so_pgid = so->so_sigio ? so->so_sigio->sio_pgid : 0; | xso->so_pgid = so->so_sigio ? so->so_sigio->sio_pgid : 0; | ||||
if (SOLISTENING(so)) { | if (SOLISTENING(so)) { | ||||
xso->so_qlen = so->sol_qlen; | xso->so_qlen = so->sol_qlen; | ||||
▲ Show 20 Lines • Show All 139 Lines • Show Last 20 Lines |