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 <vnet/dhcp/dhcp6_client_common_dp.h>
21 #include <vnet/dhcp/dhcp6_packet.h>
22 #include <vnet/vnet_msg_enum.h>
23 #include <vlibapi/api_common.h>
24 #include <vlibmemory/api.h>
26 #define vl_typedefs /* define message structures */
27 #include <vnet/vnet_all_api_h.h>
30 #define vl_endianfun /* define message structures */
31 #include <vnet/vnet_all_api_h.h>
34 /* instantiate all the print functions we know about */
35 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__)
37 #include <vnet/vnet_all_api_h.h>
40 #include <vlibapi/api_helper_macros.h>
49 u16 inner_status_code;
52 } dhcp6_report_common_t;
62 server_id_t *server_ids;
63 } dhcp6_client_common_main_t;
65 extern dhcp6_client_common_main_t dhcp6_client_common_main;
76 } dhcpv6_duid_ll_string_t;
78 extern dhcpv6_duid_ll_string_t client_duid;
79 #define CLIENT_DUID_LENGTH sizeof (client_duid)
80 #define DHCPV6_CLIENT_IAID 1
82 void dhcp6_clients_enable_disable (u8 enable);
83 u32 server_index_get_or_create (u8 * data, u16 len);
85 #define vl_typedefs /* define message structures */
86 #include <vnet/vnet_all_api_h.h>
89 void vl_api_dhcp6_duid_ll_set_t_handler (vl_api_dhcp6_duid_ll_set_t * mp);
91 static_always_inline f64
92 random_f64_from_to (f64 from, f64 to)
95 static u8 seed_set = 0;
98 seed = random_default_seed ();
101 return random_f64 (&seed) * (to - from) + from;
104 static const ip6_address_t all_dhcp6_relay_agents_and_servers = {
106 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
107 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02}
110 #endif /* included_vnet_dhcp6_client_common_dp_h */
113 * fd.io coding-style-patch-verification: ON
116 * eval: (c-set-style "gnu")