Microchip® Advanced Software Framework

ethernet.c File Reference

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

void ethernet_task ( void  )

Process incoming ethernet frames, then update timers.

References ethernetif_input(), gs_net_if, and timers_update().

Referenced by main().

void init_ethernet ( void  )

Initialize the lwIP TCP/IP stack with the network interface driver.

References ethernet_configure_interface(), lwip_init(), and sys_init_timing().

Referenced by main().

void status_callback ( struct netif netif)

Callback function used to print the given IP address when the link is up.

Parameters
netifThe network interface instance.

References inet_ntoa, netif::ip_addr, and netif_is_up.

Referenced by ethernet_configure_interface(), and netif_set_status_callback().

static void timers_update ( void  )
static

struct netif gs_net_if
timers_info_t gs_timers_table[]
static
Initial value:
= {
}
#define IP_TMR_INTERVAL
Definition: ip_frag.h:49
void ip_reass_tmr(void)
Reassembly timer base function for both NO_SYS == 0 and 1 (!).
Definition: ip_frag.c:122
#define ARP_TMR_INTERVAL
5 seconds period
Definition: etharp.h:135
void etharp_tmr(void)
Clears expired entries in the ARP table.
Definition: etharp.c:206
void tcp_tmr(void)
Called periodically to dispatch TCP timers.
Definition: tcp.c:141
#define TCP_TMR_INTERVAL
Definition: tcp_impl.h:117

Referenced by timers_update().