mirror of
https://github.com/ipxe/ipxe
synced 2025-12-21 04:20:17 +03:00
Add route() function to display routing table.
This commit is contained in:
@@ -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
12
src/include/usr/route.h
Normal 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 */
|
||||
Reference in New Issue
Block a user