26#ifndef MMIPAL_IPADDR_STR_MAXLEN
27#define MMIPAL_IPADDR_STR_MAXLEN (48)
31#ifndef MMIPAL_MAX_IPV6_ADDRESSES
32#define MMIPAL_MAX_IPV6_ADDRESSES (3)
100#define MMIPAL_IP_CONFIG_DEFAULT { MMIPAL_DHCP, "", "", "", }
136#define MMIPAL_IP6_CONFIG_DEFAULT { MMIPAL_IP6_AUTOCONFIG }
173#define MMIPAL_INIT_ARGS_DEFAULT { MMIPAL_DHCP, { 0 }, { 0 }, { 0 }, \
174 MMIPAL_IP6_DISABLED, { 0 }, false, 0 }
enum mmipal_status mmipal_init(const struct mmipal_init_args *args)
Initialize the IP stack and enable the MMWLAN interface.
enum mmipal_status mmipal_get_ip_broadcast_addr(mmipal_ip_addr_t broadcast_addr)
Gets the current IPv4 broadcast address.
void(* mmipal_ext_link_status_cb_fn_t)(const struct mmipal_link_status *link_status, void *arg)
Prototype for callback function invoked on link status changes.
void mmipal_set_tx_qos_tid(uint8_t tid)
Set the QoS Traffic ID to use when transmitting.
void mmipal_get_link_packet_counts(uint32_t *tx_packets, uint32_t *rx_packets)
Get the total number of transmitted and received packets on the MMWLAN interface.
enum mmipal_status mmipal_get_dns_server(uint8_t index, mmipal_ip_addr_t addr)
Get the DNS server at the given index.
enum mmipal_status mmipal_set_ip_config(const struct mmipal_ip_config *config)
Set the IP configurations.
enum mmipal_status mmipal_set_dns_server(uint8_t index, const mmipal_ip_addr_t addr)
Set the DNS server at the given index.
void(* mmipal_link_status_cb_fn_t)(const struct mmipal_link_status *link_status)
Prototype for callback function invoked on link status changes.
mmipal_link_state
Enumeration of link states.
enum mmipal_link_state mmipal_get_link_state(void)
Get current IPv4 link state.
mmipal_ip6_addr_mode
Enumeration of IPv6 address allocation modes.
void mmipal_set_link_status_callback(mmipal_link_status_cb_fn_t fn)
Sets the callback function to be invoked on link status changes.
void mmipal_set_ext_link_status_callback(mmipal_ext_link_status_cb_fn_t fn, void *arg)
Sets the extended link status callback function to be invoked on link status changes.
enum mmipal_status mmipal_get_ip6_config(struct mmipal_ip6_config *config)
Get the IP configurations.
mmipal_status
Enumeration of status codes returned by MMIPAL functions.
char mmipal_ip_addr_t[MMIPAL_IPADDR_STR_MAXLEN]
IP address string type.
#define MMIPAL_MAX_IPV6_ADDRESSES
Maximum number of IPv6 addresses supported.
enum mmipal_status mmipal_set_ip6_config(const struct mmipal_ip6_config *config)
Set the IPv6 configurations.
enum mmipal_status mmipal_get_ip_config(struct mmipal_ip_config *config)
Get the IP configurations.
#define MMIPAL_IPADDR_STR_MAXLEN
Maximum length of an IP address string, including null-terminator.
mmipal_addr_mode
Enumeration of IP address allocation modes.
enum mmipal_status mmipal_get_local_addr(mmipal_ip_addr_t local_addr, const mmipal_ip_addr_t dest_addr)
Gets the local address for the MMWLAN interface that is appropriate for a given destination address.
@ MMIPAL_LINK_UP
Link is up.
@ MMIPAL_LINK_DOWN
Link is down.
@ MMIPAL_IP6_AUTOCONFIG
IPv6 address allocated via autoconfiguration.
@ MMIPAL_IP6_DISABLED
Disabled.
@ MMIPAL_IP6_STATIC
Static IPv6 addresses.
@ MMIPAL_IP6_DHCP6_STATELESS
IPv6 address allocated via stateless DHCPv6.
@ MMIPAL_INVALID_ARGUMENT
One or more arguments were invalid.
@ MMIPAL_SUCCESS
Completed successfully.
@ MMIPAL_NOT_SUPPORTED
This functionality is not supported (e.g., due to build configuration).
@ MMIPAL_NO_MEM
Failed due to memory allocation failure.
@ MMIPAL_NO_LINK
The operation could not complete because the link is not up.
@ MMIPAL_AUTOIP
IP address allocated via AutoIP.
@ MMIPAL_DISABLED
Disabled.
@ MMIPAL_DHCP
IP address allocated via DHCP.
@ MMIPAL_DHCP_OFFLOAD
DHCP offloaded to chip.
@ MMIPAL_STATIC
Static IP address.
Initialize arguments structure.
enum mmipal_ip6_addr_mode ip6_mode
IPv6 address allocation mode to use.
uint32_t offload_arp_refresh_s
ARP refresh offload interval in seconds.
mmipal_ip_addr_t ip6_addr
IPv6 address to use (if ip6_mode is MMIPAL_IP6_STATIC).
bool offload_arp_response
Flag requesting ARP response offload feature.
mmipal_ip_addr_t gateway_addr
Gateway IP address to use (if mode is MMIPAL_STATIC).
enum mmipal_addr_mode mode
IP address allocation mode to use.
mmipal_ip_addr_t netmask
Netmask to use (if mode is MMIPAL_STATIC).
mmipal_ip_addr_t ip_addr
IP address to use (if mode is MMIPAL_STATIC).
IPv6 configuration structure.
enum mmipal_ip6_addr_mode ip6_mode
IPv6 addresses allocation mode.
mmipal_ip_addr_t ip6_addr[MMIPAL_MAX_IPV6_ADDRESSES]
Array of IPv6 addresses.
IPv4 configuration structure.
enum mmipal_addr_mode mode
IP address allocation mode.
mmipal_ip_addr_t gateway_addr
Gateway address.
mmipal_ip_addr_t ip_addr
local IP address
mmipal_ip_addr_t netmask
Netmask address.
Structure representing the current status of the link.
mmipal_ip_addr_t netmask
Current netmask.
mmipal_ip_addr_t ip_addr
Current IP address.
mmipal_ip_addr_t gateway
Current gateway IP address.
enum mmipal_link_state link_state
State of the link (up/down).