s = format (s, "persist ");
if ((mp->tap_flags) & 0x8)
s = format (s, "attach ");
+ if ((mp->tap_flags) & 0x16)
+ s = format (s, "tun ");
+ if ((mp->tap_flags) & 0x32)
+ s = format (s, "gro-coalesce-enabled ");
FINISH;
}
{
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));
s = format (0, "SCRIPT: add_node_next ");
- s = format (0, "node %s next %s ", mp->node_name, mp->next_name);
+ s = format (s, "node %s next %s ", mp->node_name, mp->next_name);
FINISH;
}
if (mp->disable_indirect_desc)
s = format (s, "disable_indirect_desc ");
if (mp->tag[0])
- s = format (s, "tag %s", mp->tag);
+ s = format (s, "tag %s ", mp->tag);
if (mp->enable_gso)
- s = format (s, "gso");
+ s = format (s, "gso ");
+ if (mp->enable_packed)
+ s = format (s, "packed");
FINISH;
}
if (mp->renumber)
s = format (s, "renumber %d ", (mp->custom_dev_instance));
if (mp->enable_gso)
- s = format (s, "gso");
+ s = format (s, "gso ");
+ if (mp->enable_packed)
+ s = format (s, "packed");
FINISH;
}
if (mp->name_filter_valid)
{
- u8 *v = vl_api_from_api_to_new_vec (&mp->name_filter);
+ u8 *v = vl_api_from_api_to_new_vec (mp, &mp->name_filter);
s = format (s, "name_filter %v ", v);
vec_free (v);
}
u8 *s;
u8 *cmd = 0;
- cmd = vl_api_from_api_to_new_vec (&mp->cmd);
+ cmd = vl_api_from_api_to_new_vec (mp, &mp->cmd);
s = format (0, "SCRIPT: exec %v ", cmd);
u8 *s;
s = format (0, "SCRIPT: pg_create_interface ");
- s = format (0, "if_id %d", (mp->interface_id));
- s = format (0, "gso-enabled %u", mp->gso_enabled);
- s = format (0, "gso-size %u", (mp->gso_size));
+ s = format (s, "if_id %d ", (mp->interface_id));
+ s = format (s, "gso-enabled %u ", mp->gso_enabled);
+ s = format (s, "gso-size %u", (mp->gso_size));
FINISH;
}
u8 *s;
s = format (0, "SCRIPT: pg_capture ");
- s = format (0, "if_id %d ", (mp->interface_id));
- s = format (0, "pcap %s", mp->pcap_file_name);
+ s = format (s, "if_id %d ", (mp->interface_id));
+ s = format (s, "pcap %s", mp->pcap_file_name);
if (mp->count != ~0)
s = format (s, "count %d ", (mp->count));
if (!mp->is_enabled)
u8 *s;
s = format (0, "SCRIPT: lisp_enable_disable %s",
- mp->is_en ? "enable" : "disable");
+ mp->is_enable ? "enable" : "disable");
FINISH;
}
s = format (s, "%s ", mp->is_add ? "add" : "del");
s = format (s, "vni %d ", (mp->vni));
- s = format (s, "eid %U ", format_lisp_flat_eid,
- mp->eid_type, mp->eid, mp->eid_len);
+ s = format (s, "eid %U ", format_lisp_flat_eid, mp->deid);
if (mp->is_src_dst)
{
- s = format (s, "seid %U ", format_lisp_flat_eid,
- mp->eid_type, mp->seid, mp->seid_len);
+ s = format (s, "seid %U ", format_lisp_flat_eid, mp->seid);
}
rloc_num = (mp->rloc_num);
s = format (s, "%s ", mp->is_add ? "add" : "del");
s = format (s, "vni %d ", (mp->vni));
s = format (s, "reid %U leid %U ",
- format_lisp_flat_eid, mp->eid_type, mp->reid, mp->reid_len,
- format_lisp_flat_eid, mp->eid_type, mp->leid, mp->leid_len);
+ format_lisp_flat_eid, mp->reid, format_lisp_flat_eid, mp->leid);
FINISH;
}
s = format (s, "del ");
s = format (s, "vni %d ", (mp->vni));
- s = format (s, "eid %U ", format_lisp_flat_eid, mp->eid_type, mp->eid,
- mp->prefix_len);
+ s = format (s, "eid %U ", format_lisp_flat_eid, mp->eid);
s = format (s, "locator-set %s ", mp->locator_set_name);
- if (*mp->key)
+ if (mp->key.id)
{
- u32 key_id = mp->key_id;
+ u32 key_id = mp->key.id;
s = format (s, "key-id %U", format_hmac_key_id, key_id);
- s = format (s, "secret-key %s", mp->key);
+ s = format (s, "secret-key %s", mp->key.key);
}
FINISH;
}
if (!mp->is_add)
s = format (s, "del ");
- if (mp->is_ipv6)
- s = format (s, "%U ", format_ip6_address, mp->ip_address);
+ if (mp->ip_address.af)
+ s = format (s, "%U ", format_ip6_address, mp->ip_address.un.ip6);
else
- s = format (s, "%U ", format_ip4_address, mp->ip_address);
+ s = format (s, "%U ", format_ip4_address, mp->ip_address.un.ip4);
FINISH;
}
s = format (0, "SCRIPT: gpe_enable_disable ");
- s = format (s, "%s ", mp->is_en ? "enable" : "disable");
+ s = format (s, "%s ", mp->is_enable ? "enable" : "disable");
FINISH;
}
s = format (0, "SCRIPT: lisp_map_request_mode ");
- switch (mp->mode)
- {
- case 0:
- s = format (s, "dst-only");
- break;
- case 1:
- s = format (s, "src-dst");
- default:
- break;
- }
+ s = mp->is_src_dst ? format (s, "src-dst") : format (s, "dst-only");
FINISH;
}
if (mp->eid_set)
{
s = format (s, "vni %d ", (mp->vni));
- s = format (s, "eid %U ", format_lisp_flat_eid, mp->eid_type,
- mp->eid, mp->prefix_length);
+ s = format (s, "eid %U ", format_lisp_flat_eid, mp->eid);
switch (mp->filter)
{
case 1:
case 2:
s = format (s, "remote ");
break;
+ default:
+ break;
}
}
FINISH;
u8 *s;
s = format (0, "SCRIPT: lisp_rloc_probe_enable_disable ");
- if (mp->is_enabled)
+ if (mp->is_enable)
s = format (s, "enable");
else
s = format (s, "disable");
u8 *s;
s = format (0, "SCRIPT: lisp_map_register_enable_disable ");
- if (mp->is_enabled)
+ if (mp->is_enable)
s = format (s, "enable");
else
s = format (s, "disable");