summaryrefslogtreecommitdiffstats
path: root/cmd/binapi-generator
diff options
context:
space:
mode:
authorMilan Lenco <milan.lenco@pantheon.tech>2018-01-25 10:15:48 +0100
committerMilan Lenco <milan.lenco@pantheon.tech>2018-01-25 10:15:48 +0100
commit8ca20507d15703412c18b07d4f4ce6b4de989de6 (patch)
treeaef60a5ef4dd150b62958b757e706f8c3311c68c /cmd/binapi-generator
parent545eaea1c41c800794bb910a47de281e7e8df492 (diff)
Update examples, tests and testdata after binapi-generator update.
Change-Id: I738d501cbbb6673010a32847df3f1c87050b8d36 Signed-off-by: Milan Lenco <milan.lenco@pantheon.tech>
Diffstat (limited to 'cmd/binapi-generator')
-rw-r--r--cmd/binapi-generator/generator_test.go15
-rw-r--r--cmd/binapi-generator/testdata/acl.api.json986
-rw-r--r--cmd/binapi-generator/testdata/af_packet.api.json184
-rw-r--r--cmd/binapi-generator/testdata/ip.api.json2528
4 files changed, 3330 insertions, 383 deletions
diff --git a/cmd/binapi-generator/generator_test.go b/cmd/binapi-generator/generator_test.go
index a42e794..1fcbb66 100644
--- a/cmd/binapi-generator/generator_test.go
+++ b/cmd/binapi-generator/generator_test.go
@@ -120,7 +120,7 @@ func TestReadJson(t *testing.T) {
result, err := parseJSON(inputData)
Expect(err).ShouldNot(HaveOccurred())
Expect(result).ToNot(BeNil())
- Expect(result.Len()).To(BeEquivalentTo(3))
+ Expect(result.Len()).To(BeEquivalentTo(5))
}
func TestReadJsonError(t *testing.T) {
@@ -255,8 +255,9 @@ func TestGenerateMessageFieldTypes(t *testing.T) {
func TestGenerateMessageFieldMessages(t *testing.T) {
// expected results according to acl.api.json in testdata
- expectedTypes := []string{"\tMajor uint32", "\tMinor uint32", "\tACLIndex uint32",
- "\tTag []byte `struc:\"[64]byte\"`", "\tACLIndex uint32", "\tRetval int32", "\tACLIndex uint32"}
+ expectedFields := []string{"\tMajor uint32", "\tMinor uint32", "\tRetval int32",
+ "\tVpePid uint32", "\tACLIndex uint32", "\tTag []byte `struc:\"[64]byte\"`",
+ "\tCount uint32"}
RegisterTestingT(t)
// prepare context
testCtx := new(context)
@@ -269,7 +270,7 @@ func TestGenerateMessageFieldMessages(t *testing.T) {
Expect(err).ShouldNot(HaveOccurred())
Expect(inFile).ToNot(BeNil())
- // test types
+ // test message fields
messages := inFile.Map("messages")
customIndex := 0
fields := make([]string, 0)
@@ -284,8 +285,12 @@ func TestGenerateMessageFieldMessages(t *testing.T) {
}
err := processMessageField(testCtx, &fields, field, false)
Expect(err).ShouldNot(HaveOccurred())
- Expect(fields[customIndex]).To(BeEquivalentTo(expectedTypes[customIndex]))
+ Expect(fields[customIndex]).To(BeEquivalentTo(expectedFields[customIndex]))
customIndex++
+ if customIndex >= len(expectedFields) {
+ /* there is too much fields now for one UT... */
+ return
+ }
}
}
}
diff --git a/cmd/binapi-generator/testdata/acl.api.json b/cmd/binapi-generator/testdata/acl.api.json
index 91d3d2f..4c6653c 100644
--- a/cmd/binapi-generator/testdata/acl.api.json
+++ b/cmd/binapi-generator/testdata/acl.api.json
@@ -1,67 +1,929 @@
{
- "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"}
- ]
+ "services": [
+ {
+ "acl_interface_add_del": {
+ "reply": "acl_interface_add_del_reply"
+ }
+ },
+ {
+ "acl_del": {
+ "reply": "acl_del_reply"
+ }
+ },
+ {
+ "macip_acl_del": {
+ "reply": "macip_acl_del_reply"
+ }
+ },
+ {
+ "acl_plugin_get_version": {
+ "reply": "acl_plugin_get_version_reply"
+ }
+ },
+ {
+ "macip_acl_interface_add_del": {
+ "reply": "macip_acl_interface_add_del_reply"
+ }
+ },
+ {
+ "acl_interface_set_acl_list": {
+ "reply": "acl_interface_set_acl_list_reply"
+ }
+ },
+ {
+ "acl_dump": {
+ "reply": "acl_details",
+ "stream": true
+ }
+ },
+ {
+ "acl_interface_list_dump": {
+ "reply": "acl_interface_list_details",
+ "stream": true
+ }
+ },
+ {
+ "macip_acl_interface_list_dump": {
+ "reply": "macip_acl_interface_list_details",
+ "stream": true
+ }
+ },
+ {
+ "acl_add_replace": {
+ "reply": "acl_add_replace_reply"
+ }
+ },
+ {
+ "acl_plugin_control_ping": {
+ "reply": "acl_plugin_control_ping_reply"
+ }
+ },
+ {
+ "macip_acl_interface_get": {
+ "reply": "macip_acl_interface_get_reply"
+ }
+ },
+ {
+ "macip_acl_add": {
+ "reply": "macip_acl_add_reply"
+ }
+ },
+ {
+ "macip_acl_add_replace": {
+ "reply": "macip_acl_add_replace_reply"
+ }
+ },
+ {
+ "macip_acl_dump": {
+ "reply": "macip_acl_details",
+ "stream": true
+ }
+ }
],
- "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": "0x1db2ece9",
+ "enums": [],
+ "messages": [
+ [
+ "acl_plugin_get_version",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ {
+ "crc": "0x51077d14"
+ }
+ ],
+ [
+ "acl_plugin_get_version_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "major"
+ ],
+ [
+ "u32",
+ "minor"
+ ],
+ {
+ "crc": "0x9b32cf86"
+ }
+ ],
+ [
+ "acl_plugin_control_ping",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ {
+ "crc": "0x51077d14"
+ }
+ ],
+ [
+ "acl_plugin_control_ping_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "i32",
+ "retval"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "vpe_pid"
+ ],
+ {
+ "crc": "0xf6b0b8ca"
+ }
+ ],
+ [
+ "acl_add_replace",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "acl_index"
+ ],
+ [
+ "u8",
+ "tag",
+ 64
+ ],
+ [
+ "u32",
+ "count"
+ ],
+ [
+ "vl_api_acl_rule_t",
+ "r",
+ 0,
+ "count"
+ ],
+ {
+ "crc": "0xe839997e"
+ }
+ ],
+ [
+ "acl_add_replace_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "acl_index"
+ ],
+ [
+ "i32",
+ "retval"
+ ],
+ {
+ "crc": "0xac407b0c"
+ }
+ ],
+ [
+ "acl_del",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "acl_index"
+ ],
+ {
+ "crc": "0xef34fea4"
+ }
+ ],
+ [
+ "acl_del_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "i32",
+ "retval"
+ ],
+ {
+ "crc": "0xe8d4e804"
+ }
+ ],
+ [
+ "acl_interface_add_del",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u8",
+ "is_add"
+ ],
+ [
+ "u8",
+ "is_input"
+ ],
+ [
+ "u32",
+ "sw_if_index"
+ ],
+ [
+ "u32",
+ "acl_index"
+ ],
+ {
+ "crc": "0x0b2aedd1"
+ }
+ ],
+ [
+ "acl_interface_add_del_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "i32",
+ "retval"
+ ],
+ {
+ "crc": "0xe8d4e804"
+ }
+ ],
+ [
+ "acl_interface_set_acl_list",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "sw_if_index"
+ ],
+ [
+ "u8",
+ "count"
+ ],
+ [
+ "u8",
+ "n_input"
+ ],
+ [
+ "u32",
+ "acls",
+ 0,
+ "count"
+ ],
+ {
+ "crc": "0x8baece38"
+ }
+ ],
+ [
+ "acl_interface_set_acl_list_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "i32",
+ "retval"
+ ],
+ {
+ "crc": "0xe8d4e804"
+ }
+ ],
+ [
+ "acl_dump",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "acl_index"
+ ],
+ {
+ "crc": "0xef34fea4"
+ }
+ ],
+ [
+ "acl_details",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "acl_index"
+ ],
+ [
+ "u8",
+ "tag",
+ 64
+ ],
+ [
+ "u32",
+ "count"
+ ],
+ [
+ "vl_api_acl_rule_t",
+ "r",
+ 0,
+ "count"
+ ],
+ {
+ "crc": "0x5bd895be"
+ }
+ ],
+ [
+ "acl_interface_list_dump",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "sw_if_index"
+ ],
+ {
+ "crc": "0x529cb13f"
+ }
+ ],
+ [
+ "acl_interface_list_details",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "sw_if_index"
+ ],
+ [
+ "u8",
+ "count"
+ ],
+ [
+ "u8",
+ "n_input"
+ ],
+ [
+ "u32",
+ "acls",
+ 0,
+ "count"
+ ],
+ {
+ "crc": "0xd5e80809"
+ }
+ ],
+ [
+ "macip_acl_add",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u8",
+ "tag",
+ 64
+ ],
+ [
+ "u32",
+ "count"
+ ],
+ [
+ "vl_api_macip_acl_rule_t",
+ "r",
+ 0,
+ "count"
+ ],
+ {
+ "crc": "0xb3d3d65a"
+ }
+ ],
+ [
+ "macip_acl_add_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "acl_index"
+ ],
+ [
+ "i32",
+ "retval"
+ ],
+ {
+ "crc": "0xac407b0c"
+ }
+ ],
+ [
+ "macip_acl_add_replace",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "acl_index"
+ ],
+ [
+ "u8",
+ "tag",
+ 64
+ ],
+ [
+ "u32",
+ "count"
+ ],
+ [
+ "vl_api_macip_acl_rule_t",
+ "r",
+ 0,
+ "count"
+ ],
+ {
+ "crc": "0xa0e8c01b"
+ }
+ ],
+ [
+ "macip_acl_add_replace_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "acl_index"
+ ],
+ [
+ "i32",
+ "retval"
+ ],
+ {
+ "crc": "0xac407b0c"
+ }
+ ],
+ [
+ "macip_acl_del",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "acl_index"
+ ],
+ {
+ "crc": "0xef34fea4"
+ }
+ ],
+ [
+ "macip_acl_del_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "i32",
+ "retval"
+ ],
+ {
+ "crc": "0xe8d4e804"
+ }
+ ],
+ [
+ "macip_acl_interface_add_del",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u8",
+ "is_add"
+ ],
+ [
+ "u32",
+ "sw_if_index"
+ ],
+ [
+ "u32",
+ "acl_index"
+ ],
+ {
+ "crc": "0x6a6be97c"
+ }
+ ],
+ [
+ "macip_acl_interface_add_del_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "i32",
+ "retval"
+ ],
+ {
+ "crc": "0xe8d4e804"
+ }
+ ],
+ [
+ "macip_acl_dump",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "acl_index"
+ ],
+ {
+ "crc": "0xef34fea4"
+ }
+ ],
+ [
+ "macip_acl_details",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "acl_index"
+ ],
+ [
+ "u8",
+ "tag",
+ 64
+ ],
+ [
+ "u32",
+ "count"
+ ],
+ [
+ "vl_api_macip_acl_rule_t",
+ "r",
+ 0,
+ "count"
+ ],
+ {
+ "crc": "0xdd2b55ba"
+ }
+ ],
+ [
+ "macip_acl_interface_get",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ {
+ "crc": "0x51077d14"
+ }
+ ],
+ [
+ "macip_acl_interface_get_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "count"
+ ],
+ [
+ "u32",
+ "acls",
+ 0,
+ "count"
+ ],
+ {
+ "crc": "0xaccf9b05"
+ }
+ ],
+ [
+ "macip_acl_interface_list_dump",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "sw_if_index"
+ ],
+ {
+ "crc": "0x529cb13f"
+ }
+ ],
+ [
+ "macip_acl_interface_list_details",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "sw_if_index"
+ ],
+ [
+ "u8",
+ "count"
+ ],
+ [
+ "u32",
+ "acls",
+ 0,
+ "count"
+ ],
+ {
+ "crc": "0x29783fa0"
+ }
]
],
-"vl_api_version" :"0x3cd02d84"
+ "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": "0x6f99bf4d"
+ }
+ ],
+ [
+ "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": "0x70589f1e"
+ }
+ ]
+ ]
}
diff --git a/cmd/binapi-generator/testdata/af_packet.api.json b/cmd/binapi-generator/testdata/af_packet.api.json
index 211fc3e..81ee2f9 100644
--- a/cmd/binapi-generator/testdata/af_packet.api.json
+++ b/cmd/binapi-generator/testdata/af_packet.api.json
@@ -1,37 +1,163 @@
{
- "types" : [
-
+ "services": [
+ {
+ "af_packet_delete": {
+ "reply": "af_packet_delete_reply"
+ }
+ },
+ {
+ "af_packet_create": {
+ "reply": "af_packet_create_reply"
+ }
+ },
+ {
+ "af_packet_set_l4_cksum_offload": {
+ "reply": "af_packet_set_l4_cksum_offload_reply"
+ }
+ }
],
- "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"}
+ "vl_api_version": "0x8957ca8b",
+ "enums": [],
+ "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": "0x6d5d30d6"
+ }
],
- ["af_packet_create_reply",
- ["u16", "_vl_msg_id"],
- ["u32", "context"],
- ["i32", "retval"],
- ["u32", "sw_if_index"],
- {"crc" : "0x718bac92"}
+ [
+ "af_packet_create_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "i32",
+ "retval"
+ ],
+ [
+ "u32",
+ "sw_if_index"
+ ],
+ {
+ "crc": "0xfda5941f"
+ }
],
- ["af_packet_delete",
- ["u16", "_vl_msg_id"],
- ["u32", "client_index"],
- ["u32", "context"],
- ["u8", "host_if_name", 64],
- {"crc" : "0xc063ce85"}
+ [
+ "af_packet_delete",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u8",
+ "host_if_name",
+ 64
+ ],
+ {
+ "crc": "0x3efceda3"
+ }
],
- ["af_packet_delete_reply",
- ["u16", "_vl_msg_id"],
- ["u32", "context"],
- ["i32", "retval"],
- {"crc" : "0x1a80431a"}
+ [
+ "af_packet_delete_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "i32",
+ "retval"
+ ],
+ {
+ "crc": "0xe8d4e804"
+ }
+ ],
+ [
+ "af_packet_set_l4_cksum_offload",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u8",
+ "sw_if_index"
+ ],
+ [
+ "u8",
+ "set"
+ ],
+ {
+ "crc": "0x86538585"
+ }
+ ],
+ [
+ "af_packet_set_l4_cksum_offload_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "i32",
+ "retval"
+ ],
+ {
+ "crc": "0xe8d4e804"
+ }
]
],
-"vl_api_version" :"0x4ca71f33"
+ "types": []
}
diff --git a/cmd/binapi-generator/testdata/ip.api.json b/cmd/binapi-generator/testdata/ip.api.json
index 970ec4b..530b6d6 100644
--- a/cmd/binapi-generator/testdata/ip.api.json
+++ b/cmd/binapi-generator/testdata/ip.api.json
@@ -1,292 +1,2246 @@
{
- "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"}
- ]
+ "services": [
+ {
+ "ip_source_and_port_range_check_add_del": {
+ "reply": "ip_source_and_port_range_check_add_del_reply"
+ }
+ },
+ {
+ "ip6_fib_dump": {
+ "reply": "ip6_fib_details",
+ "stream": true
+ }
+ },
+ {
+ "want_ip6_nd_events": {
+ "reply": "want_ip6_nd_events_reply"
+ }
+ },
+ {
+ "ip_punt_police": {
+ "reply": "ip_punt_police_reply"
+ }
+ },
+ {
+ "set_arp_neighbor_limit": {
+ "reply": "set_arp_neighbor_limit_reply"
+ }
+ },
+ {
+ "ip6nd_proxy_add_del": {
+ "reply": "ip6nd_proxy_add_del_reply"
+ }
+ },
+ {
+ "ioam_disable": {
+ "reply": "ioam_disable_reply"
+ }
+ },
+ {
+ "ip_table_add_del": {
+ "reply": "ip_table_add_del_reply"
+ }
+ },
+ {
+ "ip_neighbor_dump": {
+ "reply": "ip_neighbor_details",
+ "stream": true
+ }
+ },
+ {
+ "ip4_arp_event": {
+ "reply": null
+ }
+ },
+ {
+ "ip_punt_redirect": {
+ "reply": "ip_punt_redirect_reply"
+ }
+ },
+ {
+ "sw_interface_ip6nd_ra_prefix": {
+ "reply": "sw_interface_ip6nd_ra_prefix_reply"
+ }
+ },
+ {
+ "reset_fib": {
+ "reply": "reset_fib_reply"
+ }
+ },
+ {
+ "ip6_mfib_dump": {
+ "reply": "ip6_mfib_details",
+ "stream": true
+ }
+ },
+ {
+ "sw_interface_ip6nd_ra_config": {
+ "reply": "sw_interface_ip6nd_ra_config_reply"
+ }
+ },
+ {
+ "sw_interface_ip6_enable_disable": {
+ "reply": "sw_interface_ip6_enable_disable_reply"
+ }
+ },
+ {
+ "sw_interface_ip6_set_link_local_address": {
+ "reply": "sw_interface_ip6_set_link_local_address_reply"
+ }
+ },
+ {
+ "mfib_signal_dump": {
+ "reply": "mfib_signal_details",
+ "stream": true
+ }
+ },
+ {
+ "ip_container_proxy_add_del": {
+ "reply": "ip_container_proxy_add_del_reply"
+ }
+ },
+ {
+ "ip_mfib_dump": {
+ "reply": "ip_mfib_details",
+ "stream": true
+ }
+ },
+ {
+ "ip_address_dump": {
+ "reply": "ip_address_details",
+ "stream": true
+ }
+ },
+ {
+ "ip_dump": {
+ "reply": "ip_details",
+ "stream": true
+ }
+ },
+ {
+ "ip_neighbor_add_del": {
+ "reply": "ip_neighbor_add_del_reply"
+ }
+ },
+ {
+ "proxy_arp_intfc_enable_disable": {
+ "reply": "proxy_arp_intfc_enable_disable_reply"
+ }
+ },
+ {
+ "proxy_arp_add_del": {
+ "reply": "proxy_arp_add_del_reply"
+ }
+ },
+ {
+ "ip_add_del_route": {
+ "reply": "ip_add_del_route_reply"
+ }
+ },
+ {
+ "ip6nd_proxy_dump": {
+ "reply": "ip6nd_proxy_details",
+ "stream": true
+ }
+ },
+ {
+ "ip_fib_dump": {
+ "reply": "ip_fib_details",
+ "stream": true
+ }
+ },
+ {
+ "want_ip4_arp_events": {
+ "reply": "want_ip4_arp_events_reply"
+ }
+ },
+ {
+ "ioam_enable": {
+ "reply": "ioam_enable_reply"
+ }
+ },
+ {
+ "ip6_nd_event": {
+ "reply": null
+ }
+ },
+ {
+ "ip_mroute_add_del": {
+ "reply": "ip_mroute_add_del_reply"
+ }
+ },
+ {
+ "ip_source_and_port_range_check_interface_add_del": {
+ "reply": "ip_source_and_port_range_check_interface_add_del_reply"
+ }
+ },
+ {
+ "set_ip_flow_hash": {
+ "reply": "set_ip_flow_hash_reply"
+ }
+ }
],
- "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": "0xb395c625",
+ "enums": [],
+ "messages": [
+ [
+ "ip_table_add_del",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "table_id"
+ ],
+ [
+ "u8",
+ "is_ipv6"
+ ],
+ [
+ "u8",
+ "is_add"
+ ],
+ [
+ "u8",
+ "name",
+ 64
+ ],
+ {
+ "crc": "0x0240c89d"
+ }
+ ],
+ [
+ "ip_table_add_del_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "i32",
+ "retval"
+ ],
+ {
+ "crc": "0xe8d4e804"
+ }
+ ],
+ [
+ "ip_fib_dump",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ {
+ "crc": "0x51077d14"
+ }
+ ],
+ [
+ "ip_fib_details",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "table_id"
+ ],
+ [
+ "u8",
+ "table_name",
+ 64
+ ],
+ [
+ "u8",
+ "address_length"
+ ],
+ [
+ "u8",
+ "address",
+ 4
+ ],
+ [
+ "u32",
+ "count"
+ ],
+ [
+ "vl_api_fib_path_t",
+ "path",
+ 0,
+ "count"
+ ],
+ {
+ "crc": "0x99dfd73b"
+ }
+ ],
+ [
+ "ip6_fib_dump",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ {
+ "crc": "0x51077d14"
+ }
+ ],
+ [
+ "ip6_fib_details",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "table_id"
+ ],
+ [
+ "u8",
+ "table_name",
+ 64
+ ],
+ [
+ "u8",
+ "address_length"
+ ],
+ [
+ "u8",
+ "address",
+ 16
+ ],
+ [
+ "u32",
+ "count"
+ ],
+ [
+ "vl_api_fib_path_t",
+ "path",
+ 0,
+ "count"
+ ],
+ {
+ "crc": "0xabd0060e"
+ }
+ ],
+ [
+ "ip_neighbor_dump",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "sw_if_index"
+ ],
+ [
+ "u8",
+ "is_ipv6"
+ ],
+ {
+ "crc": "0x6b7bcd0a"
+ }
+ ],
+ [
+ "ip_neighbor_details",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "sw_if_index"
+ ],
+ [
+ "u8",
+ "is_static"
+ ],
+ [
+ "u8",
+ "is_ipv6"
+ ],
+ [
+ "u8",
+ "mac_address",
+ 6
+ ],
+ [
+ "u8",
+ "ip_address",
+ 16
+ ],
+ {
+ "crc": "0x85e32a72"
+ }
+ ],
+ [
+ "ip_neighbor_add_del",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "sw_if_index"
+ ],
+ [
+ "u8",
+ "is_add"
+ ],
+ [
+ "u8",
+ "is_ipv6"
+ ],
+ [
+ "u8",
+ "is_static"
+ ],
+ [
+ "u8",
+ "is_no_adj_fib"
+ ],
+ [
+ "u8",
+ "mac_address",
+ 6
+ ],
+ [
+ "u8",
+ "dst_address",
+ 16
+ ],
+ {
+ "crc": "0x4711eb25"
+ }
+ ],
+ [
+ "ip_neighbor_add_del_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "i32",
+ "retval"
+ ],
+ {
+ "crc": "0xe8d4e804"
+ }
+ ],
+ [
+ "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": "0x32ebf737"
+ }
+ ],
+ [
+ "set_ip_flow_hash_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "i32",
+ "retval"
+ ],
+ {
+ "crc": "0xe8d4e804"
+ }
+ ],
+ [
+ "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": "0xc3f02daa"
+ }
+ ],
+ [
+ "sw_interface_ip6nd_ra_config_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "i32",
+ "retval"
+ ],
+ {
+ "crc": "0xe8d4e804"
+ }
+ ],
+ [
+ "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": "0xca763c9a"
+ }
+ ],
+ [
+ "sw_interface_ip6nd_ra_prefix_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "i32",
+ "retval"
+ ],
+ {
+ "crc": "0xe8d4e804"
+ }
+ ],
+ [
+ "ip6nd_proxy_add_del",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "sw_if_index"
+ ],
+ [
+ "u8",
+ "is_del"
+ ],
+ [
+ "u8",
+ "address",
+ 16
+ ],
+ {
+ "crc": "0xd95f0fa0"
+ }
+ ],
+ [
+ "ip6nd_proxy_add_del_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "i32",
+ "retval"
+ ],
+ {
+ "crc": "0xe8d4e804"
+ }
+ ],
+ [
+ "ip6nd_proxy_details",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "sw_if_index"
+ ],
+ [
+ "u8",
+ "address",
+ 16
+ ],
+ {
+ "crc": "0xd73bf1ab"
+ }
+ ],
+ [
+ "ip6nd_proxy_dump",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ {
+ "crc": "0x51077d14"
+ }
+ ],
+ [
+ "sw_interface_ip6_enable_disable",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "sw_if_index"
+ ],
+ [
+ "u8",
+ "enable"
+ ],
+ {
+ "crc": "0xa36fadc0"
+ }
+ ],
+ [
+ "sw_interface_ip6_enable_disable_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "i32",
+ "retval"
+ ],
+ {
+ "crc": "0xe8d4e804"
+ }
+ ],
+ [
+ "sw_interface_ip6_set_link_local_address",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "sw_if_index"
+ ],
+ [
+ "u8",
+ "address",
+ 16
+ ],
+ {
+ "crc": "0xd73bf1ab"
+ }
+ ],
+ [
+ "sw_interface_ip6_set_link_local_address_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "i32",
+ "retval"
+ ],
+ {
+ "crc": "0xe8d4e804"
+ }
+ ],
+ [
+ "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"
+ ],
+ [
+ "u32",
+ "next_hop_id"
+ ],
+ [
+ "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",
+ "is_dvr"
+ ],
+ [
+ "u8",
+ "is_source_lookup"
+ ],
+ [
+ "u8",
+ "is_udp_encap"
+ ],
+ [
+ "u8",
+ "next_hop_weight"
+ ],
+ [
+ "u8",
+ "next_hop_preference"
+ ],
+ [
+ "u8",
+ "next_hop_proto"
+ ],
+ [
+ "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": "0xc85f8290"
+ }
+ ],
+ [
+ "ip_add_del_route_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "i32",
+ "retval"
+ ],
+ {
+ "crc": "0xe8d4e804"
+ }
+ ],
+ [
+ "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"
+ ],
+ [
+ "u32",
+ "rpf_id"
+ ],
+ [
+ "u32",
+ "bier_imp"
+ ],
+ [
+ "u16",
+ "grp_address_length"
+ ],
+ [
+ "u8",
+ "next_hop_afi"
+ ],
+ [
+ "u8",
+ "is_add"
+ ],
+ [
+ "u8",
+ "is_ipv6"
+ ],
+ [
+ "u8",
+ "is_local"
+ ],
+ [
+ "u8",
+ "grp_address",
+ 16
+ ],
+ [
+ "u8",
+ "src_address",
+ 16
+ ],
+ {
+ "crc": "0xc37112f7"
+ }
+ ],
+ [
+ "ip_mroute_add_del_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "i32",
+ "retval"
+ ],
+ {
+ "crc": "0xe8d4e804"
+ }
+ ],
+ [
+ "ip_mfib_dump",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ {
+ "crc": "0x51077d14"
+ }
+ ],
+ [
+ "ip_mfib_details",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "table_id"
+ ],
+ [
+ "u32",
+ "entry_flags"
+ ],
+ [
+ "u32",
+ "rpf_id"
+ ],
+ [
+ "u8",
+ "address_length"
+ ],
+ [
+ "u8",
+ "grp_address",
+ 4
+ ],
+ [
+ "u8",
+ "src_address",
+ 4
+ ],
+ [
+ "u32",
+ "count"
+ ],
+ [
+ "vl_api_fib_path_t",
+ "path",
+ 0,
+ "count"
+ ],
+ {
+ "crc": "0x5e530d5e"
+ }
+ ],
+ [
+ "ip6_mfib_dump",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ {
+ "crc": "0x51077d14"
+ }
+ ],
+ [
+ "ip6_mfib_details",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "table_id"
+ ],
+ [
+ "u8",
+ "address_length"
+ ],
+ [
+ "u8",
+ "grp_address",
+ 16
+ ],
+ [
+ "u8",
+ "src_address",
+ 16
+ ],
+ [
+ "u32",
+ "count"
+ ],
+ [
+ "vl_api_fib_path_t",
+ "path",
+ 0,
+ "count"
+ ],
+ {
+ "crc": "0xe02dcb4b"
+ }
+ ],
+ [
+ "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": "0xbc7442f2"
+ }
+ ],
+ [
+ "ip_address_dump",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "sw_if_index"
+ ],
+ [
+ "u8",
+ "is_ipv6"
+ ],
+ {
+ "crc": "0x6b7bcd0a"
+ }
+ ],
+ [
+ "ip_details",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "sw_if_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u8",
+ "is_ipv6"
+ ],
+ {
+ "crc": "0x452ffc5a"
+ }
+ ],
+ [
+ "ip_dump",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u8",
+ "is_ipv6"
+ ],
+ {
+ "crc": "0xde883da4"
+ }
+ ],
+ [
+ "mfib_signal_dump",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ {
+ "crc": "0x51077d14"
+ }
+ ],
+ [
+ "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": "0x791bbeab"
+ }
+ ],
+ [
+ "ip_punt_police",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "policer_index"
+ ],
+ [
+ "u8",
+ "is_add"
+ ],
+ [
+ "u8",
+ "is_ip6"
+ ],
+ {
+ "crc": "0x38691592"
+ }
+ ],
+ [
+ "ip_punt_police_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "i32",
+ "retval"
+ ],
+ {
+ "crc": "0xe8d4e804"
+ }
+ ],
+ [
+ "ip_punt_redirect",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "rx_sw_if_index"
+ ],
+ [
+ "u32",
+ "tx_sw_if_index"
+ ],
+ [
+ "u8",
+ "is_add"
+ ],
+ [
+ "u8",
+ "is_ip6"
+ ],
+ [
+ "u8",
+ "nh",
+ 16
+ ],
+ {
+ "crc": "0x996b6603"
+ }
+ ],
+ [
+ "ip_punt_redirect_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "i32",
+ "retval"
+ ],
+ {
+ "crc": "0xe8d4e804"
+ }
+ ],
+ [
+ "ip_container_proxy_add_del",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u8",
+ "ip",
+ 16
+ ],
+ [
+ "u8",
+ "is_ip4"
+ ],
+ [
+ "u8",
+ "plen"
+ ],
+ [
+ "u32",
+ "sw_if_index"
+ ],
+ [
+ "u8",
+ "is_add"
+ ],
+ {
+ "crc": "0x0a355d39"
+ }
+ ],
+ [
+ "ip_container_proxy_add_del_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "i32",
+ "retval"
+ ],
+ {
+ "crc": "0xe8d4e804"
+ }
+ ],
+ [
+ "ip_source_and_port_range_check_add_del",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u8",
+ "is_ipv6"
+ ],
+ [
+ "u8",
+ "is_add"
+ ],
+ [
+ "u8",
+ "mask_length"
+ ],
+ [
+ "u8",
+ "address",
+ 16
+ ],
+ [
+ "u8",
+ "number_of_ranges"
+ ],
+ [
+ "u16",
+ "low_ports",
+ 32
+ ],
+ [
+ "u16",
+ "high_ports",
+ 32
+ ],
+ [
+ "u32",
+ "vrf_id"
+ ],
+ {
+ "crc": "0x03d6b03a"
+ }
+ ],
+ [
+ "ip_source_and_port_range_check_add_del_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "i32",
+ "retval"
+ ],
+ {
+ "crc": "0xe8d4e804"
+ }
+ ],
+ [
+ "ip_source_and_port_range_check_interface_add_del",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u8",
+ "is_add"
+ ],
+ [
+ "u32",
+ "sw_if_index"
+ ],
+ [
+ "u32",
+ "tcp_in_vrf_id"
+ ],
+ [
+ "u32",
+ "tcp_out_vrf_id"
+ ],
+ [
+ "u32",
+ "udp_in_vrf_id"
+ ],
+ [
+ "u32",
+ "udp_out_vrf_id"
+ ],
+ {
+ "crc": "0x6966bc44"
+ }
+ ],
+ [
+ "ip_source_and_port_range_check_interface_add_del_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "i32",
+ "retval"
+ ],
+ {
+ "crc": "0xe8d4e804"
+ }
+ ],
+ [
+ "want_ip4_arp_events",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u8",
+ "enable_disable"
+ ],
+ [
+ "u32",
+ "pid"
+ ],
+ [
+ "u32",
+ "address"
+ ],
+ {
+ "crc": "0x77e06379"
+ }
+ ],
+ [
+ "want_ip4_arp_events_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "i32",
+ "retval"
+ ],
+ {
+ "crc": "0xe8d4e804"
+ }
+ ],
+ [
+ "ip4_arp_event",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "address"
+ ],
+ [
+ "u32",
+ "pid"
+ ],
+ [
+ "u32",
+ "sw_if_index"
+ ],
+ [
+ "u8",
+ "new_mac",
+ 6
+ ],
+ [
+ "u8",
+ "mac_ip"
+ ],
+ {
+ "crc": "0xef7235f7"
+ }
+ ],
+ [
+ "want_ip6_nd_events",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u8",
+ "enable_disable"
+ ],
+ [
+ "u32",
+ "pid"
+ ],
+ [
+ "u8",
+ "address",
+ 16
+ ],
+ {
+ "crc": "0x1cf65fbb"
+ }
+ ],
+ [
+ "want_ip6_nd_events_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "i32",
+ "retval"
+ ],
+ {
+ "crc": "0xe8d4e804"
+ }
+ ],
+ [
+ "ip6_nd_event",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "pid"
+ ],
+ [
+ "u32",
+ "sw_if_index"
+ ],
+ [
+ "u8",
+ "address",
+ 16
+ ],
+ [
+ "u8",
+ "new_mac",
+ 6
+ ],
+ [
+ "u8",
+ "mac_ip"
+ ],
+ {
+ "crc": "0x96ab2fdd"
+ }
+ ],
+ [
+ "proxy_arp_add_del",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "vrf_id"
+ ],
+ [
+ "u8",
+ "is_add"
+ ],
+ [
+ "u8",
+ "low_address",
+ 4
+ ],
+ [
+ "u8",
+ "hi_address",
+ 4
+ ],
+ {
+ "crc": "0xc2442918"
+ }
+ ],
+ [
+ "proxy_arp_add_del_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "i32",
+ "retval"
+ ],
+ {
+ "crc": "0xe8d4e804"
+ }
+ ],
+ [
+ "proxy_arp_intfc_enable_disable",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "sw_if_index"
+ ],
+ [
+ "u8",
+ "enable_disable"
+ ],
+ {
+ "crc": "0x69d24598"
+ }
+ ],
+ [
+ "proxy_arp_intfc_enable_disable_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "i32",
+ "retval"
+ ],
+ {
+ "crc": "0xe8d4e804"
+ }
+ ],
+ [
+ "reset_fib",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u32",
+ "vrf_id"
+ ],
+ [
+ "u8",
+ "is_ipv6"
+ ],
+ {
+ "crc": "0x8553ebd9"
+ }
+ ],
+ [
+ "reset_fib_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "i32",
+ "retval"
+ ],
+ {
+ "crc": "0xe8d4e804"
+ }
+ ],
+ [
+ "set_arp_neighbor_limit",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u8",
+ "is_ipv6"
+ ],
+ [
+ "u32",
+ "arp_neighbor_limit"
+ ],
+ {
+ "crc": "0x97d01fd6"
+ }
+ ],
+ [
+ "set_arp_neighbor_limit_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "i32",
+ "retval"
+ ],
+ {
+ "crc": "0xe8d4e804"
+ }
+ ],
+ [
+ "ioam_enable",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u16",
+ "id"
+ ],
+ [
+ "u8",
+ "seqno"
+ ],
+ [
+ "u8",
+ "analyse"
+ ],
+ [
+ "u8",
+ "pot_enable"
+ ],
+ [
+ "u8",
+ "trace_enable"
+ ],
+ [
+ "u32",
+ "node_id"
+ ],
+ {
+ "crc": "0x9392e032"
+ }
+ ],
+ [
+ "ioam_enable_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "i32",
+ "retval"
+ ],
+ {
+ "crc": "0xe8d4e804"
+ }
+ ],
+ [
+ "ioam_disable",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "client_index"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "u16",
+ "id"
+ ],
+ {
+ "crc": "0x6b16a45e"
+ }
+ ],
+ [
+ "ioam_disable_reply",
+ [
+ "u16",
+ "_vl_msg_id"
+ ],
+ [
+ "u32",
+ "context"
+ ],
+ [
+ "i32",
+ "retval"
+ ],
+ {
+ "crc": "0xe8d4e804"
+ }
]
],
-"vl_api_version" :"0x6a819870"
+ "types": [
+ [
+ "fib_path",
+ [
+ "u32",
+ "sw_if_index"
+ ],
+ [
+ "u32",
+ "table_id"
+ ],
+ [
+ "u8",
+ "weight"
+ ],
+ [
+ "u8",
+ "preference"
+ ],
+ [
+ "u8",
+ "is_local"
+ ],
+ [
+ "u8",
+ "is_drop"
+ ],
+ [
+ "u8",
+ "is_unreach"
+ ],
+ [
+ "u8",
+ "is_prohibit"
+ ],
+ [
+ "u8",
+ "afi"
+ ],
+ [
+ "u8",
+ "next_hop",
+ 16
+ ],
+ {
+ "crc": "0xcd899e0a"
+ }
+ ]
+ ]
}