2 * Copyright (c) 2018 Cisco and/or its affiliates.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at:
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
16 #ifndef included_vnet_dhcp6_client_common_dp_h
17 #define included_vnet_dhcp6_client_common_dp_h
19 #include <vlib/vlib.h>
20 #include <dhcp/dhcp6_packet.h>
29 u16 inner_status_code;
32 } dhcp6_report_common_t;
42 server_id_t *server_ids;
43 } dhcp6_client_common_main_t;
45 extern dhcp6_client_common_main_t dhcp6_client_common_main;
56 } dhcpv6_duid_ll_string_t;
58 extern dhcpv6_duid_ll_string_t client_duid;
59 #define CLIENT_DUID_LENGTH sizeof (client_duid)
60 #define DHCPV6_CLIENT_IAID 1
62 void dhcp6_clients_enable_disable (u8 enable);
63 u32 server_index_get_or_create (u8 * data, u16 len);
65 extern dhcpv6_duid_ll_string_t client_duid;
67 static_always_inline f64
68 random_f64_from_to (f64 from, f64 to)
71 static u8 seed_set = 0;
74 seed = random_default_seed ();
77 return random_f64 (&seed) * (to - from) + from;
80 static const ip6_address_t all_dhcp6_relay_agents_and_servers = {
82 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
83 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02}
86 #endif /* included_vnet_dhcp6_client_common_dp_h */
89 * fd.io coding-style-patch-verification: ON
92 * eval: (c-set-style "gnu")