- switch(subnet.type) {
- case SUBNET_MAC: fprintf(out, "ip link set \"$INTERFACE\" address %s\n", str); break;
- case SUBNET_IPV4: fprintf(out, "ip addr replace %s dev \"$INTERFACE\"\n", str); break;
- case SUBNET_IPV6: fprintf(out, "ip addr replace %s dev \"$INTERFACE\"\n", str); break;
- }
-#elif defined(HAVE_BSD)
- switch(subnet.type) {
- case SUBNET_MAC: fprintf(out, "ifconfig \"$INTERFACE\" link %s\n", str); break;
- case SUBNET_IPV4: fprintf(out, "ifconfig \"$INTERFACE\" %s\n", str); break;
- case SUBNET_IPV6: fprintf(out, "ifconfig \"$INTERFACE\" inet6 %s\n", str); break;
+
+ switch(address.type) {
+ case SUBNET_MAC:
+ fprintf(out, "ip link set \"$INTERFACE\" address %s\n", address_str);
+ break;
+
+ case SUBNET_IPV4:
+ fprintf(out, "ip addr replace %s dev \"$INTERFACE\"\n", address_str);
+ break;
+
+ case SUBNET_IPV6:
+ fprintf(out, "ip addr replace %s dev \"$INTERFACE\"\n", address_str);
+ break;
+
+ default:
+ return;