diff options
| author | Michael Brown | 2013-11-15 16:12:25 +0100 |
|---|---|---|
| committer | Michael Brown | 2013-11-15 16:22:54 +0100 |
| commit | 6b1eee04527969f21ab65245b67cf9efa4b4aea8 (patch) | |
| tree | cc174ea4309f6decfdcd7d93891c038cf54dcc49 /src/include/ipxe | |
| parent | [build] Update build system for Syslinux 6.x (diff) | |
| download | ipxe-6b1eee04527969f21ab65245b67cf9efa4b4aea8.tar.gz ipxe-6b1eee04527969f21ab65245b67cf9efa4b4aea8.tar.xz ipxe-6b1eee04527969f21ab65245b67cf9efa4b4aea8.zip | |
[ipv6] Separate the concepts of prefix and address creation
Allow for IPv6 routing table entries to be created for an on-link
prefix where a local address has not yet been assigned to the network
device.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe')
| -rw-r--r-- | src/include/ipxe/ipv6.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/include/ipxe/ipv6.h b/src/include/ipxe/ipv6.h index 3cb878262..c4a9f15e3 100644 --- a/src/include/ipxe/ipv6.h +++ b/src/include/ipxe/ipv6.h @@ -160,16 +160,24 @@ struct ipv6_miniroute { /** Network device */ struct net_device *netdev; - /** IPv6 address */ + /** IPv6 address (or prefix if no address is defined) */ struct in6_addr address; /** Prefix length */ unsigned int prefix_len; /** IPv6 prefix mask (derived from prefix length) */ struct in6_addr prefix_mask; - /** Router address is present */ - int has_router; /** Router address */ struct in6_addr router; + /** Flags */ + unsigned int flags; +}; + +/** IPv6 address/routing table entry flags */ +enum ipv6_miniroute_flags { + /** Routing table entry address is valid */ + IPV6_HAS_ADDRESS = 0x0001, + /** Routing table entry router address is valid */ + IPV6_HAS_ROUTER = 0x0002, }; /** @@ -235,7 +243,9 @@ 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_slaac ( struct net_device *netdev, struct in6_addr *prefix, - unsigned int prefix_len, struct in6_addr *router ); +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 ); #endif /* _IPXE_IPV6_H */ |
