Ethernet management for the lwIP Raw HTTP basic example.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
#include <string.h>
#include "board.h"
#include "ethernet.h"
#include "ethernet_phy.h"
#include "emac.h"
#include "netif/ethernetif.h"
#include "timer_mgt.h"
#include "lwip/sys.h"
#include "lwip/api.h"
#include "lwip/tcp.h"
#include "lwip/tcpip.h"
#include "lwip/memp.h"
#include "lwip/dhcp.h"
#include "lwip/dns.h"
#include "lwip/stats.h"
#include "lwip/init.h"
#include "lwip/ip_frag.h"
#include "lwip/inet.h"
#include "lwip/tcp_impl.h"
#include "netif/etharp.h"
Data Structures | |
struct | timers_info |
Typedefs | |
typedef struct timers_info | timers_info_t |
Functions | |
static void | ethernet_configure_interface (void) |
Configure network interface driver. More... | |
void | ethernet_task (void) |
Process incoming ethernet frames, then update timers. More... | |
void | init_ethernet (void) |
Initialize the lwIP TCP/IP stack with the network interface driver. More... | |
void | status_callback (struct netif *netif) |
Callback function used to print the given IP address when the link is up. More... | |
static void | timers_update (void) |
Timer management function. More... | |
Variables | |
struct netif | gs_net_if |
static timers_info_t | gs_timers_table [] |
typedef struct timers_info timers_info_t |
Configure network interface driver.
References ip_addr::addr, ERR_OK, ETHERNET_CONF_GATEWAY_ADDR0, ETHERNET_CONF_GATEWAY_ADDR1, ETHERNET_CONF_GATEWAY_ADDR2, ETHERNET_CONF_GATEWAY_ADDR3, ETHERNET_CONF_IPADDR0, ETHERNET_CONF_IPADDR1, ETHERNET_CONF_IPADDR2, ETHERNET_CONF_IPADDR3, ETHERNET_CONF_NET_MASK0, ETHERNET_CONF_NET_MASK1, ETHERNET_CONF_NET_MASK2, ETHERNET_CONF_NET_MASK3, ethernet_input(), ethernetif_init(), gs_net_if, IP4_ADDR, LWIP_ASSERT, netif_add(), netif_set_default(), netif_set_status_callback(), netif_set_up(), NULL, and status_callback().
Referenced by init_ethernet().
Process incoming ethernet frames, then update timers.
References ethernetif_input(), gs_net_if, and timers_update().
Referenced by main().
Initialize the lwIP TCP/IP stack with the network interface driver.
References ethernet_configure_interface(), lwip_init(), and sys_init_timing().
Referenced by main().
Callback function used to print the given IP address when the link is up.
netif | The network interface instance. |
References inet_ntoa, netif::ip_addr, and netif_is_up.
Referenced by ethernet_configure_interface(), and netif_set_status_callback().
Timer management function.
References gs_timers_table, sys_get_ms(), timers_info::timer, timers_info::timer_func, and timers_info::timer_interval.
Referenced by ethernet_task().
struct netif gs_net_if |
Referenced by ethernet_configure_interface(), and ethernet_task().
|
static |
Referenced by timers_update().