ifcfg 0.1.2

Get network interfaces information
Documentation
#include <stdlib.h>
#include <stdint.h>

#include <sys/ioctl.h>
#include <sys/socket.h>
#include <net/if.h>

typedef struct constant {
    const char* name;
    uint64_t    value;
} constant_t;

constant_t* rust_get_constants() {
static constant_t constants[] = {
// Testable constants
{{~ #each test_constants as |c|}}
#ifdef {{c}}
{ "{{c}}", {{c}} },
#endif
{{~ /each}}

// "Always" constants
{{~ #each always_constants as |c|}}
{ "{{c}}", {{c}} },
{{/each}}

// End of list sentinel
{ NULL, 0 },
};

return constants;
}