80 #define UIP_FW_NETIF(ip1,ip2,ip3,ip4, nm1,nm2,nm3,nm4, outputfunc) \
82 { {ip1, ip2, ip3, ip4} }, \
83 { {nm1, nm2, nm3, nm4} }, \
95 #define uip_fw_setipaddr(netif, addr) \
96 do { (netif)->ipaddr[0] = ((uint16_t *)(addr))[0]; \
97 (netif)->ipaddr[1] = ((uint16_t *)(addr))[1]; } while(0)
107 #define uip_fw_setnetmask(netif, addr) \
108 do { (netif)->netmask[0] = ((uint16_t *)(addr))[0]; \
109 (netif)->netmask[1] = ((uint16_t *)(addr))[1]; } while(0)
125 #define UIP_FW_LOCAL 0
139 #define UIP_FW_FORWARDED 1
147 #define UIP_FW_ZEROLEN 2
155 #define UIP_FW_TOOLARGE 3
163 #define UIP_FW_NOROUTE 4
171 #define UIP_FW_DROPPED 5
Representation of a uIP network interface.
struct uip_fw_netif * next
Pointer to the next interface when linked in a list.
uint8_t(* output)(void)
A pointer to the function that sends a packet.
uip_ipaddr_t ipaddr
The IP address of this interface.
Header file for the uIP TCP/IP stack.
void uip_fw_init(void)
Initialize the uIP packet forwarding module.
uint8_t uip_fw_forward(void)
Forward an IP packet in the uip_buf buffer.
void uip_fw_default(struct uip_fw_netif *netif)
Register a default network interface.
void uip_fw_register(struct uip_fw_netif *netif)
Register a network interface with the forwarding module.
uint8_t uip_fw_output(void)
Output an IP packet on the correct network interface.
uip_ipaddr_t netmask
The netmask of the interface.
void uip_fw_periodic(void)
Perform periodic processing.