Name of the primary network interface, how to find in bsp header files?

Heinz Junkes junkes at fhi-berlin.mpg.de
Fri Aug 7 19:12:29 UTC 2020


Danke,

it works great with the libbsd-stack.

That is then also definitely the way to go. I just remembered in the legacy stack that the network driver name
was set in some BSPs. But this was probably not continuous. And with the new ones, it is no longer possible. 
Heinz


> On 7. Aug 2020, at 14:17, Sebastian Huber <sebastian.huber at embedded-brains.de> wrote:
> 
> On 07/08/2020 13:39, Heinz Junkes wrote:
> 
>> Can I get the name of the primary network interface from the header files of a target-bsp?
> 
> Some BSPs have an RTEMS_BSP_NETWORK_DRIVER_NAME define.
> 
> With libbsd you can try something like this:
> 
>     char ifnamebuf[IF_NAMESIZE];
>     char *ifname;
> 
> 
>     ifname = if_indextoname(1, &ifnamebuf[0]);
>     assert(ifname != NULL);
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2542 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/devel/attachments/20200807/5234bef9/attachment.bin>


More information about the devel mailing list