FD.io VPP  v18.07-34-g55fbdb9
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 <vlib/vlib.h>
21 
22 typedef struct
23 {
28 
29 typedef struct
30 {
42 
43 typedef struct
44 {
46  u8 keep_sending_client_message; /* when true then next fields are valid */
58 
59 typedef struct
60 {
62 
65 
67 
68  /* convenience */
72 
74 
75 typedef struct
76 {
82 
83 typedef struct
84 {
89 
90 #define vl_typedefs /* define message structures */
91 #include <vnet/vnet_all_api_h.h>
92 #undef vl_typedefs
93 
94 void dhcp6_send_client_message (vlib_main_t * vm, u32 sw_if_index, u8 stop,
96 void dhcp6_set_publisher_node (uword node_index, uword event_type);
98 
99 
100 void
103 void
106 void
109 
111 
112 enum
114 
115 typedef struct _vnet_dhcp6_reply_function_list_elt
116 {
117  struct _vnet_dhcp6_reply_function_list_elt *next_dhcp6_reply_event_function;
119 } _vnet_dhcp6_reply_event_function_list_elt_t;
120 
121 typedef struct
122 {
123  _vnet_dhcp6_reply_event_function_list_elt_t *functions;
125 
127 
128 #define VNET_DHCP6_REPLY_EVENT_FUNCTION(f) \
129  \
130 static void __vnet_dhcp6_reply_event_function_init_##f (void) \
131  __attribute__((__constructor__)) ; \
132  \
133 static void __vnet_dhcp6_reply_event_function_init_##f (void) \
134 { \
135  dhcp6_ia_na_client_public_main_t * nm = &dhcp6_ia_na_client_public_main; \
136  static _vnet_dhcp6_reply_event_function_list_elt_t init_function; \
137  init_function.next_dhcp6_reply_event_function = nm->functions; \
138  nm->functions = &init_function; \
139  init_function.fp = (void *) &f; \
140 } \
141  \
142 static void __vnet_dhcp6_reply_event_function_deinit_##f (void) \
143  __attribute__((__destructor__)) ; \
144  \
145 static void __vnet_dhcp6_reply_event_function_deinit_##f (void) \
146 { \
147  dhcp6_ia_na_client_public_main_t * nm = &dhcp6_ia_na_client_public_main; \
148  _vnet_dhcp6_reply_event_function_list_elt_t *next; \
149  if (nm->functions->fp == (void *) &f) \
150  { \
151  nm->functions = \
152  nm->functions->next_dhcp6_reply_event_function; \
153  return; \
154  } \
155  next = nm->functions; \
156  while (next->next_dhcp6_reply_event_function) \
157  { \
158  if (next->next_dhcp6_reply_event_function->fp == (void *) &f) \
159  { \
160  next->next_dhcp6_reply_event_function = \
161  next->next_dhcp6_reply_event_function->next_dhcp6_reply_event_function; \
162  return; \
163  } \
164  next = next->next_dhcp6_reply_event_function; \
165  } \
166 }
167 
168 #endif /* included_vnet_dhcp6_client_dp_h */
169 
170 /*
171  * fd.io coding-style-patch-verification: ON
172  *
173  * Local Variables:
174  * eval: (c-set-style "gnu")
175  * End:
176  */
Enable/disable listening on DHCPv6 client port.
Definition: dhcp.api:205
vlib_node_registration_t dhcp6_reply_process_node
(constructor) VLIB_REGISTER_NODE (dhcp6_reply_process_node)
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
void vl_api_want_dhcp6_reply_events_t_handler(vl_api_want_dhcp6_reply_events_t *mp)
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)
Send DHCPv6 client message of specified type.
Definition: dhcp.api:259
unsigned int u32
Definition: types.h:88
void vl_api_dhcp6_send_client_message_t_handler(vl_api_dhcp6_send_client_message_t *mp)
unsigned short u16
Definition: types.h:57
void vl_api_dhcp6_clients_enable_disable_t_handler(vl_api_dhcp6_clients_enable_disable_t *mp)
dhcp6_ia_na_client_state_t * client_state_by_sw_if_index
vlib_main_t * vm
Definition: buffer.c:294
dhcp6_send_client_message_params_address_t * addresses
dhcp6_send_client_message_params_t params
Tell client about a DHCPv6 server reply event.
Definition: dhcp.api:369
struct _vlib_node_registration vlib_node_registration_t
u64 uword
Definition: types.h:112
dhcp6_address_info_t * addresses
Register for DHCPv6 reply events.
Definition: dhcp.api:332
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