summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe
diff options
context:
space:
mode:
authorMichael Brown2016-07-19 18:49:50 +0200
committerMichael Brown2016-07-20 14:02:44 +0200
commitc34d1518eb446d596087ed2b9dda33a513f7e980 (patch)
treea15c1ffcaccdbe92803a55e0d41784039db46643 /src/include/ipxe
parent[ipv6] Match user expectations for IPv6 settings priorities (diff)
downloadipxe-c34d1518eb446d596087ed2b9dda33a513f7e980.tar.gz
ipxe-c34d1518eb446d596087ed2b9dda33a513f7e980.tar.xz
ipxe-c34d1518eb446d596087ed2b9dda33a513f7e980.zip
[ipv6] Create routing table based on IPv6 settings
Use the IPv6 settings to construct the routing table, in a matter analogous to the construction of the IPv4 routing table. This allows for manual assignment of IPv6 addresses via e.g. set net0/ip6 2001:ba8:0:1d4::6950:5845 set net0/len6 64 set net0/gateway6 fe80::226:bff:fedd:d3c0 The prefix length ("len6") may be omitted, in which case a default prefix length of 64 will be assumed. Multiple IPv6 addresses may be assigned manually by implicitly creating child settings blocks. For example: set net0/ip6 2001:ba8:0:1d4::6950:5845 set net0.ula/ip6 fda4:2496:e992::6950:5845 Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe')
-rw-r--r--src/include/ipxe/ipv6.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/include/ipxe/ipv6.h b/src/include/ipxe/ipv6.h
index 4dd03f058..0e5292fba 100644
--- a/src/include/ipxe/ipv6.h
+++ b/src/include/ipxe/ipv6.h
@@ -25,6 +25,12 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
/** IPv6 maximum hop limit */
#define IPV6_HOP_LIMIT 0xff
+/** IPv6 default prefix length */
+#define IPV6_DEFAULT_PREFIX_LEN 64
+
+/** IPv6 maximum prefix length */
+#define IPV6_MAX_PREFIX_LEN 128
+
/** IPv6 header */
struct ipv6_header {
/** Version (4 bits), Traffic class (8 bits), Flow label (20 bits) */
@@ -258,10 +264,6 @@ extern struct list_head ipv6_miniroutes;
extern struct net_protocol ipv6_protocol __net_protocol;
extern int ipv6_has_addr ( struct net_device *netdev, struct in6_addr *addr );
-extern int ipv6_set_prefix ( struct net_device *netdev, struct in6_addr *prefix,
- unsigned int prefix_len, struct in6_addr *router );
-extern int ipv6_set_address ( struct net_device *netdev,
- struct in6_addr *address );
extern int parse_ipv6_setting ( const struct setting_type *type,
const char *value, void *buf, size_t len );
extern int format_ipv6_setting ( const struct setting_type *type,