FD.io VPP  v21.01.1
Vector Packet Processing
dhcp6_ia_na_client_dp.h
Go to the documentation of this file.
1 /*
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:
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
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.
14  */
15 
16 #ifndef included_vnet_dhcp6_client_dp_h
17 #define included_vnet_dhcp6_client_dp_h
18 
19 #include <stdbool.h>
20 
22 
23 typedef struct
24 {
27  ip6_address_t address;
29 
30 typedef struct
31 {
43 
44 typedef struct
45 {
47  u8 keep_sending_client_message; /* when true then next fields are valid */
59 
60 typedef struct
61 {
63 
66 
68 
69  /* convenience */
73 
75 
76 typedef struct
77 {
78  ip6_address_t address;
83 
84 typedef struct
85 {
90 
93 void dhcp6_set_publisher_node (uword node_index, uword event_type);
96 
98 
99 enum
101 
102 #include <dhcp/dhcp.api_types.h>
103 
104 typedef struct _vnet_dhcp6_reply_function_list_elt
105 {
106  struct _vnet_dhcp6_reply_function_list_elt *next_dhcp6_reply_event_function;
108 } _vnet_dhcp6_reply_event_function_list_elt_t;
109 
110 typedef struct
111 {
112  _vnet_dhcp6_reply_event_function_list_elt_t *functions;
114 
116 
117 #define VNET_DHCP6_REPLY_EVENT_FUNCTION(f) \
118  \
119 static void __vnet_dhcp6_reply_event_function_init_##f (void) \
120  __attribute__((__constructor__)) ; \
121  \
122 static void __vnet_dhcp6_reply_event_function_init_##f (void) \
123 { \
124  dhcp6_ia_na_client_public_main_t * nm = &dhcp6_ia_na_client_public_main; \
125  static _vnet_dhcp6_reply_event_function_list_elt_t init_function; \
126  init_function.next_dhcp6_reply_event_function = nm->functions; \
127  nm->functions = &init_function; \
128  init_function.fp = (void *) &f; \
129 } \
130  \
131 static void __vnet_dhcp6_reply_event_function_deinit_##f (void) \
132  __attribute__((__destructor__)) ; \
133  \
134 static void __vnet_dhcp6_reply_event_function_deinit_##f (void) \
135 { \
136  dhcp6_ia_na_client_public_main_t * nm = &dhcp6_ia_na_client_public_main; \
137  _vnet_dhcp6_reply_event_function_list_elt_t *next; \
138  if (nm->functions->fp == (void *) &f) \
139  { \
140  nm->functions = \
141  nm->functions->next_dhcp6_reply_event_function; \
142  return; \
143  } \
144  next = nm->functions; \
145  while (next->next_dhcp6_reply_event_function) \
146  { \
147  if (next->next_dhcp6_reply_event_function->fp == (void *) &f) \
148  { \
149  next->next_dhcp6_reply_event_function = \
150  next->next_dhcp6_reply_event_function->next_dhcp6_reply_event_function; \
151  return; \
152  } \
153  next = next->next_dhcp6_reply_event_function; \
154  } \
155 }
156 
157 #endif /* included_vnet_dhcp6_client_dp_h */
158 
159 /*
160  * fd.io coding-style-patch-verification: ON
161  *
162  * Local Variables:
163  * eval: (c-set-style "gnu")
164  * End:
165  */
vlib_node_registration_t dhcp6_reply_process_node
(constructor) VLIB_REGISTER_NODE (dhcp6_reply_process_node)
Definition: dhcp_api.c:731
void dhcp6_send_client_message(vlib_main_t *vm, u32 sw_if_index, u8 stop, dhcp6_send_client_message_params_t *params)
_vnet_dhcp6_reply_event_function_list_elt_t * functions
vlib_main_t * vm
Definition: in2out_ed.c:1580
int dhcp6_publish_report(address_report_t *r)
unsigned char u8
Definition: types.h:56
double f64
Definition: types.h:142
void dhcp6_set_publisher_node(uword node_index, uword event_type)
unsigned int u32
Definition: types.h:88
unsigned short u16
Definition: types.h:57
dhcp6_ia_na_client_state_t * client_state_by_sw_if_index
dhcp6_send_client_message_params_address_t * addresses
int dhcp6_client_enable_disable(u32 sw_if_index, u8 enable)
dhcp6_send_client_message_params_t params
Tell client about a DHCPv6 server reply event.
Definition: dhcp.api:459
struct _vlib_node_registration vlib_node_registration_t
VLIB buffer representation.
Definition: buffer.h:102
u64 uword
Definition: types.h:112
dhcp6_address_info_t * addresses
dhcp6_report_common_t body
dhcp6_ia_na_client_main_t dhcp6_ia_na_client_main
dhcp6_ia_na_client_public_main_t dhcp6_ia_na_client_public_main
vl_api_interface_index_t sw_if_index
Definition: wireguard.api:34