@param n_paths Number of paths
@param paths The set of forwarding paths that are being added or removed.
*/
-typeonly define abf_policy
+typedef abf_policy
{
u32 policy_id;
u32 acl_index;
on this interface. lower value is 'better'
@param is_ipv6 Does this attachment apply to IPv6 packets (or IPv4)
*/
-typeonly define abf_itf_attach
+typedef abf_itf_attach
{
u32 policy_id;
u32 sw_if_index;
@param tcp_flags_value - if proto==6, mask to AND the TCP flags in the packet with
*/
-typeonly manual_print define acl_rule
+typedef acl_rule
{
u8 is_permit;
u8 is_ipv6;
@param src_ip_prefix_len - Source prefix length
*/
-typeonly manual_print define macip_acl_rule
+typedef macip_acl_rule
{
u8 is_permit;
u8 is_ipv6;
return(s);
}
-static inline void *
-vl_api_acl_rule_t_print (vl_api_acl_rule_t * a, void *handle)
-{
- u8 *s;
-
- s = format (0, " %s ", a->is_ipv6 ? "ipv6" : "ipv4");
- s = format_acl_action (s, a->is_permit);
- s = format (s, " \\\n");
-
- if (a->is_ipv6)
- s = format (s, " src %U/%d dst %U/%d \\\n",
- format_ip6_address, a->src_ip_addr, a->src_ip_prefix_len,
- format_ip6_address, a->dst_ip_addr, a->dst_ip_prefix_len);
- else
- s = format (s, " src %U/%d dst %U/%d \\\n",
- format_ip4_address, a->src_ip_addr, a->src_ip_prefix_len,
- format_ip4_address, a->dst_ip_addr, a->dst_ip_prefix_len);
- s = format (s, " proto %d \\\n", a->proto);
- s = format (s, " sport %d-%d dport %d-%d \\\n",
- clib_net_to_host_u16 (a->srcport_or_icmptype_first),
- clib_net_to_host_u16 (a->srcport_or_icmptype_last),
- clib_net_to_host_u16 (a->dstport_or_icmpcode_first),
- clib_net_to_host_u16 (a->dstport_or_icmpcode_last));
-
- s = format (s, " tcpflags %u mask %u, \\",
- a->tcp_flags_value, a->tcp_flags_mask);
- PRINT_S;
- return handle;
-}
-
-
-
-static inline void *
-vl_api_macip_acl_rule_t_print (vl_api_macip_acl_rule_t * a, void *handle)
-{
- u8 *s;
-
- s = format (0, " %s %s \\\n", a->is_ipv6 ? "ipv6" : "ipv4",
- a->is_permit ? "permit" : "deny");
-
- s = format (s, " src mac %U mask %U \\\n",
- format_ethernet_address, a->src_mac,
- format_ethernet_address, a->src_mac_mask);
-
- if (a->is_ipv6)
- s = format (s, " src ip %U/%d, \\",
- format_ip6_address, a->src_ip_addr, a->src_ip_prefix_len);
- else
- s = format (s, " src ip %U/%d, \\",
- format_ip4_address, a->src_ip_addr, a->src_ip_prefix_len);
-
- PRINT_S;
- return handle;
-}
-
static inline void *
vl_api_acl_add_replace_t_print (vl_api_acl_add_replace_t * a, void *handle)
{
u32 remote_ep_timeout;
};
-typeonly define gbp_endpoint_group
+typedef gbp_endpoint_group
{
u32 vnid;
u16 sclass;
vl_api_gbp_endpoint_group_t epg;
};
-typeonly define gbp_recirc
+typedef gbp_recirc
{
u32 sw_if_index;
u16 sclass;
GBP_API_SUBNET_ANON_L3_OUT,
};
-typeonly define gbp_subnet
+typedef gbp_subnet
{
u32 rd_id;
u32 sw_if_index;
GBP_API_EXT_ITF_F_ANON = 1,
};
-typeonly define gbp_ext_itf
+typedef gbp_ext_itf
{
u32 sw_if_index;
u32 bd_id;
* @param saddr - source address
* @param gaddr - group address
*/
-typeonly define igmp_group
+typedef igmp_group
{
vl_api_filter_mode_t filter;
u8 n_srcs;
@param n_paths Number of paths
@param paths The set of forwarding paths.
*/
-typeonly define l3xc
+typedef l3xc
{
u32 sw_if_index;
u8 is_ip6;
@param protocol - tcp or udp.
@param port - destination port.
*/
-typeonly define lb_vip
+typedef lb_vip
{
vl_api_prefix_t pfx;
vl_api_ip_proto_t protocol;
* times are in double-precision fp seconds since 1/1/1970,
* which was a Thursday.
*/
-typeonly define time_range
+typedef time_range
{
f64 start; /**< start of the time range */
f64 end; /**< end of the time range */
@param probability - probability of the internal node to be randomly matched
@param vrf_id - VRF id
*/
-typeonly manual_endian define nat44_lb_addr_port {
+typedef nat44_lb_addr_port {
vl_api_ip4_address_t addr;
u16 port;
u8 probability;
#include <vnet/fib/fib_table.h>
#include <vnet/ip/ip_types_api.h>
-#define vl_api_nat44_lb_addr_port_t_endian vl_noop_handler
#define vl_api_nat44_add_del_lb_static_mapping_t_endian vl_noop_handler
#define vl_api_nat44_nat44_lb_static_mapping_details_t_endian vl_noop_handler
@param tx_consume - tx consume index
*/
-typeonly define vmxnet3_tx_list
+typedef vmxnet3_tx_list
{
u16 tx_qsize;
u16 tx_next;
@param rx_consume - rx consume index
*/
-typeonly define vmxnet3_rx_list
+typedef vmxnet3_rx_list
{
u16 rx_qsize;
u16 rx_fill[2];
'''define : flist DEFINE ID '{' block_statements_opt '}' ';' '''
# Legacy typedef
if 'typeonly' in p[1]:
- p[0] = Typedef(p[3], p[1], p[5])
+ self._parse_error('legacy typedef. use typedef: {} {}[{}];'
+ .format(p[1], p[2], p[4]),
+ self._token_coord(p, 1))
else:
p[0] = Define(p[3], p[1], p[5])
/*
* Get API version table (includes built-in and plugins)
*/
-typeonly define module_version {
+typedef module_version {
u32 major;
u32 minor;
u32 patch;
@param bt_sub_domain - the sud-domain
@param bt_bit_header_length - the number of bits in the header length
*/
-typeonly define bier_table_id
+typedef bier_table_id
{
u8 bt_set;
u8 bt_sub_domain;
@param dscp - DSCP value set in IP packets sent by the client
@param pid - sender's pid
*/
-typeonly define dhcp_client
+typedef dhcp_client
{
u32 sw_if_index;
u8 hostname[64];
/** \brief Struct representing domain server
@param address - IP address
*/
-typeonly manual_print manual_endian define domain_server
+typedef domain_server
{
u8 address[16];
};
@param router_address - Router IP address
@param host_mac - Host MAC address
*/
-typeonly define dhcp_lease
+typedef dhcp_lease
{
u32 sw_if_index;
u8 state;
u8 is_ip6;
};
-typeonly manual_print manual_endian define dhcp_server
+typedef dhcp_server
{
u32 server_vrf_id;
u8 dhcp_server[16];
@param valid_time - valid lifetime
@param preferred_time - preferred lifetime
*/
-typeonly define dhcp6_address_info
+typedef dhcp6_address_info
{
u8 address[16];
u32 valid_time;
@param valid_time - valid lifetime
@param preferred_time - preferred lifetime
*/
-typeonly define dhcp6_pd_prefix_info
+typedef dhcp6_pd_prefix_info
{
u8 prefix[16];
u8 prefix_length;
not set by the client, then VPP will generate something
meaningfull.
*/
-typeonly define ip_table
+typedef ip_table
{
u32 table_id;
u8 is_ip6;
@param n_paths The number of paths the route has
@param paths The paths of the route
*/
-typeonly define ip_route
+typedef ip_route
{
u32 table_id;
u32 stats_index;
@param nh - the next-hop to redirect the traffic to.
@param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
*/
-typeonly define punt_redirect
+typedef punt_redirect
{
u32 rx_sw_if_index;
u32 tx_sw_if_index;
@param valid_time - RA prefix info valid time
@param preferred_time - RA prefix info preferred time
*/
-typeonly define ip6_ra_prefix_info
+typedef ip6_ra_prefix_info
{
vl_api_prefix_t prefix;
u8 flags;
@param low - Low address of the Proxy ARP range
@param hi - High address of the Proxy ARP range
*/
-typeonly define proxy_arp
+typedef proxy_arp
{
u32 table_id;
vl_api_ip4_address_t low;
3 => MAC move (sw_if_index changed)
@param flags - flag bits to provide other info, not yet used
*/
-typeonly define mac_entry
+typedef mac_entry
{
u32 sw_if_index;
u8 mac_addr[6];
@param sw_if_index - sw_if_index in the domain
@param shg - split horizon group for the interface
*/
-typeonly manual_print manual_endian define bridge_domain_sw_if
+typedef bridge_domain_sw_if
{
u32 context;
u32 sw_if_index;
option version = "1.0.0";
-typeonly manual_print manual_endian define local_locator
+typedef local_locator
{
u32 sw_if_index;
u8 priority;
u8 mode;
};
-typeonly manual_endian manual_print define remote_locator
+typedef remote_locator
{
u8 is_ip4;
u8 priority;
@param reid_prefix_len - remote EID IP prefix length
@param leid_prefix_len - local EID IP prefix length
*/
-typeonly manual_print manual_endian define lisp_adjacency
+typedef lisp_adjacency
{
u8 eid_type;
u8 reid[16];
#include <vnet/vnet_msg_enum.h>
-#define vl_api_remote_locator_t_endian vl_noop_handler
-#define vl_api_remote_locator_t_print vl_noop_handler
-#define vl_api_local_locator_t_endian vl_noop_handler
-#define vl_api_local_locator_t_print vl_noop_handler
#define vl_api_lisp_add_del_locator_set_t_endian vl_noop_handler
#define vl_api_lisp_add_del_locator_set_t_print vl_noop_handler
option version = "1.0.0";
-typeonly manual_print manual_endian define one_local_locator
+typedef one_local_locator
{
u32 sw_if_index;
u8 priority;
u8 mode;
};
-typeonly manual_endian manual_print define one_remote_locator
+typedef one_remote_locator
{
u8 is_ip4;
u8 priority;
u32 bd;
};
-typeonly manual_print manual_endian define one_l2_arp_entry
+typedef one_l2_arp_entry
{
u8 mac[6];
u32 ip4;
u32 bd;
};
-typeonly manual_print manual_endian define one_ndp_entry
+typedef one_ndp_entry
{
u8 mac[6];
u8 ip6[16];
@param reid_prefix_len - remote EID IP prefix length
@param leid_prefix_len - local EID IP prefix length
*/
-typeonly manual_print manual_endian define one_adjacency
+typedef one_adjacency
{
u8 eid_type;
u8 reid[16];
#include <vnet/vnet_msg_enum.h>
-#define vl_api_one_remote_locator_t_endian vl_noop_handler
-#define vl_api_one_remote_locator_t_print vl_noop_handler
-#define vl_api_one_local_locator_t_endian vl_noop_handler
-#define vl_api_one_local_locator_t_print vl_noop_handler
-
#define vl_api_one_add_del_locator_set_t_endian vl_noop_handler
#define vl_api_one_add_del_locator_set_t_print vl_noop_handler
#define vl_api_one_add_del_remote_mapping_t_endian vl_noop_handler
#define vl_api_one_add_del_remote_mapping_t_endian vl_noop_handler
#define vl_api_one_add_del_remote_mapping_t_print vl_noop_handler
-#define vl_api_one_l2_arp_entry_t_endian vl_noop_handler
-#define vl_api_one_l2_arp_entry_t_print vl_noop_handler
#define vl_api_one_add_del_l2_arp_entry vl_noop_handler
#define vl_api_one_l2_arp_bd_get vl_noop_handler
-#define vl_api_one_ndp_entry_t_endian vl_noop_handler
-#define vl_api_one_ndp_entry_t_print vl_noop_handler
#define vl_api_one_ndp_entries_get_reply_t_endian vl_noop_handler
#define vl_api_one_ndp_entries_get_reply_t_print vl_noop_handler
@param weight - locator weight
@param addr - IPv4/6 address
*/
-typeonly manual_print manual_endian define gpe_locator
+typedef gpe_locator
{
u8 is_ip4;
u8 weight;
u32 vni;
};
-typeonly manual_print manual_endian define gpe_fwd_entry
+typedef gpe_fwd_entry
{
u32 fwd_entry_index;
u32 dp_table;
@param nh_sw_if_index - next-hop sw_if_index (~0 if not set)
@param nh_addr - next hop address
*/
-typeonly manual_print manual_endian define gpe_native_fwd_rpath
+typedef gpe_native_fwd_rpath
{
u32 fib_index;
u32 nh_sw_if_index;
/** \brief mFIB path
*/
-typeonly define mfib_path
+typedef mfib_path
{
vl_api_mfib_itf_flags_t itf_flags;
vl_api_fib_path_t path;
vl_api_prefix_t mb_prefix;
};
-typeonly define mpls_tunnel
+typedef mpls_tunnel
{
u32 mt_sw_if_index;
u32 mt_tunnel_index;
is not set by the client, then VPP will generate
something meaningfull.
*/
-typeonly define mpls_table
+typedef mpls_table
{
u32 mt_table_id;
u8 mt_name[64];
@param mr_n_paths - The number of paths
@param mr_paths - The paths
*/
-typeonly define mpls_route
+typedef mpls_route
{
u32 mr_table_id;
u32 mr_label;
/** \brief SRv6 SID
*/
-typeonly define srv6_sid
+typedef srv6_sid
{
u8 addr[16];
};
-typeonly define srv6_sid_list
+typedef srv6_sid_list
{
u8 num_sids;
u32 weight;
u8 nh_addr4[4];
};
-typeonly define sr_ip6_address
+typedef sr_ip6_address
{
u8 data[16];
};
@param core - thread pinned to actual physical core.
@param cpu_socket - thread is running on which cpu socket.
*/
-typeonly define thread_data
+typedef thread_data
{
u32 id;
u8 name[64];
* limitations under the License.
*/
-typeonly define version
+typedef version
{
u32 major;
u32 minor;