summaryrefslogtreecommitdiffstats
path: root/binapi_generator/testdata
diff options
context:
space:
mode:
authorRastislav Szabo <raszabo@cisco.com>2017-05-04 11:09:03 +0200
committerRastislav Szabo <raszabo@cisco.com>2017-05-04 11:12:35 +0200
commita101d966133a70b8a76526be25070436d14fcf9f (patch)
tree75e2dbf20de615e58252b780b2ba5baae8fdcf82 /binapi_generator/testdata
parenta968ead74525125dff9ae90b1c9a9102e4327900 (diff)
initial commit
Signed-off-by: Rastislav Szabo <raszabo@cisco.com>
Diffstat (limited to 'binapi_generator/testdata')
-rw-r--r--binapi_generator/testdata/acl.api.json67
-rw-r--r--binapi_generator/testdata/af_packet.api.json37
-rw-r--r--binapi_generator/testdata/input-generate-error.json3
-rw-r--r--binapi_generator/testdata/input-read-json-error.json1
-rw-r--r--binapi_generator/testdata/input.txt0
-rw-r--r--binapi_generator/testdata/ip.api.json292
6 files changed, 400 insertions, 0 deletions
diff --git a/binapi_generator/testdata/acl.api.json b/binapi_generator/testdata/acl.api.json
new file mode 100644
index 0000000..91d3d2f
--- /dev/null
+++ b/binapi_generator/testdata/acl.api.json
@@ -0,0 +1,67 @@
+{
+ "types" : [
+ ["acl_rule",
+ ["u8", "is_permit"],
+ ["u8", "is_ipv6"],
+ ["u8", "src_ip_addr", 16],
+ ["u8", "src_ip_prefix_len"],
+ ["u8", "dst_ip_addr", 16],
+ ["u8", "dst_ip_prefix_len"],
+ ["u8", "proto"],
+ ["u16", "srcport_or_icmptype_first"],
+ ["u16", "srcport_or_icmptype_last"],
+ ["u16", "dstport_or_icmpcode_first"],
+ ["u16", "dstport_or_icmpcode_last"],
+ ["u8", "tcp_flags_mask"],
+ ["u8", "tcp_flags_value"],
+ {"crc" : "0x2715e1c0"}
+ ],
+ ["macip_acl_rule",
+ ["u8", "is_permit"],
+ ["u8", "is_ipv6"],
+ ["u8", "src_mac", 6],
+ ["u8", "src_mac_mask", 6],
+ ["u8", "src_ip_addr", 16],
+ ["u8", "src_ip_prefix_len"],
+ {"crc" : "0x6723f13e"}
+ ]
+ ],
+ "messages" : [
+ ["acl_plugin_get_version",
+ ["u16", "_vl_msg_id"],
+ ["u32", "client_index"],
+ ["u32", "context"],
+ {"crc" : "0xd7c07748"}
+ ],
+ ["acl_plugin_get_version_reply",
+ ["u16", "_vl_msg_id"],
+ ["u32", "context"],
+ ["u32", "major"],
+ ["u32", "minor"],
+ {"crc" : "0x43eb59a5"}
+ ],
+ ["acl_add_replace",
+ ["u16", "_vl_msg_id"],
+ ["u32", "client_index"],
+ ["u32", "context"],
+ ["u32", "acl_index"],
+ ["u8", "tag", 64],
+ {"crc" : "0x3c317936"}
+ ],
+ ["acl_add_replace_reply",
+ ["u16", "_vl_msg_id"],
+ ["u32", "context"],
+ ["u32", "acl_index"],
+ ["i32", "retval"],
+ {"crc" : "0xa5e6d0cf"}
+ ],
+ ["acl_del",
+ ["u16", "_vl_msg_id"],
+ ["u32", "client_index"],
+ ["u32", "context"],
+ ["u32", "acl_index"],
+ {"crc" : "0x82cc30ed"}
+ ]
+ ],
+"vl_api_version" :"0x3cd02d84"
+}
diff --git a/binapi_generator/testdata/af_packet.api.json b/binapi_generator/testdata/af_packet.api.json
new file mode 100644
index 0000000..211fc3e
--- /dev/null
+++ b/binapi_generator/testdata/af_packet.api.json
@@ -0,0 +1,37 @@
+{
+ "types" : [
+
+ ],
+ "messages" : [
+ ["af_packet_create",
+ ["u16", "_vl_msg_id"],
+ ["u32", "client_index"],
+ ["u32", "context"],
+ ["u8", "host_if_name", 64],
+ ["u8", "hw_addr", 6],
+ ["u8", "use_random_hw_addr"],
+ {"crc" : "0x92768640"}
+ ],
+ ["af_packet_create_reply",
+ ["u16", "_vl_msg_id"],
+ ["u32", "context"],
+ ["i32", "retval"],
+ ["u32", "sw_if_index"],
+ {"crc" : "0x718bac92"}
+ ],
+ ["af_packet_delete",
+ ["u16", "_vl_msg_id"],
+ ["u32", "client_index"],
+ ["u32", "context"],
+ ["u8", "host_if_name", 64],
+ {"crc" : "0xc063ce85"}
+ ],
+ ["af_packet_delete_reply",
+ ["u16", "_vl_msg_id"],
+ ["u32", "context"],
+ ["i32", "retval"],
+ {"crc" : "0x1a80431a"}
+ ]
+ ],
+"vl_api_version" :"0x4ca71f33"
+}
diff --git a/binapi_generator/testdata/input-generate-error.json b/binapi_generator/testdata/input-generate-error.json
new file mode 100644
index 0000000..d5df76e
--- /dev/null
+++ b/binapi_generator/testdata/input-generate-error.json
@@ -0,0 +1,3 @@
+{
+ "key": "value"
+} \ No newline at end of file
diff --git a/binapi_generator/testdata/input-read-json-error.json b/binapi_generator/testdata/input-read-json-error.json
new file mode 100644
index 0000000..02691e3
--- /dev/null
+++ b/binapi_generator/testdata/input-read-json-error.json
@@ -0,0 +1 @@
+% \ No newline at end of file
diff --git a/binapi_generator/testdata/input.txt b/binapi_generator/testdata/input.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/binapi_generator/testdata/input.txt
diff --git a/binapi_generator/testdata/ip.api.json b/binapi_generator/testdata/ip.api.json
new file mode 100644
index 0000000..970ec4b
--- /dev/null
+++ b/binapi_generator/testdata/ip.api.json
@@ -0,0 +1,292 @@
+{
+ "types" : [
+ ["fib_path",
+ ["u32", "sw_if_index"],
+ ["u32", "weight"],
+ ["u8", "is_local"],
+ ["u8", "is_drop"],
+ ["u8", "is_unreach"],
+ ["u8", "is_prohibit"],
+ ["u8", "afi"],
+ ["u8", "next_hop", 16],
+ {"crc" : "0x315b1889"}
+ ]
+ ],
+ "messages" : [
+ ["ip_fib_dump",
+ ["u16", "_vl_msg_id"],
+ ["u32", "client_index"],
+ ["u32", "context"],
+ {"crc" : "0x5fe56ca3"}
+ ],
+ ["ip_fib_details",
+ ["u16", "_vl_msg_id"],
+ ["u32", "context"],
+ ["u32", "table_id"],
+ ["u8", "address_length"],
+ ["u8", "address", 4],
+ ["u32", "count"],
+ ["vl_api_fib_path_t", "path", 0, "count"],
+ {"crc" : "0xfd8c6584"}
+ ],
+ ["ip6_fib_dump",
+ ["u16", "_vl_msg_id"],
+ ["u32", "client_index"],
+ ["u32", "context"],
+ {"crc" : "0x25c89676"}
+ ],
+ ["ip6_fib_details",
+ ["u16", "_vl_msg_id"],
+ ["u32", "context"],
+ ["u32", "table_id"],
+ ["u8", "address_length"],
+ ["u8", "address", 16],
+ ["u32", "count"],
+ ["vl_api_fib_path_t", "path", 0, "count"],
+ {"crc" : "0xe0825cb5"}
+ ],
+ ["ip_neighbor_dump",
+ ["u16", "_vl_msg_id"],
+ ["u32", "client_index"],
+ ["u32", "context"],
+ ["u32", "sw_if_index"],
+ ["u8", "is_ipv6"],
+ {"crc" : "0x3289e160"}
+ ],
+ ["ip_neighbor_details",
+ ["u16", "_vl_msg_id"],
+ ["u32", "context"],
+ ["u8", "is_static"],
+ ["u8", "is_ipv6"],
+ ["u8", "mac_address", 6],
+ ["u8", "ip_address", 16],
+ {"crc" : "0x3a00e32a"}
+ ],
+ ["ip_neighbor_add_del",
+ ["u16", "_vl_msg_id"],
+ ["u32", "client_index"],
+ ["u32", "context"],
+ ["u32", "vrf_id"],
+ ["u32", "sw_if_index"],
+ ["u8", "is_add"],
+ ["u8", "is_ipv6"],
+ ["u8", "is_static"],
+ ["u8", "mac_address", 6],
+ ["u8", "dst_address", 16],
+ {"crc" : "0x66f2112c"}
+ ],
+ ["ip_neighbor_add_del_reply",
+ ["u16", "_vl_msg_id"],
+ ["u32", "context"],
+ ["i32", "retval"],
+ {"crc" : "0xe5b0f318"}
+ ],
+ ["set_ip_flow_hash",
+ ["u16", "_vl_msg_id"],
+ ["u32", "client_index"],
+ ["u32", "context"],
+ ["u32", "vrf_id"],
+ ["u8", "is_ipv6"],
+ ["u8", "src"],
+ ["u8", "dst"],
+ ["u8", "sport"],
+ ["u8", "dport"],
+ ["u8", "proto"],
+ ["u8", "reverse"],
+ {"crc" : "0x92ad3798"}
+ ],
+ ["set_ip_flow_hash_reply",
+ ["u16", "_vl_msg_id"],
+ ["u32", "context"],
+ ["i32", "retval"],
+ {"crc" : "0x35a9e5eb"}
+ ],
+ ["sw_interface_ip6nd_ra_config",
+ ["u16", "_vl_msg_id"],
+ ["u32", "client_index"],
+ ["u32", "context"],
+ ["u32", "sw_if_index"],
+ ["u8", "suppress"],
+ ["u8", "managed"],
+ ["u8", "other"],
+ ["u8", "ll_option"],
+ ["u8", "send_unicast"],
+ ["u8", "cease"],
+ ["u8", "is_no"],
+ ["u8", "default_router"],
+ ["u32", "max_interval"],
+ ["u32", "min_interval"],
+ ["u32", "lifetime"],
+ ["u32", "initial_count"],
+ ["u32", "initial_interval"],
+ {"crc" : "0xec4a29f6"}
+ ],
+ ["sw_interface_ip6nd_ra_config_reply",
+ ["u16", "_vl_msg_id"],
+ ["u32", "context"],
+ ["i32", "retval"],
+ {"crc" : "0x16e25c5b"}
+ ],
+ ["sw_interface_ip6nd_ra_prefix",
+ ["u16", "_vl_msg_id"],
+ ["u32", "client_index"],
+ ["u32", "context"],
+ ["u32", "sw_if_index"],
+ ["u8", "address", 16],
+ ["u8", "address_length"],
+ ["u8", "use_default"],
+ ["u8", "no_advertise"],
+ ["u8", "off_link"],
+ ["u8", "no_autoconfig"],
+ ["u8", "no_onlink"],
+ ["u8", "is_no"],
+ ["u32", "val_lifetime"],
+ ["u32", "pref_lifetime"],
+ {"crc" : "0x5db6555c"}
+ ],
+ ["sw_interface_ip6nd_ra_prefix_reply",
+ ["u16", "_vl_msg_id"],
+ ["u32", "context"],
+ ["i32", "retval"],
+ {"crc" : "0x8050adb3"}
+ ],
+ ["sw_interface_ip6_enable_disable",
+ ["u16", "_vl_msg_id"],
+ ["u32", "client_index"],
+ ["u32", "context"],
+ ["u32", "sw_if_index"],
+ ["u8", "enable"],
+ {"crc" : "0x4a4e5405"}
+ ],
+ ["sw_interface_ip6_enable_disable_reply",
+ ["u16", "_vl_msg_id"],
+ ["u32", "context"],
+ ["i32", "retval"],
+ {"crc" : "0xeb8b4a40"}
+ ],
+ ["sw_interface_ip6_set_link_local_address",
+ ["u16", "_vl_msg_id"],
+ ["u32", "client_index"],
+ ["u32", "context"],
+ ["u32", "sw_if_index"],
+ ["u8", "address", 16],
+ {"crc" : "0x3db6d52b"}
+ ],
+ ["sw_interface_ip6_set_link_local_address_reply",
+ ["u16", "_vl_msg_id"],
+ ["u32", "context"],
+ ["i32", "retval"],
+ {"crc" : "0x0a781e17"}
+ ],
+ ["ip_add_del_route",
+ ["u16", "_vl_msg_id"],
+ ["u32", "client_index"],
+ ["u32", "context"],
+ ["u32", "next_hop_sw_if_index"],
+ ["u32", "table_id"],
+ ["u32", "classify_table_index"],
+ ["u32", "next_hop_table_id"],
+ ["u8", "create_vrf_if_needed"],
+ ["u8", "is_add"],
+ ["u8", "is_drop"],
+ ["u8", "is_unreach"],
+ ["u8", "is_prohibit"],
+ ["u8", "is_ipv6"],
+ ["u8", "is_local"],
+ ["u8", "is_classify"],
+ ["u8", "is_multipath"],
+ ["u8", "is_resolve_host"],
+ ["u8", "is_resolve_attached"],
+ ["u8", "not_last"],
+ ["u8", "next_hop_weight"],
+ ["u8", "dst_address_length"],
+ ["u8", "dst_address", 16],
+ ["u8", "next_hop_address", 16],
+ ["u8", "next_hop_n_out_labels"],
+ ["u32", "next_hop_via_label"],
+ ["u32", "next_hop_out_label_stack", 0, "next_hop_n_out_labels"],
+ {"crc" : "0xa0ab24bf"}
+ ],
+ ["ip_add_del_route_reply",
+ ["u16", "_vl_msg_id"],
+ ["u32", "context"],
+ ["i32", "retval"],
+ {"crc" : "0xea57492b"}
+ ],
+ ["ip_mroute_add_del",
+ ["u16", "_vl_msg_id"],
+ ["u32", "client_index"],
+ ["u32", "context"],
+ ["u32", "next_hop_sw_if_index"],
+ ["u32", "table_id"],
+ ["u32", "entry_flags"],
+ ["u32", "itf_flags"],
+ ["u16", "grp_address_length"],
+ ["u8", "create_vrf_if_needed"],
+ ["u8", "is_add"],
+ ["u8", "is_ipv6"],
+ ["u8", "is_local"],
+ ["u8", "grp_address", 16],
+ ["u8", "src_address", 16],
+ {"crc" : "0x8312830f"}
+ ],
+ ["ip_mroute_add_del_reply",
+ ["u16", "_vl_msg_id"],
+ ["u32", "context"],
+ ["i32", "retval"],
+ {"crc" : "0x8cabe02c"}
+ ],
+ ["ip_address_details",
+ ["u16", "_vl_msg_id"],
+ ["u32", "client_index"],
+ ["u32", "context"],
+ ["u8", "ip", 16],
+ ["u8", "prefix_length"],
+ ["u32", "sw_if_index"],
+ ["u8", "is_ipv6"],
+ {"crc" : "0x190d4266"}
+ ],
+ ["ip_address_dump",
+ ["u16", "_vl_msg_id"],
+ ["u32", "client_index"],
+ ["u32", "context"],
+ ["u32", "sw_if_index"],
+ ["u8", "is_ipv6"],
+ {"crc" : "0x632e859a"}
+ ],
+ ["ip_details",
+ ["u16", "_vl_msg_id"],
+ ["u32", "sw_if_index"],
+ ["u32", "context"],
+ ["u8", "is_ipv6"],
+ {"crc" : "0x695c8227"}
+ ],
+ ["ip_dump",
+ ["u16", "_vl_msg_id"],
+ ["u32", "client_index"],
+ ["u32", "context"],
+ ["u8", "is_ipv6"],
+ {"crc" : "0x3c1e33e0"}
+ ],
+ ["mfib_signal_dump",
+ ["u16", "_vl_msg_id"],
+ ["u32", "client_index"],
+ ["u32", "context"],
+ {"crc" : "0xbbbbd40d"}
+ ],
+ ["mfib_signal_details",
+ ["u16", "_vl_msg_id"],
+ ["u32", "client_index"],
+ ["u32", "context"],
+ ["u32", "sw_if_index"],
+ ["u32", "table_id"],
+ ["u16", "grp_address_len"],
+ ["u8", "grp_address", 16],
+ ["u8", "src_address", 16],
+ ["u16", "ip_packet_len"],
+ ["u8", "ip_packet_data", 256],
+ {"crc" : "0x6ba92c72"}
+ ]
+ ],
+"vl_api_version" :"0x6a819870"
+}