summaryrefslogtreecommitdiffstats
path: root/src/include/usr
diff options
context:
space:
mode:
authorMichael Brown2013-09-03 17:28:34 +0200
committerMichael Brown2013-09-03 17:30:18 +0200
commit43307b4e39300f6602a975bbb710b443e5fcd2b5 (patch)
tree10038dfacc57a976fcf2a6d0a112e0f346b69b00 /src/include/usr
parent[neighbour] Generalise concept of neighbour discovery (diff)
downloadipxe-43307b4e39300f6602a975bbb710b443e5fcd2b5.tar.gz
ipxe-43307b4e39300f6602a975bbb710b443e5fcd2b5.tar.xz
ipxe-43307b4e39300f6602a975bbb710b443e5fcd2b5.zip
[ipv4] Abstract out protocol-specific portions of "route" command
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/usr')
-rw-r--r--src/include/usr/route.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/include/usr/route.h b/src/include/usr/route.h
index 855fa7ba..b914f4b8 100644
--- a/src/include/usr/route.h
+++ b/src/include/usr/route.h
@@ -3,12 +3,33 @@
/** @file
*
- * Routing table management
+ * Routing management
*
*/
FILE_LICENCE ( GPL2_OR_LATER );
+#include <ipxe/tables.h>
+
+/** A routing family */
+struct routing_family {
+ /**
+ * Print routes for a network device
+ *
+ * @v netdev Network device
+ */
+ void ( * print ) ( struct net_device *netdev );
+};
+
+/** Routing family table */
+#define ROUTING_FAMILIES __table ( struct routing_family, "routing_families" )
+
+/** Declare a routing family */
+#define __routing_family( order ) __table_entry ( ROUTING_FAMILIES, order )
+
+#define ROUTING_IPV4 01
+#define ROUTING_IPV6 02
+
extern void route ( void );
#endif /* _USR_ROUTE_H */