From d9ba8f790b2b0ad7e22b96e46dc5e0946815e512 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 10 Jan 2007 20:38:20 +0000 Subject: Add route() function to display routing table. --- src/include/gpxe/ip.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/include/gpxe') diff --git a/src/include/gpxe/ip.h b/src/include/gpxe/ip.h index 352cf6435..d212b3ef7 100644 --- a/src/include/gpxe/ip.h +++ b/src/include/gpxe/ip.h @@ -9,6 +9,7 @@ #include #include +#include /* IP constants */ @@ -36,6 +37,24 @@ struct ipv4_pseudo_header { uint16_t len; }; +/** An IPv4 address/routing table entry */ +struct ipv4_miniroute { + /** List of miniroutes */ + struct list_head list; + + /** Network device */ + struct net_device *netdev; + /** Reference to network device */ + struct reference netdev_ref; + + /** IPv4 address */ + struct in_addr address; + /** Subnet mask */ + struct in_addr netmask; + /** Gateway address */ + struct in_addr gateway; +}; + /* Fragment reassembly buffer */ struct frag_buffer { /* Identification number */ @@ -57,6 +76,8 @@ struct net_device; struct net_protocol; struct tcpip_protocol; +extern struct list_head ipv4_miniroutes; + extern struct net_protocol ipv4_protocol; extern int add_ipv4_address ( struct net_device *netdev, -- cgit v1.2.3-55-g7522