Possible to have loopback + "real" network interface?
Nick Withers
nick.withers at anu.edu.au
Mon Aug 26 08:47:09 UTC 2013
On Mon, 2013-08-26 at 09:24 +0200, Sebastian Huber wrote:
> Hello Nick,
>
> the loopback interface is always there (on old RTEMS versions this is a
> different story). You can configure a list of interfaces in
> rtems_bsdnet_ifconfig. The actual interface configuration depends on your BSP.
Righto, cheers for that.
> On 2013-08-26 09:04, Nick Withers wrote:
> > Hey guys,
> >
> > Anyone know if it's possible / impossible to have a loopback network
> > interface at the same time as a non-loopback interface in Git master?
> >
> > The "loopback" sample (testsuites/samples/loopback), if I'm reading it
> > right, seems to do it by providing a NULL for the struct
> > rtems_bsdnet_ifconfig pointer in struct rtems_bsdnet_config, which I
> > don't think is an option with multiple interfaces desired...?
> >
> > P.S., To be honest, I don't *really* want a loopback interface, I'd
> > prefer socketpair() / select() on pipes and / or pselect(), but oh
> > well! :-P
> >
>
> What you want is kqueue(2).
Yeah, that'd do it too (although in the ideal world I'd prefer to use
something more portable). kqueue's not available in RTEMS, right?
It feels like a nasty hack using a loopback socket to wake a select()ing
TCP server thread (the client application generally makes requests and
is sent responses, but occasionally, at an unknown frequency depending
on external factors, the server needs to send blocks-o'-data to the
client without prompting). Not sure if there's a better way with what
I've got, though... Any suggestions appreciated :-)
Cheers!
--
Nick Withers
Embedded Systems Programmer
Room 2.26, Building 57
Department of Nuclear Physics
Research School of Physics and Engineering
The Australian National University (CRICOS: 00120C)
eMail: nick.withers at anu.edu.au
Phone: +61 2 6125 2091
Mobile: +61 414 397 446
More information about the users
mailing list