Viacheslav Mitrofanov | 33b5066 | 2022-12-02 12:17:58 +0300 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
| 2 | /* |
| 3 | * Copyright (C) 2013 Allied Telesis Labs NZ |
| 4 | * Chris Packham, <judge.packham@gmail.com> |
| 5 | * |
| 6 | * Copyright (C) 2022 YADRO |
| 7 | * Viacheslav Mitrofanov <v.v.mitrofanov@yadro.com> |
| 8 | */ |
| 9 | |
| 10 | /* Simple IPv6 network layer implementation */ |
| 11 | |
| 12 | #include <common.h> |
| 13 | #include <env_internal.h> |
| 14 | #include <malloc.h> |
| 15 | #include <net.h> |
| 16 | #include <net6.h> |
| 17 | |
| 18 | /* NULL IPv6 address */ |
| 19 | struct in6_addr const net_null_addr_ip6 = ZERO_IPV6_ADDR; |
| 20 | /* Our gateway's IPv6 address */ |
| 21 | struct in6_addr net_gateway6 = ZERO_IPV6_ADDR; |
| 22 | /* Our IPv6 addr (0 = unknown) */ |
| 23 | struct in6_addr net_ip6 = ZERO_IPV6_ADDR; |
| 24 | /* Our link local IPv6 addr (0 = unknown) */ |
| 25 | struct in6_addr net_link_local_ip6 = ZERO_IPV6_ADDR; |
| 26 | /* set server IPv6 addr (0 = unknown) */ |
| 27 | struct in6_addr net_server_ip6 = ZERO_IPV6_ADDR; |
| 28 | /* The prefix length of our network */ |
| 29 | u32 net_prefix_length; |
| 30 | |
| 31 | bool use_ip6; |