aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/dhcp/dhcp6_pd_client_dp.h
diff options
context:
space:
mode:
authorJuraj Sloboda <jsloboda@cisco.com>2018-05-04 14:20:06 +0200
committerOle Trøan <otroan@employees.org>2018-06-21 10:03:03 +0000
commitdd3b8f7ab9f120b92c5fdf26016db47bbe18cb39 (patch)
tree6d43daf689e29638fdabb38c66c4357c1c5f491f /src/vnet/dhcp/dhcp6_pd_client_dp.h
parent65ce94a1dcafbba684085e1136b3f12c7bdface3 (diff)
Implement DHCPv6 IA NA client (VPP-1094)
Change-Id: I682a47d6cf9975aca6136188d28ee93eaadf4fe3 Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
Diffstat (limited to 'src/vnet/dhcp/dhcp6_pd_client_dp.h')
-rw-r--r--src/vnet/dhcp/dhcp6_pd_client_dp.h62
1 files changed, 55 insertions, 7 deletions
diff --git a/src/vnet/dhcp/dhcp6_pd_client_dp.h b/src/vnet/dhcp/dhcp6_pd_client_dp.h
index ef69f19ff4d..88c731c2e67 100644
--- a/src/vnet/dhcp/dhcp6_pd_client_dp.h
+++ b/src/vnet/dhcp/dhcp6_pd_client_dp.h
@@ -17,10 +17,7 @@
#define included_vnet_dhcp6_pd_client_dp_h
#include <vlib/vlib.h>
-
-#define vl_typedefs /* define message structures */
-#include <vnet/vnet_all_api_h.h>
-#undef vl_typedefs
+#include <vnet/dhcp/dhcp6_client_common_dp.h>
typedef struct
{
@@ -44,11 +41,63 @@ typedef struct
dhcp6_pd_send_client_message_params_prefix_t *prefixes;
} dhcp6_pd_send_client_message_params_t;
+typedef struct
+{
+ u8 entry_valid;
+ u8 keep_sending_client_message; /* when true then next fields are valid */
+ dhcp6_pd_send_client_message_params_t params;
+ f64 transaction_start;
+ f64 sleep_interval;
+ f64 due_time;
+ u32 n_left;
+ f64 start_time;
+ u32 transaction_id;
+ vlib_buffer_t *buffer;
+ u32 elapsed_pos;
+ u32 adj_index;
+} dhcp6_pd_client_state_t;
+
+typedef struct
+{
+ dhcp6_pd_client_state_t *client_state_by_sw_if_index;
+
+ uword publisher_node;
+ uword publisher_et;
+
+ u32 seed;
+
+ /* convenience */
+ vlib_main_t *vlib_main;
+ vnet_main_t *vnet_main;
+} dhcp6_pd_client_main_t;
+
+extern dhcp6_pd_client_main_t dhcp6_pd_client_main;
+
+typedef struct
+{
+ ip6_address_t prefix;
+ u8 prefix_length;
+ u32 valid_time;
+ u32 preferred_time;
+ u16 status_code;
+} dhcp6_prefix_info_t;
+
+typedef struct
+{
+ dhcp6_report_common_t body;
+ u32 n_prefixes;
+ dhcp6_prefix_info_t *prefixes;
+} prefix_report_t;
+
+#define vl_typedefs /* define message structures */
+#include <vnet/vnet_all_api_h.h>
+#undef vl_typedefs
+
void dhcp6_pd_send_client_message (vlib_main_t * vm, u32 sw_if_index, u8 stop,
dhcp6_pd_send_client_message_params_t *
params);
void dhcp6_pd_set_publisher_node (uword node_index, uword event_type);
-void dhcp6_clients_enable_disable (u8 enable);
+int dhcp6_pd_publish_report (prefix_report_t * r);
void
vl_api_want_dhcp6_pd_reply_events_t_handler
@@ -59,12 +108,11 @@ void
void
vl_api_dhcp6_clients_enable_disable_t_handler
(vl_api_dhcp6_clients_enable_disable_t * mp);
-void vl_api_dhcp6_duid_ll_set_t_handler (vl_api_dhcp6_duid_ll_set_t * mp);
extern vlib_node_registration_t dhcp6_pd_reply_process_node;
enum
-{ DHCP6_PD_DP_REPLY_REPORT, REPORT_MAX };
+{ DHCP6_PD_DP_REPLY_REPORT, DHCP6_PD_DP_REPORT_MAX };
typedef struct _vnet_dhcp6_pd_reply_function_list_elt
{