added packet forwarding and replaceable routing modules.

This commit is contained in:
nvt-se 2009-04-06 13:18:50 +00:00
parent 461ba4082c
commit 3b2ad9cfc4
2 changed files with 63 additions and 6 deletions

View file

@ -47,7 +47,7 @@
*
* This file is part of the uIP TCP/IP stack.
*
* $Id: uip.h,v 1.23 2009/03/15 20:21:16 nvt-se Exp $
* $Id: uip.h,v 1.24 2009/04/06 13:18:50 nvt-se Exp $
*
*/
@ -1355,6 +1355,21 @@ struct uip_udp_conn {
extern struct uip_udp_conn *uip_udp_conn;
extern struct uip_udp_conn uip_udp_conns[UIP_UDP_CONNS];
struct uip_router {
int (*activate)(void);
int (*deactivate)(void);
uip_ipaddr_t *(*lookup)(uip_ipaddr_t *destipaddr, uip_ipaddr_t *nexthop);
};
#if UIP_CONF_ROUTER
extern const struct uip_router *uip_router;
/**
* uIP routing driver registration function.
*/
void uip_router_register(const struct uip_router *router);
#endif /*UIP_CONF_ROUTER*/
#if UIP_CONF_ICMP6
struct uip_icmp6_conn {
uip_icmp6_appstate_t appstate;
@ -1385,6 +1400,8 @@ struct uip_stats {
layer. */
uip_stats_t sent; /**< Number of sent packets at the IP
layer. */
uip_stats_t forwarded;/**< Number of forwarded packets at the IP
layer. */
uip_stats_t drop; /**< Number of dropped packets at the IP
layer. */
uip_stats_t vhlerr; /**< Number of packets dropped due to wrong