Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Jun 2016 11:30:39 -0700
From:      John Baldwin <jhb@freebsd.org>
To:        Julian Kornberger <jk@kornberger.name>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Usage of sosend() and its context
Message-ID:  <1489325.Tvgaf1skzf@ralph.baldwin.cx>
In-Reply-To: <5762E6C6.7030401@kornberger.name>
References:  <575F20CF.1020103@kornberger.name> <2110371.3nz8SNp04Y@ralph.baldwin.cx> <5762E6C6.7030401@kornberger.name>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1489325.Tvgaf1skzf>