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);

_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to