16 #ifndef included_manual_fns_h 17 #define included_manual_fns_h 23 #include <acl/acl_types.api.h> 29 vl_print (handle, (char *)s); \ 36 for(i=0; i<
count; i++) {
37 vl_api_acl_rule_t_endian (&rules[i]);
45 for(i=0; i<
count; i++) {
46 vl_api_macip_acl_rule_t_endian (&rules[i]);
53 a->_vl_msg_id = clib_net_to_host_u16 (a->_vl_msg_id);
64 a->_vl_msg_id = clib_net_to_host_u16 (a->_vl_msg_id);
76 a->_vl_msg_id = clib_net_to_host_u16 (a->_vl_msg_id);
88 a->_vl_msg_id = clib_net_to_host_u16 (a->_vl_msg_id);
99 a->_vl_msg_id = clib_net_to_host_u16 (a->_vl_msg_id);
119 s =
format (s,
"permit+reflect");
122 s =
format (s,
"action %d", action);
132 s =
format (0,
" %s ", a->is_ipv6 ?
"ipv6" :
"ipv4");
137 s =
format (s,
" src %U/%d dst %U/%d \\\n",
141 s =
format (s,
" src %U/%d dst %U/%d \\\n",
144 s =
format (s,
" proto %d \\\n", a->proto);
145 s =
format (s,
" sport %d-%d dport %d-%d \\\n",
146 clib_net_to_host_u16 (a->srcport_or_icmptype_first),
147 clib_net_to_host_u16 (a->srcport_or_icmptype_last),
148 clib_net_to_host_u16 (a->dstport_or_icmpcode_first),
149 clib_net_to_host_u16 (a->dstport_or_icmpcode_last));
151 s =
format (s,
" tcpflags %u mask %u, \\",
152 a->tcp_flags_value, a->tcp_flags_mask);
162 s =
format (0,
" %s %s \\\n", a->is_ipv6 ?
"ipv6" :
"ipv4",
163 a->is_permit ?
"permit" :
"deny");
165 s =
format (s,
" src mac %U mask %U \\\n",
170 s =
format (s,
" src ip %U/%d, \\",
173 s =
format (s,
" src ip %U/%d, \\",
187 if (count > 0x100000)
189 s =
format (s,
"WARN: acl_add_replace count endianness wrong? Fixup to avoid long loop.\n");
193 s =
format (s,
"SCRIPT: acl_add_replace %d count %d ",
202 for (i = 0; i <
count; i++)
215 s =
format (0,
"SCRIPT: acl_del %d ",
230 if (count > 0x100000)
232 s =
format (s,
"WARN: acl_details count endianness wrong? Fixup to avoid long loop.\n");
236 s =
format (s,
"acl_details index %d count %d ",
245 for (i = 0; i <
count; i++)
259 if (count > 0x100000)
261 s =
format (s,
"WARN: macip_acl_details count endianness wrong? Fixup to avoid long loop.\n");
265 s =
format (s,
"macip_acl_details index %d count %d ",
274 for (i = 0; i <
count; i++)
286 if (count > 0x100000)
288 s =
format (s,
"WARN: macip_acl_add count endianness wrong? Fixup to avoid long loop.\n");
292 s =
format (s,
"SCRIPT: macip_acl_add ");
296 s =
format (s,
"count %d \\\n", count);
300 for (i = 0; i <
count; i++)
316 if (count > 0x100000)
318 s =
format (s,
"WARN: macip_acl_add_replace count endianness wrong? Fixup to avoid long loop.\n");
322 s =
format (s,
"SCRIPT: macip_acl_add_replace %d count %d ",
327 s =
format (s,
"count %d \\\n", count);
331 for (i = 0; i <
count; i++)
348 (0,
"SCRIPT: acl_interface_set_acl_list sw_if_index %d count %d\n",
351 s =
format (s,
" input ");
353 for (i = 0; i < a->
count; i++)
356 s =
format (s,
"output ");
357 s =
format (s,
"%d ", clib_net_to_host_u32 (a->
acls[i]));
372 (0,
"SCRIPT: acl_interface_set_etype_whitelist sw_if_index %d count %d\n",
375 s =
format (s,
" input ");
377 for (i = 0; i < a->
count; i++)
380 s =
format (s,
"output ");
394 s =
format (0,
"SCRIPT: acl_interface_add_del sw_if_index %d acl %d ",
411 "SCRIPT: macip_acl_interface_add_del sw_if_index %d acl_index %d ",
426 s =
format (0,
"SCRIPT: macip_acl_del %d ",
static void * vl_api_macip_acl_interface_add_del_t_print(vl_api_macip_acl_interface_add_del_t *a, void *handle)
Use acl_interface_set_acl_list instead Append/remove an ACL index to/from the list of ACLs checked fo...
Set the vector of input/output ACLs checked for an interface.
Set the ethertype whitelists on an interface.
vl_api_macip_acl_rule_t r[count]
static void * vl_api_acl_details_t_print(vl_api_acl_details_t *a, void *handle)
static void vl_api_macip_acl_add_replace_t_endian(vl_api_macip_acl_add_replace_t *a)
Details about one MACIP ACL.
u8 * format_ethernet_address(u8 *s, va_list *args)
static void * vl_api_acl_interface_set_acl_list_t_print(vl_api_acl_interface_set_acl_list_t *a, void *handle)
Add or delete a MACIP ACL to/from interface.
static u8 * format_acl_action(u8 *s, u8 action)
static void vl_api_macip_acl_rule_t_array_endian(vl_api_macip_acl_rule_t *rules, u32 count)
static void * vl_api_acl_interface_add_del_t_print(vl_api_acl_interface_add_del_t *a, void *handle)
static void * vl_api_macip_acl_rule_t_print(vl_api_macip_acl_rule_t *a, void *handle)
static void * vl_api_macip_acl_add_replace_t_print(vl_api_macip_acl_add_replace_t *a, void *handle)
Replace an existing ACL in-place or create a new ACL.
vl_api_acl_rule_t r[count]
static void vl_api_acl_add_replace_t_endian(vl_api_acl_add_replace_t *a)
static void * vl_api_macip_acl_add_t_print(vl_api_macip_acl_add_t *a, void *handle)
vl_api_acl_rule_t r[count]
vl_api_macip_acl_rule_t r[count]
static void * vl_api_acl_rule_t_print(vl_api_acl_rule_t *a, void *handle)
static void * vl_api_acl_add_replace_t_print(vl_api_acl_add_replace_t *a, void *handle)
vl_api_gbp_rule_t rules[n_rules]
static void vl_api_macip_acl_details_t_endian(vl_api_macip_acl_details_t *a)
static void vl_api_macip_acl_add_t_endian(vl_api_macip_acl_add_t *a)
vl_api_macip_acl_rule_t r[count]
static void * vl_api_acl_interface_set_etype_whitelist_t_print(vl_api_acl_interface_set_etype_whitelist_t *a, void *handle)
Details about a single ACL contents.
static void * vl_api_macip_acl_details_t_print(vl_api_macip_acl_details_t *a, void *handle)
static void * vl_api_acl_del_t_print(vl_api_macip_acl_del_t *a, void *handle)
static void vl_api_acl_rule_t_array_endian(vl_api_acl_rule_t *rules, u32 count)
static void * vl_api_macip_acl_del_t_print(vl_api_macip_acl_del_t *a, void *handle)
static void vl_api_acl_details_t_endian(vl_api_acl_details_t *a)