Usage of sosend() and its context

John Baldwin jhb at freebsd.org
Thu Jun 16 19:24:59 UTC 2016


On Thursday, June 16, 2016 07:49:58 PM Julian Kornberger wrote:
> On 16.06.2016 18:40, John Baldwin wrote:
> > It's possible to ask sosend() to not block and fail with EWOULDBLOCK 
> > instead by passing MSG_NOWAIT in flags. However, you might still block 
> > on sblock(), so you may need to defer your work to a sleepable context 
> > using something like a taskqueue. 
> 
> In this case I better build the IP packet manually and deliver it via 
> ip_output/ip6_output.
> 
> Do you know where I can find a code snipped that returns the recipient 
> IP address and recipient UDP port of a IP4/IPv6 packet stored in a mbuf?

udp_input/ip_input have to extract it.

-- 
John Baldwin


More information about the freebsd-hackers mailing list