NETIF

This is the interface for network devices. These requests must be implemented by any network interface (ethernet, wifi, etc) in order for LWIP to be able to use the network interface.

Details

define NETIF_VERSION

define NETIF_IOC_CHAR

define I_NETIF_GETVERSION

define I_NETIF_GETINFO

This requests reads the ADC attributes.

Example:

#include <sos/dev/netif.h>
netif_attr_t attr;
int netif_fd;
...
ioctl(netif_fd, I_NETIF_GETINFO, &attr);

define I_NETIF_SETATTR

This requests writes the ETH attributes.

Example:

#include <sos/dev/netif.h>
netif_attr_t attr;
int netif_fd;
...
ioctl(netif_fd, I_NETIF_SETATTR, &attr);

define I_NETIF_SETACTION

define I_NETIF_TOTAL

enum @23
  • NETIF_FLAG_INIT When setting attributes, initializes the interface
  • NETIF_FLAG_DEINIT When setting attributes, de-initialies the interface
  • NETIF_FLAG_IS_LINK_UP When settings attributes, ioctl() return 1 if link is up
  • NETIF_FLAG_SET_LINK_UP When setting attributes, sets the link as up
  • NETIF_FLAG_SET_LINK_DOWN When setting attributes, sets the link as down

struct::netif_info_t

u32 o_flags

u32 o_events

struct::netif_attr_t

u32 o_flags

u16 mtu

u8 mac_address

X

Thanks for Coming!

Subscribe to news and updates