Hi,
Looking through the driver API, I came across the
drv_lookup_by_mac_string. This function is prototyped in
internal.h, so I assume that it is a part of the public driver
API.
However, a problem may arise when multiple top-level interfaces
share mac addresses, as drv_lookup_by_mac_string only may return
one struct netcf_if *. This can occurr when using vlan
interfaces, e.g. eth0.2 and eth0.3, or if vlan ifs are not to be
considered top-level interfaces, the bridges or bonds that these
interfaces are a part of. I therefore recommend a switch to a
drv_list_interfaces-prototype for drv_lookup_by_mac_string.
For reference:
int drv_list_interfaces(struct netcf *ncf, int maxnames, char **names);
Best regards,
Jonas Eriksson
--
Jonas Eriksson
Consultant at AS/EAB/FLJ/IL
Combitech AB
Älvsjö, Sweden