{
case SR_BEHAVIOR_END:
s = format (s, "Address: %U\nBehavior: End",
- format_ip6_address, (ip6_address_t *) mp->localsid.addr);
+ format_ip6_address, (ip6_address_t *) mp->localsid);
s = format (s, (mp->end_psp ? "End.PSP: True" : "End.PSP: False"));
break;
case SR_BEHAVIOR_X:
format (s,
"Address: %U\nBehavior: X (Endpoint with Layer-3 cross-connect)"
"\nIface: %U\nNext hop: %U", format_ip6_address,
- (ip6_address_t *) mp->localsid.addr,
+ (ip6_address_t *) mp->localsid,
format_vnet_sw_if_index_name, vnm, (mp->sw_if_index),
- format_ip6_address, (ip6_address_t *) mp->nh_addr6);
+ format_ip6_address, (ip6_address_t *) mp->nh_addr.un.ip6);
s = format (s, (mp->end_psp ? "End.PSP: True" : "End.PSP: False"));
break;
case SR_BEHAVIOR_DX4:
format (s,
"Address: %U\nBehavior: DX4 (Endpoint with decapsulation with IPv4 cross-connect)"
"\nIface: %U\nNext hop: %U", format_ip6_address,
- (ip6_address_t *) mp->localsid.addr,
+ (ip6_address_t *) mp->localsid,
format_vnet_sw_if_index_name, vnm, (mp->sw_if_index),
- format_ip4_address, (ip4_address_t *) mp->nh_addr4);
+ format_ip4_address, (ip4_address_t *) mp->nh_addr.un.ip4);
break;
case SR_BEHAVIOR_DX6:
s =
format (s,
"Address: %U\nBehavior: DX6 (Endpoint with decapsulation with IPv6 cross-connect)"
"\nIface: %UNext hop: %U", format_ip6_address,
- (ip6_address_t *) mp->localsid.addr,
+ (ip6_address_t *) mp->localsid,
format_vnet_sw_if_index_name, vnm, (mp->sw_if_index),
- format_ip6_address, (ip6_address_t *) mp->nh_addr6);
+ format_ip6_address, (ip6_address_t *) mp->nh_addr.un.ip6);
break;
case SR_BEHAVIOR_DX2:
s =
format (s,
"Address: %U\nBehavior: DX2 (Endpoint with decapulation and Layer-2 cross-connect)"
"\nIface: %U", format_ip6_address,
- (ip6_address_t *) mp->localsid.addr,
+ (ip6_address_t *) mp->localsid,
format_vnet_sw_if_index_name, vnm, (mp->sw_if_index));
break;
case SR_BEHAVIOR_DT6:
format (s,
"Address: %U\nBehavior: DT6 (Endpoint with decapsulation and specific IPv6 table lookup)"
"\nTable: %u", format_ip6_address,
- (ip6_address_t *) mp->localsid.addr, (mp->fib_table));
+ (ip6_address_t *) mp->localsid, (mp->fib_table));
break;
case SR_BEHAVIOR_DT4:
s =
format (s,
"Address: %U\nBehavior: DT4 (Endpoint with decapsulation and specific IPv4 table lookup)"
"\nTable: %u", format_ip6_address,
- (ip6_address_t *) mp->localsid.addr, (mp->fib_table));
+ (ip6_address_t *) mp->localsid, (mp->fib_table));
break;
default:
if (mp->behavior >= SR_BEHAVIOR_LAST)
{
s = format (s, "Address: %U\n Behavior: %u",
- format_ip6_address, (ip6_address_t *) mp->localsid.addr,
+ format_ip6_address, (ip6_address_t *) mp->localsid,
mp->behavior);
}
else
break;
case SR_STEER_IPV4:
s = format (s, "Traffic type: IPv4 %U/%u", format_ip4_address,
- (ip4_address_t *) mp->prefix_addr, (mp->mask_width));
+ (ip4_address_t *) mp->prefix.address.un.ip4,
+ (mp->prefix.len));
break;
case SR_STEER_IPV6:
s = format (s, "Traffic type: IPv6 %U/%u", format_ip6_address,
- (ip6_address_t *) mp->prefix_addr, (mp->mask_width));
+ (ip6_address_t *) mp->prefix.address.un.ip6,
+ (mp->prefix.len));
break;
default:
s = format (s, "Traffic type: Unknown(%u)", mp->traffic_type);
s = format (s, "FIB_table: %u", (mp->fib_table));
- s = format (s, (mp->type ? "Type: Default" : "Type: Spray"));
+ s = format (s, (mp->is_spray ? "Type: Default" : "Type: Spray"));
s = format (s, "SID list weight: %u", (mp->weight));
u8 *s;
s = format (0, "SCRIPT: vxlan_add_del_tunnel ");
- ip46_address_t src = to_ip46 (mp->is_ipv6, mp->src_address);
- ip46_address_t dst = to_ip46 (mp->is_ipv6, mp->dst_address);
+ ip46_address_t src =
+ to_ip46 (mp->src_address.af, (u8 *) & mp->src_address.un);
+ ip46_address_t dst =
+ to_ip46 (mp->dst_address.af, (u8 *) & mp->dst_address.un);
u8 is_grp = ip46_address_is_multicast (&dst);
char *dst_name = is_grp ? "group" : "dst";
}
s = format (s, "conform_action %U ", format_policer_action,
- mp->conform_action_type, mp->conform_dscp);
+ mp->conform_action.type, mp->conform_action.dscp);
s = format (s, "exceed_action %U ", format_policer_action,
- mp->exceed_action_type, mp->exceed_dscp);
+ mp->exceed_action.type, mp->exceed_action.dscp);
s = format (s, "violate_action %U ", format_policer_action,
- mp->violate_action_type, mp->violate_dscp);
+ mp->violate_action.type, mp->violate_action.dscp);
if (mp->color_aware)
s = format (s, "color-aware ");
(vl_api_app_namespace_add_del_t * mp, void *handle)
{
u8 *s;
- u8 len = clib_min (mp->namespace_id_len,
- ARRAY_LEN (mp->namespace_id) - 1);
- mp->namespace_id[len] = 0;
+
s = format (0, "SCRIPT: app_namespace_add_del ");
s = format (s, "ns-id %s secret %lu sw_if_index %d ipv4_fib_id %d "
- "ipv6_fib_id %d", (char *) mp->namespace_id, mp->secret,
- (mp->sw_if_index), (mp->ip4_fib_id), (mp->ip6_fib_id));
+ "ipv6_fib_id %d",
+ vl_api_from_api_to_new_c_string (&mp->namespace_id),
+ mp->secret, (mp->sw_if_index), (mp->ip4_fib_id),
+ (mp->ip6_fib_id));
FINISH;
}
(vl_api_session_rule_add_del_t * mp, void *handle)
{
u8 *s;
+ fib_prefix_t lcl, rmt;
char *proto = mp->transport_proto == 0 ? "tcp" : "udp";
s = format (0, "SCRIPT: session_rule_add_del ");
mp->tag[sizeof (mp->tag) - 1] = 0;
- if (mp->is_ip4)
+ ip_prefix_decode (&mp->lcl, &lcl);
+ ip_prefix_decode (&mp->rmt, &rmt);
+
+ if (lcl.fp_proto == FIB_PROTOCOL_IP4)
s = format (s, "appns %d scope %d %s %U/%d %d %U/%d %d action %u tag %s",
mp->appns_index, mp->scope, proto, format_ip4_address,
- (ip4_address_t *) mp->lcl_ip, mp->lcl_plen,
- format_ip4_address, (ip4_address_t *) mp->rmt_ip,
- mp->rmt_plen, mp->action_index, mp->tag);
+ &lcl.fp_addr.ip4, lcl.fp_len,
+ format_ip4_address, &rmt.fp_addr.ip4,
+ rmt.fp_len, mp->action_index, mp->tag);
else
s = format (s, "appns %d scope %d %s %U/%d %d %U/%d %d action %u tag %s",
mp->appns_index, mp->scope, proto, format_ip6_address,
- (ip6_address_t *) mp->lcl_ip, mp->lcl_plen,
- format_ip6_address, (ip6_address_t *) mp->rmt_ip,
- mp->rmt_plen, mp->action_index, mp->tag);
+ &lcl.fp_addr.ip6, lcl.fp_len,
+ format_ip6_address, &rmt.fp_addr.ip6,
+ rmt.fp_len, mp->action_index, mp->tag);
FINISH;
}