[][src]Struct esp_idf_bindgen::netif

#[repr(C)]pub struct netif {
    pub next: *mut netif,
    pub ip_addr: ip_addr_t,
    pub netmask: ip_addr_t,
    pub gw: ip_addr_t,
    pub ip6_addr: [ip_addr_t; 3],
    pub ip6_addr_state: [u8_t; 3],
    pub ip6_addr_valid_life: [u32_t; 3],
    pub ip6_addr_pref_life: [u32_t; 3],
    pub ipv6_addr_cb: Option<unsafe extern "C" fn(netif: *mut netif, ip_idex: u8_t)>,
    pub input: netif_input_fn,
    pub output: netif_output_fn,
    pub linkoutput: netif_linkoutput_fn,
    pub output_ip6: netif_output_ip6_fn,
    pub state: *mut c_void,
    pub client_data: [*mut c_void; 3],
    pub dhcps_pcb: *mut udp_pcb,
    pub dhcp_event: dhcp_event_fn,
    pub hostname: *const c_char,
    pub mtu: u16_t,
    pub mtu6: u16_t,
    pub hwaddr: [u8_t; 6],
    pub hwaddr_len: u8_t,
    pub flags: u8_t,
    pub name: [c_char; 2],
    pub num: u8_t,
    pub ip6_autoconfig_enabled: u8_t,
    pub rs_count: u8_t,
    pub igmp_mac_filter: netif_igmp_mac_filter_fn,
    pub mld_mac_filter: netif_mld_mac_filter_fn,
    pub loop_first: *mut pbuf,
    pub loop_last: *mut pbuf,
    pub loop_cnt_current: u16_t,
    pub l2_buffer_free_notify: Option<unsafe extern "C" fn(lwip_netif: *mut netif, user_buf: *mut c_void)>,
    pub last_ip_addr: ip_addr_t,
}

Generic data structure used for all lwIP network interfaces. The following fields should be filled in by the initialization function for the device driver: hwaddr_len, hwaddr[], mtu, flags

Fields

next: *mut netif

pointer to next in linked list

ip_addr: ip_addr_t

IP address configuration in network byte order

netmask: ip_addr_tgw: ip_addr_tip6_addr: [ip_addr_t; 3]

Array of IPv6 addresses for this netif.

ip6_addr_state: [u8_t; 3]

The state of each IPv6 address (Tentative, Preferred, etc). @see ip6_addr.h

ip6_addr_valid_life: [u32_t; 3]

Remaining valid and preferred lifetime of each IPv6 address, in seconds. For valid lifetimes, the special value of IP6_ADDR_LIFE_STATIC (0) indicates the address is static and has no lifetimes.

ip6_addr_pref_life: [u32_t; 3]ipv6_addr_cb: Option<unsafe extern "C" fn(netif: *mut netif, ip_idex: u8_t)>input: netif_input_fn

This function is called by the network device driver to pass a packet up the TCP/IP stack.

output: netif_output_fn

This function is called by the IP module when it wants to send a packet on the interface. This function typically first resolves the hardware address, then sends the packet. For ethernet physical layer, this is usually etharp_output()

linkoutput: netif_linkoutput_fn

This function is called by ethernet_output() when it wants to send a packet on the interface. This function outputs the pbuf as-is on the link medium.

output_ip6: netif_output_ip6_fn

This function is called by the IPv6 module when it wants to send a packet on the interface. This function typically first resolves the hardware address, then sends the packet. For ethernet physical layer, this is usually ethip6_output()

state: *mut c_void

This field can be set by the device driver and could point to state information for the device.

client_data: [*mut c_void; 3]dhcps_pcb: *mut udp_pcbdhcp_event: dhcp_event_fnhostname: *const c_charmtu: u16_t

maximum transfer unit (in bytes)

mtu6: u16_t

maximum transfer unit (in bytes), updated by RA

hwaddr: [u8_t; 6]

link level hardware address of this interface

hwaddr_len: u8_t

number of bytes used in hwaddr

flags: u8_t

flags (@see @ref netif_flags)

name: [c_char; 2]

descriptive abbreviation

num: u8_t

number of this interface. Used for @ref if_api and @ref netifapi_netif, as well as for IPv6 zones

ip6_autoconfig_enabled: u8_t

is this netif enabled for IPv6 autoconfiguration

rs_count: u8_t

Number of Router Solicitation messages that remain to be sent.

igmp_mac_filter: netif_igmp_mac_filter_fn

This function could be called to add or delete an entry in the multicast filter table of the ethernet MAC.

mld_mac_filter: netif_mld_mac_filter_fn

This function could be called to add or delete an entry in the IPv6 multicast filter table of the ethernet MAC.

loop_first: *mut pbufloop_last: *mut pbufloop_cnt_current: u16_tl2_buffer_free_notify: Option<unsafe extern "C" fn(lwip_netif: *mut netif, user_buf: *mut c_void)>last_ip_addr: ip_addr_t

Trait Implementations

impl Clone for netif[src]

impl Copy for netif[src]

Auto Trait Implementations

impl !Send for netif

impl !Sync for netif

impl Unpin for netif

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.