select call on a UDP socket with BSD library?

Cudmore, Alan P. (GSFC-5820) alan.p.cudmore at nasa.gov
Mon Aug 31 20:14:52 UTC 2020


I am having problems using the “select” call with an RTEMS + LibBSD network socket.

Here is what I am using:
RTEMS 5.1 RSB, RTEMS source, and RTEMS LibBSD release files.
ARM/Beagleboneblack + LibBSD
I have verified that the network is initialized (ethernet device on the beaglebone) and I can receive UDP packets from the network.

I’m trying to use “select” to check the socket (using a timeout of zero), but when I call select I get a -1 return code with EBADF errno.
The fd in this instance is 77 and I have RTEMS setup for 200 file descriptors. Are there any other LibBSD configuration parameters I should be aware of?

When I build a SPARC/LEON3 BSP with the RTEMS legacy network stack, the select call seems to work. Admittedly I am just doing this on the loopback interface on QEMU since I do not have a real or simulated ethernet device to use. But the select call seems to work as I would expect in this instance.

Is there any setup I need to do, or perhaps the select call operates differently with LibBSD? Does it work on a UDP socket?
If I wanted to continue debugging, is the select call in the libbsd source tree?

Thanks,
Alan



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20200831/47b724f0/attachment-0001.html>


More information about the devel mailing list