Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/uipc_socket.c
Show First 20 Lines • Show All 1,176 Lines • ▼ Show 20 Lines | sosend_dgram(struct socket *so, struct sockaddr *addr, struct uio *uio, | ||||
* If the user set MSG_EOF, the protocol understands this flag and | * If the user set MSG_EOF, the protocol understands this flag and | ||||
* nothing left to send then use PRU_SEND_EOF instead of PRU_SEND. | * nothing left to send then use PRU_SEND_EOF instead of PRU_SEND. | ||||
*/ | */ | ||||
((flags & MSG_EOF) && | ((flags & MSG_EOF) && | ||||
(so->so_proto->pr_flags & PR_IMPLOPCL) && | (so->so_proto->pr_flags & PR_IMPLOPCL) && | ||||
(resid <= 0)) ? | (resid <= 0)) ? | ||||
PRUS_EOF : | PRUS_EOF : | ||||
/* If there is more to send set PRUS_MORETOCOME */ | /* If there is more to send set PRUS_MORETOCOME */ | ||||
(flags & MSG_MORETOCOME) || | |||||
(resid > 0 && space > 0) ? PRUS_MORETOCOME : 0, | (resid > 0 && space > 0) ? PRUS_MORETOCOME : 0, | ||||
top, addr, control, td); | top, addr, control, td); | ||||
if (dontroute) { | if (dontroute) { | ||||
SOCK_LOCK(so); | SOCK_LOCK(so); | ||||
so->so_options &= ~SO_DONTROUTE; | so->so_options &= ~SO_DONTROUTE; | ||||
SOCK_UNLOCK(so); | SOCK_UNLOCK(so); | ||||
} | } | ||||
clen = 0; | clen = 0; | ||||
▲ Show 20 Lines • Show All 170 Lines • ▼ Show 20 Lines | do { | ||||
* this flag and nothing left to send then use | * this flag and nothing left to send then use | ||||
* PRU_SEND_EOF instead of PRU_SEND. | * PRU_SEND_EOF instead of PRU_SEND. | ||||
*/ | */ | ||||
((flags & MSG_EOF) && | ((flags & MSG_EOF) && | ||||
(so->so_proto->pr_flags & PR_IMPLOPCL) && | (so->so_proto->pr_flags & PR_IMPLOPCL) && | ||||
(resid <= 0)) ? | (resid <= 0)) ? | ||||
PRUS_EOF : | PRUS_EOF : | ||||
/* If there is more to send set PRUS_MORETOCOME. */ | /* If there is more to send set PRUS_MORETOCOME. */ | ||||
(flags & MSG_MORETOCOME) || | |||||
(resid > 0 && space > 0) ? PRUS_MORETOCOME : 0, | (resid > 0 && space > 0) ? PRUS_MORETOCOME : 0, | ||||
top, addr, control, td); | top, addr, control, td); | ||||
if (dontroute) { | if (dontroute) { | ||||
SOCK_LOCK(so); | SOCK_LOCK(so); | ||||
so->so_options &= ~SO_DONTROUTE; | so->so_options &= ~SO_DONTROUTE; | ||||
SOCK_UNLOCK(so); | SOCK_UNLOCK(so); | ||||
} | } | ||||
clen = 0; | clen = 0; | ||||
▲ Show 20 Lines • Show All 2,350 Lines • Show Last 20 Lines |