#include <oskit/net/freebsd.h>oskit_error_t oskit_freebsd_net_ifconfig( struct oskit_freebsd_net_ether_if *eif, char *name, char *ipaddr, char *netmask);
OS Network stack
This is a temporary convenience function which does the setup usually performed by FreeBSD's ifconfig(8) command. This function is equivalent to the following command:ifconfig de0 inet 155.99.214.164 link2 netmask 255.255.255.0with 155.99.214.164 being the IP address to be used by the ethernet interface, 255.255.255.0 the netmask of the local subnet, and de0 the (arbitrary) name of the interface.
- eif
- A structure describing the physical interface as returned by oskit_freebsd_net_open_ether_if.
- name
- The name of the interface. Should be a 3 byte string of the "abn" where a and b are letters and n is a number. Use different names for different interfaces.
- ipaddr
- The address to be used by the interface in "xxx.xxx.xxx.xxx" notation.
- netmask
- The netmask of the subnet to be used by the interface in "xxx.xxx.xxx.xxx" notation.
Returns 0 on success, or an error code specified in <oskit/error.h>, on error.