9.68 config_netinter

#define NETINTER_SET_BLOCK      1
#define NETINTER_SET_STATIC_IP4 2
#define NETINTER_SET_STATIC_IP6 3

struct addr4_netinter {
    uint32_t ip;
    uint32_t sub;
};

struct addr6_netinter {
    uint128_t ip;
    uint128_t sub;
};

int config_netinter (int fd, int op, void *arg);

This syscall configures networking interfaces by using the device that implements the desired interface.

op dictates what the arguments and action to do are, it can be one of:

NETINTER_SET_BLOCK

arg will be a pointer to a boolean value, if it evaluates to true, the passed interface will be blocked, if it evaluates to false, it will be unblocked.

NETINTER_SET_STATIC_IP4

arg will be a pointer to a addr4_netinter structure, which specifies an address and subnet to set as static addresses.

NETINTER_SET_STATIC_IP6

arg will be a pointer to a addr6_netinter structure, which specifies an address and subnet to set as static addresses.

The syscall returns 0 on success or -1 on failure, with the following errno:

EFAULT

arg point to non accessible memory.

EACCES

MAC did not allow this.

EINVAL

An argument is not valid.