FD.io VPP  v20.05.1-6-gf53edbc3b
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 {
26  ip6_address_t prefix;
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 prefix;
84 
85 typedef struct
86 {
91 
94  params);
95 void dhcp6_pd_set_publisher_node (uword node_index, uword event_type);
98  const u8 * prefix_group, u8 enable);
99 int dhcp6_cp_ip6_address_add_del (u32 sw_if_index, const u8 * prefix_group,
100  ip6_address_t address, u8 prefix_length,
101  u8 is_add);
102 
104 
105 enum
107 
108 #include <dhcp/dhcp.api_types.h>
109 
110 typedef struct _vnet_dhcp6_pd_reply_function_list_elt
111 {
112  struct _vnet_dhcp6_pd_reply_function_list_elt
113  *next_dhcp6_pd_reply_event_function;
115 } _vnet_dhcp6_pd_reply_event_function_list_elt_t;
116 
117 typedef struct
118 {
119  _vnet_dhcp6_pd_reply_event_function_list_elt_t *functions;
121 
123 
124 #define VNET_DHCP6_PD_REPLY_EVENT_FUNCTION(f) \
125  \
126 static void __vnet_dhcp6_pd_reply_event_function_init_##f (void) \
127  __attribute__((__constructor__)) ; \
128  \
129 static void __vnet_dhcp6_pd_reply_event_function_init_##f (void) \
130 { \
131  dhcp6_pd_client_public_main_t * nm = &dhcp6_pd_client_public_main; \
132  static _vnet_dhcp6_pd_reply_event_function_list_elt_t init_function; \
133  init_function.next_dhcp6_pd_reply_event_function = nm->functions; \
134  nm->functions = &init_function; \
135  init_function.fp = (void *) &f; \
136 } \
137  \
138 static void __vnet_dhcp6_pd_reply_event_function_deinit_##f (void) \
139  __attribute__((__destructor__)) ; \
140  \
141 static void __vnet_dhcp6_pd_reply_event_function_deinit_##f (void) \
142 { \
143  dhcp6_pd_client_public_main_t * nm = &dhcp6_pd_client_public_main; \
144  _vnet_dhcp6_pd_reply_event_function_list_elt_t *next; \
145  if (nm->functions->fp == (void *) &f) \
146  { \
147  nm->functions = \
148  nm->functions->next_dhcp6_pd_reply_event_function; \
149  return; \
150  } \
151  next = nm->functions; \
152  while (next->next_dhcp6_pd_reply_event_function) \
153  { \
154  if (next->next_dhcp6_pd_reply_event_function->fp == (void *) &f) \
155  { \
156  next->next_dhcp6_pd_reply_event_function = \
157  next->next_dhcp6_pd_reply_event_function->next_dhcp6_pd_reply_event_function; \
158  return; \
159  } \
160  next = next->next_dhcp6_pd_reply_event_function; \
161  } \
162 }
163 
164 #endif /* included_vnet_dhcp6_pd_client_dp_h */
165 
166 /*
167  * fd.io coding-style-patch-verification: ON
168  *
169  * Local Variables:
170  * eval: (c-set-style "gnu")
171  * End:
172  */
void dhcp6_pd_set_publisher_node(uword node_index, uword event_type)
dhcp6_pd_client_state_t * client_state_by_sw_if_index
int dhcp6_cp_ip6_address_add_del(u32 sw_if_index, const u8 *prefix_group, ip6_address_t address, u8 prefix_length, u8 is_add)
dhcp6_pd_send_client_message_params_prefix_t * prefixes
int dhcp6_pd_client_enable_disable(u32 sw_if_index, const u8 *prefix_group, u8 enable)
unsigned char u8
Definition: types.h:56
double f64
Definition: types.h:142
vl_api_interface_index_t sw_if_index
Definition: gre.api:53
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)
Definition: dhcp_api.c:843
vlib_main_t * vm
Definition: in2out_ed.c:1599
_vnet_dhcp6_pd_reply_event_function_list_elt_t * functions
manual_print typedef address
Definition: ip_types.api:85
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:490
struct _vlib_node_registration vlib_node_registration_t
VLIB buffer representation.
Definition: buffer.h:102
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)