Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Revert "API: Cleanup APIs interface.api"
[vpp.git]
/
src
/
vpp
/
api
/
custom_dump.c
diff --git
a/src/vpp/api/custom_dump.c
b/src/vpp/api/custom_dump.c
index
fa7091d
..
ab98954
100644
(file)
--- a/
src/vpp/api/custom_dump.c
+++ b/
src/vpp/api/custom_dump.c
@@
-112,7
+112,7
@@
static void *vl_api_sw_interface_set_flags_t_print
s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
- if (
ntohl (mp->flags) & IF_STATUS_API_FLAG_ADMIN_UP
)
+ if (
mp->admin_up_down
)
s = format (s, "admin-up ");
else
s = format (s, "admin-down ");
s = format (s, "admin-up ");
else
s = format (s, "admin-down ");
@@
-159,12
+159,12
@@
static void *vl_api_sw_interface_event_t_print
s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
- if (
ntohl (mp->flags) & IF_STATUS_API_FLAG_ADMIN_UP
)
+ if (
mp->admin_up_down
)
s = format (s, "admin-up ");
else
s = format (s, "admin-down ");
s = format (s, "admin-up ");
else
s = format (s, "admin-down ");
- if (
ntohl (mp->flags) & IF_STATUS_API_FLAG_LINK_UP
)
+ if (
mp->link_up_down
)
s = format (s, "link-up");
else
s = format (s, "link-down");
s = format (s, "link-up");
else
s = format (s, "link-down");
@@
-179,18
+179,17
@@
static void *vl_api_sw_interface_add_del_address_t_print
(vl_api_sw_interface_add_del_address_t * mp, void *handle)
{
u8 *s;
(vl_api_sw_interface_add_del_address_t * mp, void *handle)
{
u8 *s;
- ip46_address_t address;
s = format (0, "SCRIPT: sw_interface_add_del_address ");
s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
s = format (0, "SCRIPT: sw_interface_add_del_address ");
s = format (s, "sw_if_index %d ", ntohl (mp->sw_if_index));
- if (
ip_address_decode (&mp->prefix.address, &address) == IP46_TYPE_IP
6)
+ if (
mp->is_ipv
6)
s = format (s, "%U/%d ", format_ip6_address,
s = format (s, "%U/%d ", format_ip6_address,
- (ip6_address_t *)
& address.ip6, mp->prefix.
address_length);
+ (ip6_address_t *)
mp->address, mp->
address_length);
else
s = format (s, "%U/%d ", format_ip4_address,
else
s = format (s, "%U/%d ", format_ip4_address,
- (ip4_address_t *)
& address.ip4, mp->prefix.
address_length);
+ (ip4_address_t *)
mp->address, mp->
address_length);
if (mp->is_add == 0)
s = format (s, "del ");
if (mp->is_add == 0)
s = format (s, "del ");
@@
-1061,15
+1060,15
@@
static void *vl_api_create_vlan_subif_t_print
FINISH;
}
FINISH;
}
-#define foreach_create_subif_
flag
\
-_(
0, "no_tags")
\
-_(
1, "one_tag")
\
-_(
2, "two_tags")
\
-_(
3, "dot1ad")
\
-_(
4, "exact_match")
\
-_(
5, "default_sub")
\
-_(
6, "outer_vlan_id_any")
\
-_(
7, "inner_vlan_id_any"
)
+#define foreach_create_subif_
bit
\
+_(
no_tags)
\
+_(
one_tag)
\
+_(
two_tags)
\
+_(
dot1ad)
\
+_(
exact_match)
\
+_(
default_sub)
\
+_(
outer_vlan_id_any)
\
+_(
inner_vlan_id_any
)
static void *vl_api_create_subif_t_print
(vl_api_create_subif_t * mp, void *handle)
static void *vl_api_create_subif_t_print
(vl_api_create_subif_t * mp, void *handle)
@@
-1088,8
+1087,8
@@
static void *vl_api_create_subif_t_print
if (mp->inner_vlan_id)
s = format (s, "inner_vlan_id %d ", ntohs (mp->inner_vlan_id));
if (mp->inner_vlan_id)
s = format (s, "inner_vlan_id %d ", ntohs (mp->inner_vlan_id));
-#define _(a
,b) if (mp->sub_if_flags & (1 << a)) s = format (s, "%s ", b
);
- foreach_create_subif_
flag
;
+#define _(a
) if (mp->a) s = format (s, "%s ", #a
);
+ foreach_create_subif_
bit
;
#undef _
FINISH;
#undef _
FINISH;