FD.io VPP  v18.07-rc0-415-g6c78436
Vector Packet Processing
dhcp6_pd_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_pd_client_dp_h
17 #define included_vnet_dhcp6_pd_client_dp_h
18 
19 #include <vlib/vlib.h>
21 
22 typedef struct
23 {
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 {
84 
85 typedef struct
86 {
91 
92 #define vl_typedefs /* define message structures */
93 #include <vnet/vnet_all_api_h.h>
94 #undef vl_typedefs
95 
96 void dhcp6_pd_send_client_message (vlib_main_t * vm, u32 sw_if_index, u8 stop,
98  params);
99 void dhcp6_pd_set_publisher_node (uword node_index, uword event_type);
101 
102 void
105 void
108 void
111 
113 
114 enum
116 
117 typedef struct _vnet_dhcp6_pd_reply_function_list_elt
118 {
119  struct _vnet_dhcp6_pd_reply_function_list_elt
120  *next_dhcp6_pd_reply_event_function;
122 } _vnet_dhcp6_pd_reply_event_function_list_elt_t;
123 
124 typedef struct
125 {
126  _vnet_dhcp6_pd_reply_event_function_list_elt_t *functions;
128 
130 
131 #define VNET_DHCP6_PD_REPLY_EVENT_FUNCTION(f) \
132  \
133 static void __vnet_dhcp6_pd_reply_event_function_init_##f (void) \
134  __attribute__((__constructor__)) ; \
135  \
136 static void __vnet_dhcp6_pd_reply_event_function_init_##f (void) \
137 { \
138  dhcp6_pd_client_public_main_t * nm = &dhcp6_pd_client_public_main; \
139  static _vnet_dhcp6_pd_reply_event_function_list_elt_t init_function; \
140  init_function.next_dhcp6_pd_reply_event_function = nm->functions; \
141  nm->functions = &init_function; \
142  init_function.fp = (void *) &f; \
143 } \
144  \
145 static void __vnet_dhcp6_pd_reply_event_function_deinit_##f (void) \
146  __attribute__((__destructor__)) ; \
147  \
148 static void __vnet_dhcp6_pd_reply_event_function_deinit_##f (void) \
149 { \
150  dhcp6_pd_client_public_main_t * nm = &dhcp6_pd_client_public_main; \
151  _vnet_dhcp6_pd_reply_event_function_list_elt_t *next; \
152  if (nm->functions->fp == (void *) &f) \
153  { \
154  nm->functions = \
155  nm->functions->next_dhcp6_pd_reply_event_function; \
156  return; \
157  } \
158  next = nm->functions; \
159  while (next->next_dhcp6_pd_reply_event_function) \
160  { \
161  if (next->next_dhcp6_pd_reply_event_function->fp == (void *) &f) \
162  { \
163  next->next_dhcp6_pd_reply_event_function = \
164  next->next_dhcp6_pd_reply_event_function->next_dhcp6_pd_reply_event_function; \
165  return; \
166  } \
167  next = next->next_dhcp6_pd_reply_event_function; \
168  } \
169 }
170 
171 #endif /* included_vnet_dhcp6_pd_client_dp_h */
172 
173 /*
174  * fd.io coding-style-patch-verification: ON
175  *
176  * Local Variables:
177  * eval: (c-set-style "gnu")
178  * End:
179  */
Send DHCPv6 PD client message of specified type.
Definition: dhcp.api:298
Enable/disable listening on DHCPv6 client port.
Definition: dhcp.api:205
void vl_api_want_dhcp6_pd_reply_events_t_handler(vl_api_want_dhcp6_pd_reply_events_t *mp)
void vl_api_dhcp6_clients_enable_disable_t_handler(vl_api_dhcp6_clients_enable_disable_t *mp)
void dhcp6_pd_set_publisher_node(uword node_index, uword event_type)
dhcp6_pd_client_state_t * client_state_by_sw_if_index
dhcp6_pd_send_client_message_params_prefix_t * prefixes
unsigned char u8
Definition: types.h:56
double f64
Definition: types.h:142
int dhcp6_pd_publish_report(prefix_report_t *r)
unsigned int u32
Definition: types.h:88
unsigned short u16
Definition: types.h:57
vlib_node_registration_t dhcp6_pd_reply_process_node
(constructor) VLIB_REGISTER_NODE (dhcp6_pd_reply_process_node)
_vnet_dhcp6_pd_reply_event_function_list_elt_t * functions
vlib_main_t * vm
Definition: buffer.c:294
void vl_api_dhcp6_pd_send_client_message_t_handler(vl_api_dhcp6_pd_send_client_message_t *mp)
dhcp6_pd_client_public_main_t dhcp6_pd_client_public_main
dhcp6_report_common_t body
Tell client about a DHCPv6 PD server reply event.
Definition: dhcp.api:400
Register for DHCPv6 PD reply events.
Definition: dhcp.api:346
struct _vlib_node_registration vlib_node_registration_t
u64 uword
Definition: types.h:112
dhcp6_pd_client_main_t dhcp6_pd_client_main
dhcp6_pd_send_client_message_params_t params
dhcp6_prefix_info_t * prefixes
void dhcp6_pd_send_client_message(vlib_main_t *vm, u32 sw_if_index, u8 stop, dhcp6_pd_send_client_message_params_t *params)