Add route() function to display routing table.

This commit is contained in:
Michael Brown
2007-01-10 20:38:20 +00:00
parent 78ded6604a
commit d9ba8f790b
6 changed files with 85 additions and 33 deletions

View File

@@ -9,6 +9,7 @@
#include <ip.h>
#include <gpxe/retry.h>
#include <gpxe/hotplug.h>
/* 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,

12
src/include/usr/route.h Normal file
View File

@@ -0,0 +1,12 @@
#ifndef _USR_ROUTE_H
#define _USR_ROUTE_H
/** @file
*
* Routing table management
*
*/
extern void route ( void );
#endif /* _USR_ROUTE_H */