From 868b541e296dc47748ad03b8f0174c828d996529 Mon Sep 17 00:00:00 2001 From: Ondrej Fabry Date: Thu, 13 Dec 2018 10:21:49 +0100 Subject: Add support for aliases and boolean type - aliases are now generated as new types or arrays (if length > 0) - bool is recognized as a boolean type and generated as Go bool - comment with original JSON is now prepended for each object type - interface Services is now generated at the top of the file to provide overview of what RPC services does the current module consists of - dump services now correctly return slice of the particular details type Change-Id: I788babc1c0f2de33e0febd87e5b200d54065b244 Signed-off-by: Ondrej Fabry --- examples/bin_api/map.api.json | 940 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 940 insertions(+) create mode 100644 examples/bin_api/map.api.json (limited to 'examples/bin_api/map.api.json') diff --git a/examples/bin_api/map.api.json b/examples/bin_api/map.api.json new file mode 100644 index 0000000..cb98202 --- /dev/null +++ b/examples/bin_api/map.api.json @@ -0,0 +1,940 @@ +{ + "messages": [ + [ + "map_add_domain", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + [ + "vl_api_ip6_prefix_t", + "ip6_prefix" + ], + [ + "vl_api_ip4_prefix_t", + "ip4_prefix" + ], + [ + "vl_api_ip6_prefix_t", + "ip6_src" + ], + [ + "u8", + "ea_bits_len" + ], + [ + "u8", + "psid_offset" + ], + [ + "u8", + "psid_length" + ], + [ + "bool", + "is_translation" + ], + [ + "bool", + "is_rfc6052" + ], + [ + "u16", + "mtu" + ], + { + "crc": "0x7a64714e" + } + ], + [ + "map_add_domain_reply", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "u32", + "index" + ], + [ + "i32", + "retval" + ], + { + "crc": "0x3e6d4e2c" + } + ], + [ + "map_del_domain", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + [ + "u32", + "index" + ], + { + "crc": "0x8ac76db6" + } + ], + [ + "map_del_domain_reply", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "i32", + "retval" + ], + { + "crc": "0xe8d4e804" + } + ], + [ + "map_add_del_rule", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + [ + "u32", + "index" + ], + [ + "bool", + "is_add" + ], + [ + "vl_api_ip6_address_t", + "ip6_dst" + ], + [ + "u16", + "psid" + ], + { + "crc": "0xe6132040" + } + ], + [ + "map_add_del_rule_reply", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "i32", + "retval" + ], + { + "crc": "0xe8d4e804" + } + ], + [ + "map_domain_dump", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + { + "crc": "0x51077d14" + } + ], + [ + "map_domain_details", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "u32", + "domain_index" + ], + [ + "vl_api_ip6_prefix_t", + "ip6_prefix" + ], + [ + "vl_api_ip4_prefix_t", + "ip4_prefix" + ], + [ + "vl_api_ip6_prefix_t", + "ip6_src" + ], + [ + "u8", + "ea_bits_len" + ], + [ + "u8", + "psid_offset" + ], + [ + "u8", + "psid_length" + ], + [ + "u8", + "flags" + ], + [ + "u16", + "mtu" + ], + [ + "bool", + "is_translation" + ], + { + "crc": "0x7a986fe6" + } + ], + [ + "map_rule_dump", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + [ + "u32", + "domain_index" + ], + { + "crc": "0xe43e6ff6" + } + ], + [ + "map_rule_details", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "vl_api_ip6_address_t", + "ip6_dst" + ], + [ + "u16", + "psid" + ], + { + "crc": "0x4f932665" + } + ], + [ + "map_summary_stats", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + { + "crc": "0x51077d14" + } + ], + [ + "map_summary_stats_reply", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "i32", + "retval" + ], + [ + "u64", + "total_bindings" + ], + [ + "u64", + "total_pkts", + 2 + ], + [ + "u64", + "total_bytes", + 2 + ], + [ + "u64", + "total_ip4_fragments" + ], + [ + "u64", + "total_security_check", + 2 + ], + { + "crc": "0x0e4ace0e" + } + ], + [ + "map_param_set_fragmentation", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + [ + "bool", + "inner" + ], + [ + "bool", + "ignore_df" + ], + { + "crc": "0x9ff54d90" + } + ], + [ + "map_param_set_fragmentation_reply", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "i32", + "retval" + ], + { + "crc": "0xe8d4e804" + } + ], + [ + "map_param_set_icmp", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + [ + "vl_api_ip4_address_t", + "ip4_err_relay_src" + ], + { + "crc": "0x4c0a4fd2" + } + ], + [ + "map_param_set_icmp_reply", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "i32", + "retval" + ], + { + "crc": "0xe8d4e804" + } + ], + [ + "map_param_set_icmp6", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + [ + "bool", + "enable_unreachable" + ], + { + "crc": "0x5d01f8c1" + } + ], + [ + "map_param_set_icmp6_reply", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "i32", + "retval" + ], + { + "crc": "0xe8d4e804" + } + ], + [ + "map_param_add_del_pre_resolve", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + [ + "bool", + "is_add" + ], + [ + "vl_api_ip4_address_t", + "ip4_nh_address" + ], + [ + "vl_api_ip6_address_t", + "ip6_nh_address" + ], + { + "crc": "0xea9a9a4a" + } + ], + [ + "map_param_add_del_pre_resolve_reply", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "i32", + "retval" + ], + { + "crc": "0xe8d4e804" + } + ], + [ + "map_param_set_reassembly", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + [ + "bool", + "is_ip6" + ], + [ + "u16", + "lifetime_ms" + ], + [ + "u16", + "pool_size" + ], + [ + "u32", + "buffers" + ], + [ + "f64", + "ht_ratio" + ], + { + "crc": "0x54172b10" + } + ], + [ + "map_param_set_reassembly_reply", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "i32", + "retval" + ], + { + "crc": "0xe8d4e804" + } + ], + [ + "map_param_set_security_check", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + [ + "bool", + "enable" + ], + [ + "bool", + "fragments" + ], + { + "crc": "0x6abe9836" + } + ], + [ + "map_param_set_security_check_reply", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "i32", + "retval" + ], + { + "crc": "0xe8d4e804" + } + ], + [ + "map_param_set_traffic_class", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + [ + "bool", + "copy" + ], + [ + "u8", + "class" + ], + { + "crc": "0x007ee563" + } + ], + [ + "map_param_set_traffic_class_reply", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "i32", + "retval" + ], + { + "crc": "0xe8d4e804" + } + ], + [ + "map_param_get", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + { + "crc": "0x51077d14" + } + ], + [ + "map_param_get_reply", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "i32", + "retval" + ], + [ + "u8", + "frag_inner" + ], + [ + "u8", + "frag_ignore_df" + ], + [ + "vl_api_ip4_address_t", + "icmp_ip4_err_relay_src" + ], + [ + "bool", + "icmp6_enable_unreachable" + ], + [ + "vl_api_ip4_address_t", + "ip4_nh_address" + ], + [ + "vl_api_ip6_address_t", + "ip6_nh_address" + ], + [ + "u16", + "ip4_lifetime_ms" + ], + [ + "u16", + "ip4_pool_size" + ], + [ + "u32", + "ip4_buffers" + ], + [ + "f64", + "ip4_ht_ratio" + ], + [ + "u16", + "ip6_lifetime_ms" + ], + [ + "u16", + "ip6_pool_size" + ], + [ + "u32", + "ip6_buffers" + ], + [ + "f64", + "ip6_ht_ratio" + ], + [ + "bool", + "sec_check_enable" + ], + [ + "bool", + "sec_check_fragments" + ], + [ + "bool", + "tc_copy" + ], + [ + "u8", + "tc_class" + ], + { + "crc": "0xb40e9226" + } + ] + ], + "vl_api_version": "0x14b499d0", + "unions": [ + [ + "address_union", + [ + "vl_api_ip4_address_t", + "ip4" + ], + [ + "vl_api_ip6_address_t", + "ip6" + ], + { + "crc": "0xd68a2fb4" + } + ] + ], + "services": { + "map_param_set_fragmentation": { + "reply": "map_param_set_fragmentation_reply" + }, + "map_param_add_del_pre_resolve": { + "reply": "map_param_add_del_pre_resolve_reply" + }, + "map_rule_dump": { + "reply": "map_rule_details", + "stream": true + }, + "map_param_set_icmp6": { + "reply": "map_param_set_icmp6_reply" + }, + "map_add_del_rule": { + "reply": "map_add_del_rule_reply" + }, + "map_domain_dump": { + "reply": "map_domain_details", + "stream": true + }, + "map_param_get": { + "reply": "map_param_get_reply" + }, + "map_param_set_icmp": { + "reply": "map_param_set_icmp_reply" + }, + "map_add_domain": { + "reply": "map_add_domain_reply" + }, + "map_summary_stats": { + "reply": "map_summary_stats_reply" + }, + "map_param_set_traffic_class": { + "reply": "map_param_set_traffic_class_reply" + }, + "map_del_domain": { + "reply": "map_del_domain_reply" + }, + "map_param_set_reassembly": { + "reply": "map_param_set_reassembly_reply" + }, + "map_param_set_security_check": { + "reply": "map_param_set_security_check_reply" + } + }, + "enums": [ + [ + "address_family", + [ + "ADDRESS_IP4", + 0 + ], + [ + "ADDRESS_IP6", + 1 + ], + { + "enumtype": "u32" + } + ] + ], + "types": [ + [ + "address", + [ + "vl_api_address_family_t", + "af" + ], + [ + "vl_api_address_union_t", + "un" + ], + { + "crc": "0x09f11671" + } + ], + [ + "prefix", + [ + "vl_api_address_t", + "address" + ], + [ + "u8", + "address_length" + ], + { + "crc": "0x0403aebc" + } + ], + [ + "mprefix", + [ + "vl_api_address_family_t", + "af" + ], + [ + "u16", + "grp_address_length" + ], + [ + "vl_api_address_union_t", + "grp_address" + ], + [ + "vl_api_address_union_t", + "src_address" + ], + { + "crc": "0x1c4cba05" + } + ], + [ + "ip6_prefix", + [ + "vl_api_ip6_address_t", + "prefix" + ], + [ + "u8", + "len" + ], + { + "crc": "0x779fd64f" + } + ], + [ + "ip4_prefix", + [ + "vl_api_ip4_address_t", + "prefix" + ], + [ + "u8", + "len" + ], + { + "crc": "0xea8dc11d" + } + ] + ], + "aliases": { + "ip6_address": { + "length": 16, + "type": "u8" + }, + "ip4_address": { + "length": 4, + "type": "u8" + } + } +} -- cgit 1.2.3-korg