I'm attempting to create a wrapper around libdnet for the D programming language. The issue I have run into is not knowing what the underlining types for eth_addr_t, ip_addr_t, and ip6_addr_t while converting addr.h. The last mystery type is sockaddr
And I'm also interest in why there is a do while loop that is always false.
#define addr_pack(addr, type, bits, data, len) do { \
(addr)->addr_type = type; \
(addr)->addr_bits = bits; \
memmove((addr)->addr_data8, (char *)data, len); \
} while (0)
is it required for C to execute the code in the macro?