diff options
author | Milan Lenco <milan.lenco@pantheon.tech> | 2017-06-20 17:15:59 +0200 |
---|---|---|
committer | Milan Lenco <milan.lenco@pantheon.tech> | 2017-06-20 17:39:14 +0200 |
commit | 0b6ef19a7de5b073b7818013930cc7f07526c929 (patch) | |
tree | c6f6c657001ebc5613cda2168060cec7bd453c20 | |
parent | 878bade578bb9d52547591ee02b57d1ac04849b2 (diff) |
Upgrade dependency to VPP 17.07 RC0
Change-Id: I732d478b71895f4d3889752c683dbb6a84c6e17c
Signed-off-by: Milan Lenco <milan.lenco@pantheon.tech>
-rw-r--r-- | api/api_test.go | 2 | ||||
-rw-r--r-- | api/ifcounters/doc.go | 29 | ||||
-rw-r--r-- | api/ifcounters/ifcounters.go | 147 | ||||
-rw-r--r-- | api/ifcounters/ifcounters_test.go | 129 | ||||
-rw-r--r-- | core/bin_api/vpe.api.json | 783 | ||||
-rw-r--r-- | core/bin_api/vpe/vpe.go | 286 | ||||
-rw-r--r-- | core/core.go | 2 | ||||
-rw-r--r-- | examples/bin_api/acl.api.json | 16 | ||||
-rw-r--r-- | examples/bin_api/acl/acl.go | 105 | ||||
-rw-r--r-- | examples/bin_api/af_packet.api.json | 2 | ||||
-rw-r--r-- | examples/bin_api/af_packet/af_packet.go | 4 | ||||
-rw-r--r-- | examples/bin_api/interface.api.json | 37 | ||||
-rw-r--r-- | examples/bin_api/interfaces/interfaces.go | 186 | ||||
-rw-r--r-- | examples/bin_api/ip.api.json | 74 | ||||
-rw-r--r-- | examples/bin_api/ip/ip.go | 291 | ||||
-rw-r--r-- | examples/bin_api/memif.api.json | 15 | ||||
-rw-r--r-- | examples/bin_api/memif/memif.go | 40 | ||||
-rw-r--r-- | examples/bin_api/tap.api.json | 2 | ||||
-rw-r--r-- | examples/bin_api/tap/tap.go | 4 | ||||
-rw-r--r-- | examples/cmd/stats-client/stats_client.go | 76 |
20 files changed, 1609 insertions, 621 deletions
diff --git a/api/api_test.go b/api/api_test.go index e7592e0..2a342f6 100644 --- a/api/api_test.go +++ b/api/api_test.go @@ -144,7 +144,7 @@ func TestRequestReplyMemifCreate(t *testing.T) { }) request := &memif.MemifCreate{ Role: 10, - Key: 12, + ID: 12, RingSize: 8000, BufferSize: 50, } diff --git a/api/ifcounters/doc.go b/api/ifcounters/doc.go deleted file mode 100644 index 35c7f7b..0000000 --- a/api/ifcounters/doc.go +++ /dev/null @@ -1,29 +0,0 @@ -// Package ifcounters provides the helper API for decoding VnetInterfaceCounters binary API message -// that contains binary-encoded statistics data into the Go structs that are better consumable by the Go code. -// -// VPP provides two types of interface counters that can be encoded inside of a single VnetInterfaceCounters -// message: simple and combined. For both of them, ifcounters API provides a separate decode function: -// DecodeCounters or DecodeCombinedCounters. The functions return a slice of simple or combined counters respectively: -// -// notifMsg := <-notifChan: -// notif := notifMsg.(*interfaces.VnetInterfaceCounters) -// -// if notif.IsCombined == 0 { -// // simple counter -// counters, err := ifcounters.DecodeCounters(ifcounters.VnetInterfaceCounters(*notif)) -// if err != nil { -// fmt.Println("Error:", err) -// } else { -// fmt.Printf("%+v\n", counters) -// } -// } else { -// // combined counter -// counters, err := ifcounters.DecodeCombinedCounters(ifcounters.VnetInterfaceCounters(*notif)) -// if err != nil { -// fmt.Println("Error:", err) -// } else { -// fmt.Printf("%+v\n", counters) -// } -// } -// -package ifcounters diff --git a/api/ifcounters/ifcounters.go b/api/ifcounters/ifcounters.go deleted file mode 100644 index 202fe6e..0000000 --- a/api/ifcounters/ifcounters.go +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) 2017 Cisco and/or its affiliates. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at: -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package ifcounters - -import ( - "bytes" - "errors" - "fmt" - - "github.com/lunixbochs/struc" -) - -// VnetInterfaceCounters is the input data type defined in the 'interface.api', with binary encoded Data field, -// that can be decoded into the InterfaceCounter or CombinedInterfaceCounter struct using this package. -type VnetInterfaceCounters struct { - VnetCounterType uint8 - IsCombined uint8 - FirstSwIfIndex uint32 - Count uint32 `struc:"sizeof=Data"` - Data []byte -} - -// CounterType is the basic counter type - contains only packet statistics. -type CounterType int - -// constants as defined in the vnet_interface_counter_type_t enum in 'vnet/interface.h' -const ( - Drop CounterType = 0 - Punt = 1 - IPv4 = 2 - IPv6 = 3 - RxNoBuf = 4 - RxMiss = 5 - RxError = 6 - TxError = 7 - MPLS = 8 -) - -// CombinedCounterType is the extended counter type - contains both packet and byte statistics. -type CombinedCounterType int - -// constants as defined in the vnet_interface_counter_type_t enum in 'vnet/interface.h' -const ( - Rx CombinedCounterType = 0 - Tx = 1 -) - -// InterfaceCounter contains basic counter data (contains only packet statistics). -type InterfaceCounter struct { - Type CounterType - SwIfIndex uint32 - Packets uint64 -} - -// CombinedInterfaceCounter contains extended counter data (contains both packet and byte statistics). -type CombinedInterfaceCounter struct { - Type CombinedCounterType - SwIfIndex uint32 - Packets uint64 - Bytes uint64 -} - -type counterData struct { - Packets uint64 -} - -type counter struct { - Count uint32 `struc:"sizeof=Data"` - Data []counterData -} - -type combinedCounterData struct { - Packets uint64 - Bytes uint64 -} - -type combinedCounter struct { - Count uint32 `struc:"sizeof=Data"` - Data []combinedCounterData -} - -// DecodeCounters decodes VnetInterfaceCounters struct content into the slice of InterfaceCounter structs. -func DecodeCounters(vnetCounters VnetInterfaceCounters) ([]InterfaceCounter, error) { - if vnetCounters.IsCombined == 1 { - return nil, errors.New("invalid argument - combined counter passed in") - } - - // decode into internal struct - var c counter - buf := bytes.NewReader(vnetCounters.Data) - err := struc.Unpack(buf, &c) - if err != nil { - return nil, fmt.Errorf("unable to decode counter data: %v", err) - } - - // prepare the slice - res := make([]InterfaceCounter, c.Count) - - // fill in the slice - for i := uint32(0); i < c.Count; i++ { - res[i].Type = CounterType(vnetCounters.VnetCounterType) - res[i].SwIfIndex = vnetCounters.FirstSwIfIndex + i - res[i].Packets = c.Data[i].Packets - } - - return res, nil -} - -// DecodeCombinedCounters decodes VnetInterfaceCounters struct content into the slice of CombinedInterfaceCounter structs. -func DecodeCombinedCounters(vnetCounters VnetInterfaceCounters) ([]CombinedInterfaceCounter, error) { - if vnetCounters.IsCombined != 1 { - return nil, errors.New("invalid argument - simple counter passed in") - } - - // decode into internal struct - var c combinedCounter - buf := bytes.NewReader(vnetCounters.Data) - err := struc.Unpack(buf, &c) - if err != nil { - return nil, fmt.Errorf("unable to decode counter data: %v", err) - } - - // prepare the slice - res := make([]CombinedInterfaceCounter, c.Count) - - // fill in the slice - for i := uint32(0); i < c.Count; i++ { - res[i].Type = CombinedCounterType(vnetCounters.VnetCounterType) - res[i].SwIfIndex = vnetCounters.FirstSwIfIndex + i - res[i].Packets = c.Data[i].Packets - res[i].Bytes = c.Data[i].Bytes - } - - return res, nil -} diff --git a/api/ifcounters/ifcounters_test.go b/api/ifcounters/ifcounters_test.go deleted file mode 100644 index 6f9a1d9..0000000 --- a/api/ifcounters/ifcounters_test.go +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) 2017 Cisco and/or its affiliates. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at: -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package ifcounters - -import ( - "testing" - - . "github.com/onsi/gomega" -) - -func TestDecodeCounters(t *testing.T) { - RegisterTestingT(t) - - testCounters := VnetInterfaceCounters{ - VnetCounterType: 1, - IsCombined: 0, - FirstSwIfIndex: 5, - Count: 2, - Data: []byte{0, 0, 0, 2, // Count - 0, 0, 0, 0, 0, 0, 0, 10, // first counter - 0, 0, 0, 0, 0, 0, 0, 11}, // second counter - } - counters, err := DecodeCounters(testCounters) - - Expect(err).ShouldNot(HaveOccurred()) - Expect(len(counters)).To(BeEquivalentTo(2), "Incorrect size of the returned slice.") - - Expect(counters[0].Type).To(BeEquivalentTo(1), "Incorrect counter type.") - Expect(counters[0].SwIfIndex).To(BeEquivalentTo(5), "Incorrect SwIfIndex.") - Expect(counters[0].Packets).To(BeEquivalentTo(10), "Incorrect Packets count.") - - Expect(counters[1].Type).To(BeEquivalentTo(1), "Incorrect counter type.") - Expect(counters[1].SwIfIndex).To(BeEquivalentTo(6), "Incorrect SwIfIndex.") - Expect(counters[1].Packets).To(BeEquivalentTo(11), "Incorrect Packets count.") -} - -func TestDecodeCombinedCounters(t *testing.T) { - RegisterTestingT(t) - - testCounters := VnetInterfaceCounters{ - VnetCounterType: 1, - IsCombined: 1, - FirstSwIfIndex: 20, - Count: 2, - Data: []byte{0, 0, 0, 2, // Count - 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 11, // first counter - 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13}, // second counter - } - counters, err := DecodeCombinedCounters(testCounters) - - Expect(err).ShouldNot(HaveOccurred()) - Expect(len(counters)).To(BeEquivalentTo(2), "Incorrect size of the returned slice.") - - Expect(counters[0].Type).To(BeEquivalentTo(1), "Incorrect counter type.") - Expect(counters[0].SwIfIndex).To(BeEquivalentTo(20), "Incorrect SwIfIndex.") - Expect(counters[0].Packets).To(BeEquivalentTo(10), "Incorrect Packets count.") - Expect(counters[0].Bytes).To(BeEquivalentTo(11), "Incorrect Bytes count.") - - Expect(counters[1].Type).To(BeEquivalentTo(1), "Incorrect counter type.") - Expect(counters[1].SwIfIndex).To(BeEquivalentTo(21), "Incorrect SwIfIndex.") - Expect(counters[1].Packets).To(BeEquivalentTo(12), "Incorrect Packets count.") - Expect(counters[1].Bytes).To(BeEquivalentTo(13), "Incorrect Bytes count.") -} - -func TestDecodeCountersNegative1(t *testing.T) { - RegisterTestingT(t) - - testCounters := VnetInterfaceCounters{ - IsCombined: 1, // invalid, should be 0 - } - counters, err := DecodeCounters(testCounters) - - Expect(err).Should(HaveOccurred()) - Expect(err.Error()).To(ContainSubstring("invalid argument")) - Expect(counters).To(BeNil()) -} - -func TestDecodeCombinedCountersNegative1(t *testing.T) { - RegisterTestingT(t) - - testCounters := VnetInterfaceCounters{ - IsCombined: 0, // invalid, should be 1 - } - counters, err := DecodeCombinedCounters(testCounters) - - Expect(err).Should(HaveOccurred()) - Expect(err.Error()).To(ContainSubstring("invalid argument")) - Expect(counters).To(BeNil()) -} - -func TestDecodeCountersNegative2(t *testing.T) { - RegisterTestingT(t) - - testCounters := VnetInterfaceCounters{ - IsCombined: 0, - // no data - } - counters, err := DecodeCounters(testCounters) - - Expect(err).Should(HaveOccurred()) - Expect(err.Error()).To(ContainSubstring("unable to decode")) - Expect(counters).To(BeNil()) -} - -func TestDecodeCombinedCountersNegative2(t *testing.T) { - RegisterTestingT(t) - - testCounters := VnetInterfaceCounters{ - IsCombined: 1, - // no data - } - counters, err := DecodeCombinedCounters(testCounters) - - Expect(err).Should(HaveOccurred()) - Expect(err.Error()).To(ContainSubstring("unable to decode")) - Expect(counters).To(BeNil()) -} diff --git a/core/bin_api/vpe.api.json b/core/bin_api/vpe.api.json new file mode 100644 index 0000000..1744e9c --- /dev/null +++ b/core/bin_api/vpe.api.json @@ -0,0 +1,783 @@ +{ + "types" : [ + ["ip4_fib_counter", + ["u32", "address"], + ["u8", "address_length"], + ["u64", "packets"], + ["u64", "bytes"], + {"crc" : "0xb2739495"} + ], + ["ip4_nbr_counter", + ["u32", "address"], + ["u8", "link_type"], + ["u64", "packets"], + ["u64", "bytes"], + {"crc" : "0x487e2e85"} + ], + ["ip6_fib_counter", + ["u64", "address", 2], + ["u8", "address_length"], + ["u64", "packets"], + ["u64", "bytes"], + {"crc" : "0xcf35769b"} + ], + ["ip6_nbr_counter", + ["u64", "address", 2], + ["u8", "link_type"], + ["u64", "packets"], + ["u64", "bytes"], + {"crc" : "0xefca741e"} + ] + ], + "messages" : [ + ["create_vlan_subif", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u32", "sw_if_index"], + ["u32", "vlan_id"], + {"crc" : "0xaf9ae1e9"} + ], + ["create_vlan_subif_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + ["u32", "sw_if_index"], + {"crc" : "0x8f36b888"} + ], + ["sw_interface_set_mpls_enable", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u32", "sw_if_index"], + ["u8", "enable"], + {"crc" : "0x37f6357e"} + ], + ["sw_interface_set_mpls_enable_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + {"crc" : "0x5ffd3ca9"} + ], + ["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" : "0x4bef9951"} + ], + ["proxy_arp_add_del_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + {"crc" : "0x8e2d621d"} + ], + ["proxy_arp_intfc_enable_disable", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u32", "sw_if_index"], + ["u8", "enable_disable"], + {"crc" : "0x3ee1998e"} + ], + ["proxy_arp_intfc_enable_disable_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + {"crc" : "0x23d273cd"} + ], + ["reset_vrf", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u8", "is_ipv6"], + ["u32", "vrf_id"], + {"crc" : "0xeb07deb0"} + ], + ["reset_vrf_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + {"crc" : "0x5f283863"} + ], + ["want_stats", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u32", "enable_disable"], + ["u32", "pid"], + {"crc" : "0x4f2effb4"} + ], + ["want_stats_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + {"crc" : "0xb36abf5f"} + ], + ["vnet_ip4_fib_counters", + ["u16", "_vl_msg_id"], + ["u32", "vrf_id"], + ["u32", "count"], + ["vl_api_ip4_fib_counter_t", "c", 0, "count"], + {"crc" : "0x1ab9d6c5"} + ], + ["vnet_ip4_nbr_counters", + ["u16", "_vl_msg_id"], + ["u32", "count"], + ["u32", "sw_if_index"], + ["u8", "begin"], + ["vl_api_ip4_nbr_counter_t", "c", 0, "count"], + {"crc" : "0xfc2b5092"} + ], + ["vnet_ip6_fib_counters", + ["u16", "_vl_msg_id"], + ["u32", "vrf_id"], + ["u32", "count"], + ["vl_api_ip6_fib_counter_t", "c", 0, "count"], + {"crc" : "0x9ab453ae"} + ], + ["vnet_ip6_nbr_counters", + ["u16", "_vl_msg_id"], + ["u32", "count"], + ["u32", "sw_if_index"], + ["u8", "begin"], + ["vl_api_ip6_nbr_counter_t", "c", 0, "count"], + {"crc" : "0x181b673f"} + ], + ["vnet_get_summary_stats", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + {"crc" : "0x16435c20"} + ], + ["vnet_get_summary_stats_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + ["u64", "total_pkts", 2], + ["u64", "total_bytes", 2], + ["f64", "vector_rate"], + {"crc" : "0x675ce280"} + ], + ["oam_event", + ["u16", "_vl_msg_id"], + ["u8", "dst_address", 4], + ["u8", "state"], + {"crc" : "0x4f285ade"} + ], + ["want_oam_events", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u32", "enable_disable"], + ["u32", "pid"], + {"crc" : "0x948ef12a"} + ], + ["want_oam_events_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + {"crc" : "0x266a677d"} + ], + ["oam_add_del", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u32", "vrf_id"], + ["u8", "src_address", 4], + ["u8", "dst_address", 4], + ["u8", "is_add"], + {"crc" : "0xb14bc7df"} + ], + ["oam_add_del_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + {"crc" : "0xc5594eec"} + ], + ["reset_fib", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u32", "vrf_id"], + ["u8", "is_ipv6"], + {"crc" : "0x6f17106b"} + ], + ["reset_fib_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + {"crc" : "0x990dcbf8"} + ], + ["create_loopback", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u8", "mac_address", 6], + {"crc" : "0xb2602de5"} + ], + ["create_loopback_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + ["u32", "sw_if_index"], + {"crc" : "0x9520f804"} + ], + ["create_loopback_instance", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u8", "mac_address", 6], + ["u8", "is_specified"], + ["u32", "user_instance"], + {"crc" : "0x967694f1"} + ], + ["create_loopback_instance_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + ["u32", "sw_if_index"], + {"crc" : "0xd52c63b6"} + ], + ["delete_loopback", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u32", "sw_if_index"], + {"crc" : "0xded428b0"} + ], + ["delete_loopback_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + {"crc" : "0xc91dafa5"} + ], + ["control_ping", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + {"crc" : "0xea1bf4f7"} + ], + ["control_ping_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + ["u32", "client_index"], + ["u32", "vpe_pid"], + {"crc" : "0xaa016e7b"} + ], + ["cli", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u64", "cmd_in_shmem"], + {"crc" : "0x543d8e2e"} + ], + ["cli_inband", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u32", "length"], + ["u8", "cmd", 0, "length"], + {"crc" : "0x22345937"} + ], + ["cli_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + ["u64", "reply_in_shmem"], + {"crc" : "0x594a0b2e"} + ], + ["cli_inband_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + ["u32", "length"], + ["u8", "reply", 0, "length"], + {"crc" : "0xc1835761"} + ], + ["set_arp_neighbor_limit", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u8", "is_ipv6"], + ["u32", "arp_neighbor_limit"], + {"crc" : "0xc1690cb4"} + ], + ["set_arp_neighbor_limit_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + {"crc" : "0xa6b30518"} + ], + ["l2_patch_add_del", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u32", "rx_sw_if_index"], + ["u32", "tx_sw_if_index"], + ["u8", "is_add"], + {"crc" : "0x9b10029a"} + ], + ["l2_patch_add_del_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + {"crc" : "0xa85e37be"} + ], + ["sw_interface_set_vpath", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u32", "sw_if_index"], + ["u8", "enable"], + {"crc" : "0x1bc2fd5e"} + ], + ["sw_interface_set_vpath_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + {"crc" : "0x828dbe62"} + ], + ["sw_interface_set_l2_xconnect", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u32", "rx_sw_if_index"], + ["u32", "tx_sw_if_index"], + ["u8", "enable"], + {"crc" : "0x48a4c4c8"} + ], + ["sw_interface_set_l2_xconnect_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + {"crc" : "0x6e45eed4"} + ], + ["sw_interface_set_l2_bridge", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u32", "rx_sw_if_index"], + ["u32", "bd_id"], + ["u8", "shg"], + ["u8", "bvi"], + ["u8", "enable"], + {"crc" : "0x36c739e8"} + ], + ["sw_interface_set_l2_bridge_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + {"crc" : "0x347e08d9"} + ], + ["bd_ip_mac_add_del", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u32", "bd_id"], + ["u8", "is_add"], + ["u8", "is_ipv6"], + ["u8", "ip_address", 16], + ["u8", "mac_address", 6], + {"crc" : "0xad819817"} + ], + ["bd_ip_mac_add_del_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + {"crc" : "0x55bab3b4"} + ], + ["classify_set_interface_ip_table", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u8", "is_ipv6"], + ["u32", "sw_if_index"], + ["u32", "table_index"], + {"crc" : "0x0dc45308"} + ], + ["classify_set_interface_ip_table_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + {"crc" : "0xdc391c34"} + ], + ["classify_set_interface_l2_tables", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u32", "sw_if_index"], + ["u32", "ip4_table_index"], + ["u32", "ip6_table_index"], + ["u32", "other_table_index"], + ["u8", "is_input"], + {"crc" : "0xed9ccf0d"} + ], + ["classify_set_interface_l2_tables_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + {"crc" : "0x8df20579"} + ], + ["get_node_index", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u8", "node_name", 64], + {"crc" : "0x226d3f8c"} + ], + ["get_node_index_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + ["u32", "node_index"], + {"crc" : "0x29116865"} + ], + ["add_node_next", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u8", "node_name", 64], + ["u8", "next_name", 64], + {"crc" : "0xe4202993"} + ], + ["add_node_next_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + ["u32", "next_index"], + {"crc" : "0xe89d6eed"} + ], + ["l2_interface_efp_filter", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u32", "sw_if_index"], + ["u32", "enable_disable"], + {"crc" : "0x07c9d601"} + ], + ["l2_interface_efp_filter_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + {"crc" : "0x0f4bb0c0"} + ], + ["create_subif", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u32", "sw_if_index"], + ["u32", "sub_id"], + ["u8", "no_tags"], + ["u8", "one_tag"], + ["u8", "two_tags"], + ["u8", "dot1ad"], + ["u8", "exact_match"], + ["u8", "default_sub"], + ["u8", "outer_vlan_id_any"], + ["u8", "inner_vlan_id_any"], + ["u16", "outer_vlan_id"], + ["u16", "inner_vlan_id"], + {"crc" : "0x150e6757"} + ], + ["create_subif_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + ["u32", "sw_if_index"], + {"crc" : "0x92272bcb"} + ], + ["show_version", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + {"crc" : "0xf18f9480"} + ], + ["show_version_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + ["u8", "program", 32], + ["u8", "version", 32], + ["u8", "build_date", 32], + ["u8", "build_directory", 256], + {"crc" : "0x83186d9e"} + ], + ["interface_name_renumber", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u32", "sw_if_index"], + ["u32", "new_show_dev_instance"], + {"crc" : "0x11b7bcec"} + ], + ["interface_name_renumber_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + {"crc" : "0x31594963"} + ], + ["want_ip4_arp_events", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u8", "enable_disable"], + ["u32", "pid"], + ["u32", "address"], + {"crc" : "0x5ae044c2"} + ], + ["want_ip4_arp_events_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + {"crc" : "0xe1c0b59e"} + ], + ["ip4_arp_event", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u32", "address"], + ["u32", "pid"], + ["u32", "sw_if_index"], + ["u8", "new_mac", 6], + ["u8", "mac_ip"], + {"crc" : "0x7de1837b"} + ], + ["want_ip6_nd_events", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u8", "enable_disable"], + ["u32", "pid"], + ["u8", "address", 16], + {"crc" : "0x9586ba55"} + ], + ["want_ip6_nd_events_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + {"crc" : "0x95458aad"} + ], + ["ip6_nd_event", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u32", "pid"], + ["u32", "sw_if_index"], + ["u8", "address", 16], + ["u8", "new_mac", 6], + ["u8", "mac_ip"], + {"crc" : "0x777bb71c"} + ], + ["input_acl_set_interface", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u32", "sw_if_index"], + ["u32", "ip4_table_index"], + ["u32", "ip6_table_index"], + ["u32", "l2_table_index"], + ["u8", "is_add"], + {"crc" : "0x34d2fc33"} + ], + ["input_acl_set_interface_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + {"crc" : "0xba0110e3"} + ], + ["get_node_graph", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + {"crc" : "0xf8636a76"} + ], + ["get_node_graph_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + ["u64", "reply_in_shmem"], + {"crc" : "0x816d91b6"} + ], + ["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" : "0x7bd4abf9"} + ], + ["ioam_enable_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + {"crc" : "0x58a8fedc"} + ], + ["ioam_disable", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u16", "id"], + {"crc" : "0xaff26d33"} + ], + ["ioam_disable_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + {"crc" : "0xef118a9d"} + ], + ["get_next_index", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u8", "node_name", 64], + ["u8", "next_name", 64], + {"crc" : "0x52f0e416"} + ], + ["get_next_index_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + ["u32", "next_index"], + {"crc" : "0x671fbdb1"} + ], + ["pg_create_interface", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u32", "interface_id"], + {"crc" : "0x253c5959"} + ], + ["pg_create_interface_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + ["u32", "sw_if_index"], + {"crc" : "0x21b4f949"} + ], + ["pg_capture", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u32", "interface_id"], + ["u8", "is_enabled"], + ["u32", "count"], + ["u32", "pcap_name_length"], + ["u8", "pcap_file_name", 0, "pcap_name_length"], + {"crc" : "0x6ac7fe78"} + ], + ["pg_capture_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + {"crc" : "0xf403693b"} + ], + ["pg_enable_disable", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u8", "is_enabled"], + ["u32", "stream_name_length"], + ["u8", "stream_name", 0, "stream_name_length"], + {"crc" : "0x7d0b90ff"} + ], + ["pg_enable_disable_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + {"crc" : "0x02253bd6"} + ], + ["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" : "0x0f8c6ba0"} + ], + ["ip_source_and_port_range_check_add_del_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + {"crc" : "0x35df8160"} + ], + ["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" : "0x4a6438f1"} + ], + ["ip_source_and_port_range_check_interface_add_del_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + {"crc" : "0x6b940f04"} + ], + ["delete_subif", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u32", "sw_if_index"], + {"crc" : "0x6038f848"} + ], + ["delete_subif_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + {"crc" : "0x9d6015dc"} + ], + ["punt", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u8", "is_add"], + ["u8", "ipv"], + ["u8", "l4_protocol"], + ["u16", "l4_port"], + {"crc" : "0x4559c976"} + ], + ["punt_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + {"crc" : "0xcca27fbe"} + ], + ["feature_enable_disable", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u32", "sw_if_index"], + ["u8", "enable"], + ["u8", "arc_name", 64], + ["u8", "feature_name", 64], + {"crc" : "0xbc86393b"} + ], + ["feature_enable_disable_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + {"crc" : "0xf6e14373"} + ] + ], +"vl_api_version" :"0x50d987fe" +} diff --git a/core/bin_api/vpe/vpe.go b/core/bin_api/vpe/vpe.go index 07e35d4..51a245b 100644 --- a/core/bin_api/vpe/vpe.go +++ b/core/bin_api/vpe/vpe.go @@ -1,14 +1,14 @@ // Package vpe represents the VPP binary API of the 'vpe' VPP module. -// DO NOT EDIT. Generated from '/usr/share/vpp/api/vpe.api.json' on Thu, 04 May 2017 13:11:57 CEST. +// DO NOT EDIT. Generated from 'bin_api/vpe.api.json' package vpe import "git.fd.io/govpp.git/api" // VlApiVersion contains version of the API. -const VlAPIVersion = 0x0a33c8f7 +const VlAPIVersion = 0x50d987fe // IP4FibCounter represents the VPP binary API data type 'ip4_fib_counter'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 3: +// Generated from 'bin_api/vpe.api.json', line 3: // // ["ip4_fib_counter", // ["u32", "address"], @@ -33,7 +33,7 @@ func (*IP4FibCounter) GetCrcString() string { } // IP4NbrCounter represents the VPP binary API data type 'ip4_nbr_counter'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 10: +// Generated from 'bin_api/vpe.api.json', line 10: // // ["ip4_nbr_counter", // ["u32", "address"], @@ -58,7 +58,7 @@ func (*IP4NbrCounter) GetCrcString() string { } // IP6FibCounter represents the VPP binary API data type 'ip6_fib_counter'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 17: +// Generated from 'bin_api/vpe.api.json', line 17: // // ["ip6_fib_counter", // ["u64", "address", 2], @@ -83,7 +83,7 @@ func (*IP6FibCounter) GetCrcString() string { } // IP6NbrCounter represents the VPP binary API data type 'ip6_nbr_counter'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 24: +// Generated from 'bin_api/vpe.api.json', line 24: // // ["ip6_nbr_counter", // ["u64", "address", 2], @@ -108,7 +108,7 @@ func (*IP6NbrCounter) GetCrcString() string { } // CreateVlanSubif represents the VPP binary API message 'create_vlan_subif'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 33: +// Generated from 'bin_api/vpe.api.json', line 33: // // ["create_vlan_subif", // ["u16", "_vl_msg_id"], @@ -138,7 +138,7 @@ func NewCreateVlanSubif() api.Message { } // CreateVlanSubifReply represents the VPP binary API message 'create_vlan_subif_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 41: +// Generated from 'bin_api/vpe.api.json', line 41: // // ["create_vlan_subif_reply", // ["u16", "_vl_msg_id"], @@ -167,7 +167,7 @@ func NewCreateVlanSubifReply() api.Message { } // SwInterfaceSetMplsEnable represents the VPP binary API message 'sw_interface_set_mpls_enable'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 48: +// Generated from 'bin_api/vpe.api.json', line 48: // // ["sw_interface_set_mpls_enable", // ["u16", "_vl_msg_id"], @@ -197,7 +197,7 @@ func NewSwInterfaceSetMplsEnable() api.Message { } // SwInterfaceSetMplsEnableReply represents the VPP binary API message 'sw_interface_set_mpls_enable_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 56: +// Generated from 'bin_api/vpe.api.json', line 56: // // ["sw_interface_set_mpls_enable_reply", // ["u16", "_vl_msg_id"], @@ -224,7 +224,7 @@ func NewSwInterfaceSetMplsEnableReply() api.Message { } // ProxyArpAddDel represents the VPP binary API message 'proxy_arp_add_del'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 62: +// Generated from 'bin_api/vpe.api.json', line 62: // // ["proxy_arp_add_del", // ["u16", "_vl_msg_id"], @@ -258,7 +258,7 @@ func NewProxyArpAddDel() api.Message { } // ProxyArpAddDelReply represents the VPP binary API message 'proxy_arp_add_del_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 72: +// Generated from 'bin_api/vpe.api.json', line 72: // // ["proxy_arp_add_del_reply", // ["u16", "_vl_msg_id"], @@ -285,7 +285,7 @@ func NewProxyArpAddDelReply() api.Message { } // ProxyArpIntfcEnableDisable represents the VPP binary API message 'proxy_arp_intfc_enable_disable'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 78: +// Generated from 'bin_api/vpe.api.json', line 78: // // ["proxy_arp_intfc_enable_disable", // ["u16", "_vl_msg_id"], @@ -315,7 +315,7 @@ func NewProxyArpIntfcEnableDisable() api.Message { } // ProxyArpIntfcEnableDisableReply represents the VPP binary API message 'proxy_arp_intfc_enable_disable_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 86: +// Generated from 'bin_api/vpe.api.json', line 86: // // ["proxy_arp_intfc_enable_disable_reply", // ["u16", "_vl_msg_id"], @@ -342,7 +342,7 @@ func NewProxyArpIntfcEnableDisableReply() api.Message { } // ResetVrf represents the VPP binary API message 'reset_vrf'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 92: +// Generated from 'bin_api/vpe.api.json', line 92: // // ["reset_vrf", // ["u16", "_vl_msg_id"], @@ -372,7 +372,7 @@ func NewResetVrf() api.Message { } // ResetVrfReply represents the VPP binary API message 'reset_vrf_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 100: +// Generated from 'bin_api/vpe.api.json', line 100: // // ["reset_vrf_reply", // ["u16", "_vl_msg_id"], @@ -398,44 +398,8 @@ func NewResetVrfReply() api.Message { return &ResetVrfReply{} } -// IsAddressReachable represents the VPP binary API message 'is_address_reachable'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 106: -// -// ["is_address_reachable", -// ["u16", "_vl_msg_id"], -// ["u32", "client_index"], -// ["u32", "context"], -// ["u32", "next_hop_sw_if_index"], -// ["u8", "is_known"], -// ["u8", "is_ipv6"], -// ["u8", "is_error"], -// ["u8", "address", 16], -// {"crc" : "0xa8b6e322"} -// ], -// -type IsAddressReachable struct { - NextHopSwIfIndex uint32 - IsKnown uint8 - IsIpv6 uint8 - IsError uint8 - Address []byte `struc:"[16]byte"` -} - -func (*IsAddressReachable) GetMessageName() string { - return "is_address_reachable" -} -func (*IsAddressReachable) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*IsAddressReachable) GetCrcString() string { - return "a8b6e322" -} -func NewIsAddressReachable() api.Message { - return &IsAddressReachable{} -} - // WantStats represents the VPP binary API message 'want_stats'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 117: +// Generated from 'bin_api/vpe.api.json', line 106: // // ["want_stats", // ["u16", "_vl_msg_id"], @@ -465,7 +429,7 @@ func NewWantStats() api.Message { } // WantStatsReply represents the VPP binary API message 'want_stats_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 125: +// Generated from 'bin_api/vpe.api.json', line 114: // // ["want_stats_reply", // ["u16", "_vl_msg_id"], @@ -492,7 +456,7 @@ func NewWantStatsReply() api.Message { } // VnetIP4FibCounters represents the VPP binary API message 'vnet_ip4_fib_counters'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 131: +// Generated from 'bin_api/vpe.api.json', line 120: // // ["vnet_ip4_fib_counters", // ["u16", "_vl_msg_id"], @@ -522,7 +486,7 @@ func NewVnetIP4FibCounters() api.Message { } // VnetIP4NbrCounters represents the VPP binary API message 'vnet_ip4_nbr_counters'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 138: +// Generated from 'bin_api/vpe.api.json', line 127: // // ["vnet_ip4_nbr_counters", // ["u16", "_vl_msg_id"], @@ -554,7 +518,7 @@ func NewVnetIP4NbrCounters() api.Message { } // VnetIP6FibCounters represents the VPP binary API message 'vnet_ip6_fib_counters'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 146: +// Generated from 'bin_api/vpe.api.json', line 135: // // ["vnet_ip6_fib_counters", // ["u16", "_vl_msg_id"], @@ -584,7 +548,7 @@ func NewVnetIP6FibCounters() api.Message { } // VnetIP6NbrCounters represents the VPP binary API message 'vnet_ip6_nbr_counters'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 153: +// Generated from 'bin_api/vpe.api.json', line 142: // // ["vnet_ip6_nbr_counters", // ["u16", "_vl_msg_id"], @@ -616,7 +580,7 @@ func NewVnetIP6NbrCounters() api.Message { } // VnetGetSummaryStats represents the VPP binary API message 'vnet_get_summary_stats'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 161: +// Generated from 'bin_api/vpe.api.json', line 150: // // ["vnet_get_summary_stats", // ["u16", "_vl_msg_id"], @@ -641,41 +605,41 @@ func NewVnetGetSummaryStats() api.Message { return &VnetGetSummaryStats{} } -// VnetSummaryStatsReply represents the VPP binary API message 'vnet_summary_stats_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 167: +// VnetGetSummaryStatsReply represents the VPP binary API message 'vnet_get_summary_stats_reply'. +// Generated from 'bin_api/vpe.api.json', line 156: // -// ["vnet_summary_stats_reply", +// ["vnet_get_summary_stats_reply", // ["u16", "_vl_msg_id"], // ["u32", "context"], // ["i32", "retval"], // ["u64", "total_pkts", 2], // ["u64", "total_bytes", 2], // ["f64", "vector_rate"], -// {"crc" : "0x87a8fa9f"} +// {"crc" : "0x675ce280"} // ], // -type VnetSummaryStatsReply struct { +type VnetGetSummaryStatsReply struct { Retval int32 TotalPkts []uint64 `struc:"[2]uint64"` TotalBytes []uint64 `struc:"[2]uint64"` VectorRate float64 } -func (*VnetSummaryStatsReply) GetMessageName() string { - return "vnet_summary_stats_reply" +func (*VnetGetSummaryStatsReply) GetMessageName() string { + return "vnet_get_summary_stats_reply" } -func (*VnetSummaryStatsReply) GetMessageType() api.MessageType { +func (*VnetGetSummaryStatsReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func (*VnetSummaryStatsReply) GetCrcString() string { - return "87a8fa9f" +func (*VnetGetSummaryStatsReply) GetCrcString() string { + return "675ce280" } -func NewVnetSummaryStatsReply() api.Message { - return &VnetSummaryStatsReply{} +func NewVnetGetSummaryStatsReply() api.Message { + return &VnetGetSummaryStatsReply{} } // OamEvent represents the VPP binary API message 'oam_event'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 176: +// Generated from 'bin_api/vpe.api.json', line 165: // // ["oam_event", // ["u16", "_vl_msg_id"], @@ -703,7 +667,7 @@ func NewOamEvent() api.Message { } // WantOamEvents represents the VPP binary API message 'want_oam_events'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 182: +// Generated from 'bin_api/vpe.api.json', line 171: // // ["want_oam_events", // ["u16", "_vl_msg_id"], @@ -733,7 +697,7 @@ func NewWantOamEvents() api.Message { } // WantOamEventsReply represents the VPP binary API message 'want_oam_events_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 190: +// Generated from 'bin_api/vpe.api.json', line 179: // // ["want_oam_events_reply", // ["u16", "_vl_msg_id"], @@ -760,7 +724,7 @@ func NewWantOamEventsReply() api.Message { } // OamAddDel represents the VPP binary API message 'oam_add_del'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 196: +// Generated from 'bin_api/vpe.api.json', line 185: // // ["oam_add_del", // ["u16", "_vl_msg_id"], @@ -794,7 +758,7 @@ func NewOamAddDel() api.Message { } // OamAddDelReply represents the VPP binary API message 'oam_add_del_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 206: +// Generated from 'bin_api/vpe.api.json', line 195: // // ["oam_add_del_reply", // ["u16", "_vl_msg_id"], @@ -821,7 +785,7 @@ func NewOamAddDelReply() api.Message { } // ResetFib represents the VPP binary API message 'reset_fib'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 212: +// Generated from 'bin_api/vpe.api.json', line 201: // // ["reset_fib", // ["u16", "_vl_msg_id"], @@ -851,7 +815,7 @@ func NewResetFib() api.Message { } // ResetFibReply represents the VPP binary API message 'reset_fib_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 220: +// Generated from 'bin_api/vpe.api.json', line 209: // // ["reset_fib_reply", // ["u16", "_vl_msg_id"], @@ -878,7 +842,7 @@ func NewResetFibReply() api.Message { } // CreateLoopback represents the VPP binary API message 'create_loopback'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 226: +// Generated from 'bin_api/vpe.api.json', line 215: // // ["create_loopback", // ["u16", "_vl_msg_id"], @@ -906,7 +870,7 @@ func NewCreateLoopback() api.Message { } // CreateLoopbackReply represents the VPP binary API message 'create_loopback_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 233: +// Generated from 'bin_api/vpe.api.json', line 222: // // ["create_loopback_reply", // ["u16", "_vl_msg_id"], @@ -935,7 +899,7 @@ func NewCreateLoopbackReply() api.Message { } // CreateLoopbackInstance represents the VPP binary API message 'create_loopback_instance'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 240: +// Generated from 'bin_api/vpe.api.json', line 229: // // ["create_loopback_instance", // ["u16", "_vl_msg_id"], @@ -967,7 +931,7 @@ func NewCreateLoopbackInstance() api.Message { } // CreateLoopbackInstanceReply represents the VPP binary API message 'create_loopback_instance_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 249: +// Generated from 'bin_api/vpe.api.json', line 238: // // ["create_loopback_instance_reply", // ["u16", "_vl_msg_id"], @@ -996,7 +960,7 @@ func NewCreateLoopbackInstanceReply() api.Message { } // DeleteLoopback represents the VPP binary API message 'delete_loopback'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 256: +// Generated from 'bin_api/vpe.api.json', line 245: // // ["delete_loopback", // ["u16", "_vl_msg_id"], @@ -1024,7 +988,7 @@ func NewDeleteLoopback() api.Message { } // DeleteLoopbackReply represents the VPP binary API message 'delete_loopback_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 263: +// Generated from 'bin_api/vpe.api.json', line 252: // // ["delete_loopback_reply", // ["u16", "_vl_msg_id"], @@ -1051,7 +1015,7 @@ func NewDeleteLoopbackReply() api.Message { } // ControlPing represents the VPP binary API message 'control_ping'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 269: +// Generated from 'bin_api/vpe.api.json', line 258: // // ["control_ping", // ["u16", "_vl_msg_id"], @@ -1077,7 +1041,7 @@ func NewControlPing() api.Message { } // ControlPingReply represents the VPP binary API message 'control_ping_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 275: +// Generated from 'bin_api/vpe.api.json', line 264: // // ["control_ping_reply", // ["u16", "_vl_msg_id"], @@ -1107,36 +1071,36 @@ func NewControlPingReply() api.Message { return &ControlPingReply{} } -// CliRequest represents the VPP binary API message 'cli_request'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 283: +// Cli represents the VPP binary API message 'cli'. +// Generated from 'bin_api/vpe.api.json', line 272: // -// ["cli_request", +// ["cli", // ["u16", "_vl_msg_id"], // ["u32", "client_index"], // ["u32", "context"], // ["u64", "cmd_in_shmem"], -// {"crc" : "0xfef056d0"} +// {"crc" : "0x543d8e2e"} // ], // -type CliRequest struct { +type Cli struct { CmdInShmem uint64 } -func (*CliRequest) GetMessageName() string { - return "cli_request" +func (*Cli) GetMessageName() string { + return "cli" } -func (*CliRequest) GetMessageType() api.MessageType { +func (*Cli) GetMessageType() api.MessageType { return api.RequestMessage } -func (*CliRequest) GetCrcString() string { - return "fef056d0" +func (*Cli) GetCrcString() string { + return "543d8e2e" } -func NewCliRequest() api.Message { - return &CliRequest{} +func NewCli() api.Message { + return &Cli{} } // CliInband represents the VPP binary API message 'cli_inband'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 290: +// Generated from 'bin_api/vpe.api.json', line 279: // // ["cli_inband", // ["u16", "_vl_msg_id"], @@ -1166,7 +1130,7 @@ func NewCliInband() api.Message { } // CliReply represents the VPP binary API message 'cli_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 298: +// Generated from 'bin_api/vpe.api.json', line 287: // // ["cli_reply", // ["u16", "_vl_msg_id"], @@ -1195,7 +1159,7 @@ func NewCliReply() api.Message { } // CliInbandReply represents the VPP binary API message 'cli_inband_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 305: +// Generated from 'bin_api/vpe.api.json', line 294: // // ["cli_inband_reply", // ["u16", "_vl_msg_id"], @@ -1226,7 +1190,7 @@ func NewCliInbandReply() api.Message { } // SetArpNeighborLimit represents the VPP binary API message 'set_arp_neighbor_limit'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 313: +// Generated from 'bin_api/vpe.api.json', line 302: // // ["set_arp_neighbor_limit", // ["u16", "_vl_msg_id"], @@ -1256,7 +1220,7 @@ func NewSetArpNeighborLimit() api.Message { } // SetArpNeighborLimitReply represents the VPP binary API message 'set_arp_neighbor_limit_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 321: +// Generated from 'bin_api/vpe.api.json', line 310: // // ["set_arp_neighbor_limit_reply", // ["u16", "_vl_msg_id"], @@ -1283,7 +1247,7 @@ func NewSetArpNeighborLimitReply() api.Message { } // L2PatchAddDel represents the VPP binary API message 'l2_patch_add_del'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 327: +// Generated from 'bin_api/vpe.api.json', line 316: // // ["l2_patch_add_del", // ["u16", "_vl_msg_id"], @@ -1315,7 +1279,7 @@ func NewL2PatchAddDel() api.Message { } // L2PatchAddDelReply represents the VPP binary API message 'l2_patch_add_del_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 336: +// Generated from 'bin_api/vpe.api.json', line 325: // // ["l2_patch_add_del_reply", // ["u16", "_vl_msg_id"], @@ -1342,7 +1306,7 @@ func NewL2PatchAddDelReply() api.Message { } // SwInterfaceSetVpath represents the VPP binary API message 'sw_interface_set_vpath'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 342: +// Generated from 'bin_api/vpe.api.json', line 331: // // ["sw_interface_set_vpath", // ["u16", "_vl_msg_id"], @@ -1372,7 +1336,7 @@ func NewSwInterfaceSetVpath() api.Message { } // SwInterfaceSetVpathReply represents the VPP binary API message 'sw_interface_set_vpath_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 350: +// Generated from 'bin_api/vpe.api.json', line 339: // // ["sw_interface_set_vpath_reply", // ["u16", "_vl_msg_id"], @@ -1399,7 +1363,7 @@ func NewSwInterfaceSetVpathReply() api.Message { } // SwInterfaceSetL2Xconnect represents the VPP binary API message 'sw_interface_set_l2_xconnect'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 356: +// Generated from 'bin_api/vpe.api.json', line 345: // // ["sw_interface_set_l2_xconnect", // ["u16", "_vl_msg_id"], @@ -1431,7 +1395,7 @@ func NewSwInterfaceSetL2Xconnect() api.Message { } // SwInterfaceSetL2XconnectReply represents the VPP binary API message 'sw_interface_set_l2_xconnect_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 365: +// Generated from 'bin_api/vpe.api.json', line 354: // // ["sw_interface_set_l2_xconnect_reply", // ["u16", "_vl_msg_id"], @@ -1458,7 +1422,7 @@ func NewSwInterfaceSetL2XconnectReply() api.Message { } // SwInterfaceSetL2Bridge represents the VPP binary API message 'sw_interface_set_l2_bridge'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 371: +// Generated from 'bin_api/vpe.api.json', line 360: // // ["sw_interface_set_l2_bridge", // ["u16", "_vl_msg_id"], @@ -1494,7 +1458,7 @@ func NewSwInterfaceSetL2Bridge() api.Message { } // SwInterfaceSetL2BridgeReply represents the VPP binary API message 'sw_interface_set_l2_bridge_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 382: +// Generated from 'bin_api/vpe.api.json', line 371: // // ["sw_interface_set_l2_bridge_reply", // ["u16", "_vl_msg_id"], @@ -1521,7 +1485,7 @@ func NewSwInterfaceSetL2BridgeReply() api.Message { } // BdIPMacAddDel represents the VPP binary API message 'bd_ip_mac_add_del'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 388: +// Generated from 'bin_api/vpe.api.json', line 377: // // ["bd_ip_mac_add_del", // ["u16", "_vl_msg_id"], @@ -1557,7 +1521,7 @@ func NewBdIPMacAddDel() api.Message { } // BdIPMacAddDelReply represents the VPP binary API message 'bd_ip_mac_add_del_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 399: +// Generated from 'bin_api/vpe.api.json', line 388: // // ["bd_ip_mac_add_del_reply", // ["u16", "_vl_msg_id"], @@ -1584,7 +1548,7 @@ func NewBdIPMacAddDelReply() api.Message { } // ClassifySetInterfaceIPTable represents the VPP binary API message 'classify_set_interface_ip_table'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 405: +// Generated from 'bin_api/vpe.api.json', line 394: // // ["classify_set_interface_ip_table", // ["u16", "_vl_msg_id"], @@ -1616,7 +1580,7 @@ func NewClassifySetInterfaceIPTable() api.Message { } // ClassifySetInterfaceIPTableReply represents the VPP binary API message 'classify_set_interface_ip_table_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 414: +// Generated from 'bin_api/vpe.api.json', line 403: // // ["classify_set_interface_ip_table_reply", // ["u16", "_vl_msg_id"], @@ -1643,7 +1607,7 @@ func NewClassifySetInterfaceIPTableReply() api.Message { } // ClassifySetInterfaceL2Tables represents the VPP binary API message 'classify_set_interface_l2_tables'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 420: +// Generated from 'bin_api/vpe.api.json', line 409: // // ["classify_set_interface_l2_tables", // ["u16", "_vl_msg_id"], @@ -1679,7 +1643,7 @@ func NewClassifySetInterfaceL2Tables() api.Message { } // ClassifySetInterfaceL2TablesReply represents the VPP binary API message 'classify_set_interface_l2_tables_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 431: +// Generated from 'bin_api/vpe.api.json', line 420: // // ["classify_set_interface_l2_tables_reply", // ["u16", "_vl_msg_id"], @@ -1706,7 +1670,7 @@ func NewClassifySetInterfaceL2TablesReply() api.Message { } // GetNodeIndex represents the VPP binary API message 'get_node_index'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 437: +// Generated from 'bin_api/vpe.api.json', line 426: // // ["get_node_index", // ["u16", "_vl_msg_id"], @@ -1734,7 +1698,7 @@ func NewGetNodeIndex() api.Message { } // GetNodeIndexReply represents the VPP binary API message 'get_node_index_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 444: +// Generated from 'bin_api/vpe.api.json', line 433: // // ["get_node_index_reply", // ["u16", "_vl_msg_id"], @@ -1763,7 +1727,7 @@ func NewGetNodeIndexReply() api.Message { } // AddNodeNext represents the VPP binary API message 'add_node_next'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 451: +// Generated from 'bin_api/vpe.api.json', line 440: // // ["add_node_next", // ["u16", "_vl_msg_id"], @@ -1793,7 +1757,7 @@ func NewAddNodeNext() api.Message { } // AddNodeNextReply represents the VPP binary API message 'add_node_next_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 459: +// Generated from 'bin_api/vpe.api.json', line 448: // // ["add_node_next_reply", // ["u16", "_vl_msg_id"], @@ -1822,7 +1786,7 @@ func NewAddNodeNextReply() api.Message { } // L2InterfaceEfpFilter represents the VPP binary API message 'l2_interface_efp_filter'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 466: +// Generated from 'bin_api/vpe.api.json', line 455: // // ["l2_interface_efp_filter", // ["u16", "_vl_msg_id"], @@ -1852,7 +1816,7 @@ func NewL2InterfaceEfpFilter() api.Message { } // L2InterfaceEfpFilterReply represents the VPP binary API message 'l2_interface_efp_filter_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 474: +// Generated from 'bin_api/vpe.api.json', line 463: // // ["l2_interface_efp_filter_reply", // ["u16", "_vl_msg_id"], @@ -1879,7 +1843,7 @@ func NewL2InterfaceEfpFilterReply() api.Message { } // CreateSubif represents the VPP binary API message 'create_subif'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 480: +// Generated from 'bin_api/vpe.api.json', line 469: // // ["create_subif", // ["u16", "_vl_msg_id"], @@ -1929,7 +1893,7 @@ func NewCreateSubif() api.Message { } // CreateSubifReply represents the VPP binary API message 'create_subif_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 498: +// Generated from 'bin_api/vpe.api.json', line 487: // // ["create_subif_reply", // ["u16", "_vl_msg_id"], @@ -1958,7 +1922,7 @@ func NewCreateSubifReply() api.Message { } // ShowVersion represents the VPP binary API message 'show_version'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 505: +// Generated from 'bin_api/vpe.api.json', line 494: // // ["show_version", // ["u16", "_vl_msg_id"], @@ -1984,7 +1948,7 @@ func NewShowVersion() api.Message { } // ShowVersionReply represents the VPP binary API message 'show_version_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 511: +// Generated from 'bin_api/vpe.api.json', line 500: // // ["show_version_reply", // ["u16", "_vl_msg_id"], @@ -2019,7 +1983,7 @@ func NewShowVersionReply() api.Message { } // InterfaceNameRenumber represents the VPP binary API message 'interface_name_renumber'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 521: +// Generated from 'bin_api/vpe.api.json', line 510: // // ["interface_name_renumber", // ["u16", "_vl_msg_id"], @@ -2049,7 +2013,7 @@ func NewInterfaceNameRenumber() api.Message { } // InterfaceNameRenumberReply represents the VPP binary API message 'interface_name_renumber_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 529: +// Generated from 'bin_api/vpe.api.json', line 518: // // ["interface_name_renumber_reply", // ["u16", "_vl_msg_id"], @@ -2076,7 +2040,7 @@ func NewInterfaceNameRenumberReply() api.Message { } // WantIP4ArpEvents represents the VPP binary API message 'want_ip4_arp_events'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 535: +// Generated from 'bin_api/vpe.api.json', line 524: // // ["want_ip4_arp_events", // ["u16", "_vl_msg_id"], @@ -2108,7 +2072,7 @@ func NewWantIP4ArpEvents() api.Message { } // WantIP4ArpEventsReply represents the VPP binary API message 'want_ip4_arp_events_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 544: +// Generated from 'bin_api/vpe.api.json', line 533: // // ["want_ip4_arp_events_reply", // ["u16", "_vl_msg_id"], @@ -2135,7 +2099,7 @@ func NewWantIP4ArpEventsReply() api.Message { } // IP4ArpEvent represents the VPP binary API message 'ip4_arp_event'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 550: +// Generated from 'bin_api/vpe.api.json', line 539: // // ["ip4_arp_event", // ["u16", "_vl_msg_id"], @@ -2171,7 +2135,7 @@ func NewIP4ArpEvent() api.Message { } // WantIP6NdEvents represents the VPP binary API message 'want_ip6_nd_events'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 561: +// Generated from 'bin_api/vpe.api.json', line 550: // // ["want_ip6_nd_events", // ["u16", "_vl_msg_id"], @@ -2203,7 +2167,7 @@ func NewWantIP6NdEvents() api.Message { } // WantIP6NdEventsReply represents the VPP binary API message 'want_ip6_nd_events_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 570: +// Generated from 'bin_api/vpe.api.json', line 559: // // ["want_ip6_nd_events_reply", // ["u16", "_vl_msg_id"], @@ -2230,7 +2194,7 @@ func NewWantIP6NdEventsReply() api.Message { } // IP6NdEvent represents the VPP binary API message 'ip6_nd_event'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 576: +// Generated from 'bin_api/vpe.api.json', line 565: // // ["ip6_nd_event", // ["u16", "_vl_msg_id"], @@ -2266,7 +2230,7 @@ func NewIP6NdEvent() api.Message { } // InputACLSetInterface represents the VPP binary API message 'input_acl_set_interface'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 587: +// Generated from 'bin_api/vpe.api.json', line 576: // // ["input_acl_set_interface", // ["u16", "_vl_msg_id"], @@ -2302,7 +2266,7 @@ func NewInputACLSetInterface() api.Message { } // InputACLSetInterfaceReply represents the VPP binary API message 'input_acl_set_interface_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 598: +// Generated from 'bin_api/vpe.api.json', line 587: // // ["input_acl_set_interface_reply", // ["u16", "_vl_msg_id"], @@ -2329,7 +2293,7 @@ func NewInputACLSetInterfaceReply() api.Message { } // GetNodeGraph represents the VPP binary API message 'get_node_graph'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 604: +// Generated from 'bin_api/vpe.api.json', line 593: // // ["get_node_graph", // ["u16", "_vl_msg_id"], @@ -2355,7 +2319,7 @@ func NewGetNodeGraph() api.Message { } // GetNodeGraphReply represents the VPP binary API message 'get_node_graph_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 610: +// Generated from 'bin_api/vpe.api.json', line 599: // // ["get_node_graph_reply", // ["u16", "_vl_msg_id"], @@ -2384,7 +2348,7 @@ func NewGetNodeGraphReply() api.Message { } // IoamEnable represents the VPP binary API message 'ioam_enable'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 617: +// Generated from 'bin_api/vpe.api.json', line 606: // // ["ioam_enable", // ["u16", "_vl_msg_id"], @@ -2422,7 +2386,7 @@ func NewIoamEnable() api.Message { } // IoamEnableReply represents the VPP binary API message 'ioam_enable_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 629: +// Generated from 'bin_api/vpe.api.json', line 618: // // ["ioam_enable_reply", // ["u16", "_vl_msg_id"], @@ -2449,7 +2413,7 @@ func NewIoamEnableReply() api.Message { } // IoamDisable represents the VPP binary API message 'ioam_disable'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 635: +// Generated from 'bin_api/vpe.api.json', line 624: // // ["ioam_disable", // ["u16", "_vl_msg_id"], @@ -2477,7 +2441,7 @@ func NewIoamDisable() api.Message { } // IoamDisableReply represents the VPP binary API message 'ioam_disable_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 642: +// Generated from 'bin_api/vpe.api.json', line 631: // // ["ioam_disable_reply", // ["u16", "_vl_msg_id"], @@ -2504,7 +2468,7 @@ func NewIoamDisableReply() api.Message { } // GetNextIndex represents the VPP binary API message 'get_next_index'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 648: +// Generated from 'bin_api/vpe.api.json', line 637: // // ["get_next_index", // ["u16", "_vl_msg_id"], @@ -2534,7 +2498,7 @@ func NewGetNextIndex() api.Message { } // GetNextIndexReply represents the VPP binary API message 'get_next_index_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 656: +// Generated from 'bin_api/vpe.api.json', line 645: // // ["get_next_index_reply", // ["u16", "_vl_msg_id"], @@ -2563,7 +2527,7 @@ func NewGetNextIndexReply() api.Message { } // PgCreateInterface represents the VPP binary API message 'pg_create_interface'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 663: +// Generated from 'bin_api/vpe.api.json', line 652: // // ["pg_create_interface", // ["u16", "_vl_msg_id"], @@ -2591,7 +2555,7 @@ func NewPgCreateInterface() api.Message { } // PgCreateInterfaceReply represents the VPP binary API message 'pg_create_interface_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 670: +// Generated from 'bin_api/vpe.api.json', line 659: // // ["pg_create_interface_reply", // ["u16", "_vl_msg_id"], @@ -2620,7 +2584,7 @@ func NewPgCreateInterfaceReply() api.Message { } // PgCapture represents the VPP binary API message 'pg_capture'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 677: +// Generated from 'bin_api/vpe.api.json', line 666: // // ["pg_capture", // ["u16", "_vl_msg_id"], @@ -2656,7 +2620,7 @@ func NewPgCapture() api.Message { } // PgCaptureReply represents the VPP binary API message 'pg_capture_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 688: +// Generated from 'bin_api/vpe.api.json', line 677: // // ["pg_capture_reply", // ["u16", "_vl_msg_id"], @@ -2683,7 +2647,7 @@ func NewPgCaptureReply() api.Message { } // PgEnableDisable represents the VPP binary API message 'pg_enable_disable'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 694: +// Generated from 'bin_api/vpe.api.json', line 683: // // ["pg_enable_disable", // ["u16", "_vl_msg_id"], @@ -2715,7 +2679,7 @@ func NewPgEnableDisable() api.Message { } // PgEnableDisableReply represents the VPP binary API message 'pg_enable_disable_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 703: +// Generated from 'bin_api/vpe.api.json', line 692: // // ["pg_enable_disable_reply", // ["u16", "_vl_msg_id"], @@ -2742,7 +2706,7 @@ func NewPgEnableDisableReply() api.Message { } // IPSourceAndPortRangeCheckAddDel represents the VPP binary API message 'ip_source_and_port_range_check_add_del'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 709: +// Generated from 'bin_api/vpe.api.json', line 698: // // ["ip_source_and_port_range_check_add_del", // ["u16", "_vl_msg_id"], @@ -2784,7 +2748,7 @@ func NewIPSourceAndPortRangeCheckAddDel() api.Message { } // IPSourceAndPortRangeCheckAddDelReply represents the VPP binary API message 'ip_source_and_port_range_check_add_del_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 723: +// Generated from 'bin_api/vpe.api.json', line 712: // // ["ip_source_and_port_range_check_add_del_reply", // ["u16", "_vl_msg_id"], @@ -2811,7 +2775,7 @@ func NewIPSourceAndPortRangeCheckAddDelReply() api.Message { } // IPSourceAndPortRangeCheckInterfaceAddDel represents the VPP binary API message 'ip_source_and_port_range_check_interface_add_del'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 729: +// Generated from 'bin_api/vpe.api.json', line 718: // // ["ip_source_and_port_range_check_interface_add_del", // ["u16", "_vl_msg_id"], @@ -2849,7 +2813,7 @@ func NewIPSourceAndPortRangeCheckInterfaceAddDel() api.Message { } // IPSourceAndPortRangeCheckInterfaceAddDelReply represents the VPP binary API message 'ip_source_and_port_range_check_interface_add_del_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 741: +// Generated from 'bin_api/vpe.api.json', line 730: // // ["ip_source_and_port_range_check_interface_add_del_reply", // ["u16", "_vl_msg_id"], @@ -2876,7 +2840,7 @@ func NewIPSourceAndPortRangeCheckInterfaceAddDelReply() api.Message { } // DeleteSubif represents the VPP binary API message 'delete_subif'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 747: +// Generated from 'bin_api/vpe.api.json', line 736: // // ["delete_subif", // ["u16", "_vl_msg_id"], @@ -2904,7 +2868,7 @@ func NewDeleteSubif() api.Message { } // DeleteSubifReply represents the VPP binary API message 'delete_subif_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 754: +// Generated from 'bin_api/vpe.api.json', line 743: // // ["delete_subif_reply", // ["u16", "_vl_msg_id"], @@ -2931,7 +2895,7 @@ func NewDeleteSubifReply() api.Message { } // Punt represents the VPP binary API message 'punt'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 760: +// Generated from 'bin_api/vpe.api.json', line 749: // // ["punt", // ["u16", "_vl_msg_id"], @@ -2965,7 +2929,7 @@ func NewPunt() api.Message { } // PuntReply represents the VPP binary API message 'punt_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 770: +// Generated from 'bin_api/vpe.api.json', line 759: // // ["punt_reply", // ["u16", "_vl_msg_id"], @@ -2992,7 +2956,7 @@ func NewPuntReply() api.Message { } // FeatureEnableDisable represents the VPP binary API message 'feature_enable_disable'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 776: +// Generated from 'bin_api/vpe.api.json', line 765: // // ["feature_enable_disable", // ["u16", "_vl_msg_id"], @@ -3026,7 +2990,7 @@ func NewFeatureEnableDisable() api.Message { } // FeatureEnableDisableReply represents the VPP binary API message 'feature_enable_disable_reply'. -// Generated from '/usr/share/vpp/api/vpe.api.json', line 786: +// Generated from 'bin_api/vpe.api.json', line 775: // // ["feature_enable_disable_reply", // ["u16", "_vl_msg_id"], diff --git a/core/core.go b/core/core.go index 2484c81..8977902 100644 --- a/core/core.go +++ b/core/core.go @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:generate binapi-generator --input-dir=bin_api --output-dir=bin_api + package core import ( diff --git a/examples/bin_api/acl.api.json b/examples/bin_api/acl.api.json index 1c2e2bf..431f623 100644 --- a/examples/bin_api/acl.api.json +++ b/examples/bin_api/acl.api.json @@ -40,6 +40,20 @@ ["u32", "minor"], {"crc" : "0x43eb59a5"} ], + ["acl_plugin_control_ping", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + {"crc" : "0xfc22c86e"} + ], + ["acl_plugin_control_ping_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + ["u32", "client_index"], + ["u32", "vpe_pid"], + {"crc" : "0xe07e9231"} + ], ["acl_add_replace", ["u16", "_vl_msg_id"], ["u32", "client_index"], @@ -208,5 +222,5 @@ {"crc" : "0x6c86a56c"} ] ], -"vl_api_version" :"0x3cd02d84" +"vl_api_version" :"0x1fd77287" } diff --git a/examples/bin_api/acl/acl.go b/examples/bin_api/acl/acl.go index e13fb18..accdd3f 100644 --- a/examples/bin_api/acl/acl.go +++ b/examples/bin_api/acl/acl.go @@ -1,11 +1,11 @@ // Package acl represents the VPP binary API of the 'acl' VPP module. -// DO NOT EDIT. Generated from 'bin_api/acl.api.json' on Thu, 04 May 2017 13:11:57 CEST. +// DO NOT EDIT. Generated from 'bin_api/acl.api.json' package acl import "git.fd.io/govpp.git/api" // VlApiVersion contains version of the API. -const VlAPIVersion = 0x3cd02d84 +const VlAPIVersion = 0x1fd77287 // ACLRule represents the VPP binary API data type 'acl_rule'. // Generated from 'bin_api/acl.api.json', line 3: @@ -134,9 +134,66 @@ func NewACLPluginGetVersionReply() api.Message { return &ACLPluginGetVersionReply{} } -// ACLAddReplace represents the VPP binary API message 'acl_add_replace'. +// ACLPluginControlPing represents the VPP binary API message 'acl_plugin_control_ping'. // Generated from 'bin_api/acl.api.json', line 43: // +// ["acl_plugin_control_ping", +// ["u16", "_vl_msg_id"], +// ["u32", "client_index"], +// ["u32", "context"], +// {"crc" : "0xfc22c86e"} +// ], +// +type ACLPluginControlPing struct { +} + +func (*ACLPluginControlPing) GetMessageName() string { + return "acl_plugin_control_ping" +} +func (*ACLPluginControlPing) GetMessageType() api.MessageType { + return api.RequestMessage +} +func (*ACLPluginControlPing) GetCrcString() string { + return "fc22c86e" +} +func NewACLPluginControlPing() api.Message { + return &ACLPluginControlPing{} +} + +// ACLPluginControlPingReply represents the VPP binary API message 'acl_plugin_control_ping_reply'. +// Generated from 'bin_api/acl.api.json', line 49: +// +// ["acl_plugin_control_ping_reply", +// ["u16", "_vl_msg_id"], +// ["u32", "context"], +// ["i32", "retval"], +// ["u32", "client_index"], +// ["u32", "vpe_pid"], +// {"crc" : "0xe07e9231"} +// ], +// +type ACLPluginControlPingReply struct { + Retval int32 + ClientIndex uint32 + VpePid uint32 +} + +func (*ACLPluginControlPingReply) GetMessageName() string { + return "acl_plugin_control_ping_reply" +} +func (*ACLPluginControlPingReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func (*ACLPluginControlPingReply) GetCrcString() string { + return "e07e9231" +} +func NewACLPluginControlPingReply() api.Message { + return &ACLPluginControlPingReply{} +} + +// ACLAddReplace represents the VPP binary API message 'acl_add_replace'. +// Generated from 'bin_api/acl.api.json', line 57: +// // ["acl_add_replace", // ["u16", "_vl_msg_id"], // ["u32", "client_index"], @@ -169,7 +226,7 @@ func NewACLAddReplace() api.Message { } // ACLAddReplaceReply represents the VPP binary API message 'acl_add_replace_reply'. -// Generated from 'bin_api/acl.api.json', line 53: +// Generated from 'bin_api/acl.api.json', line 67: // // ["acl_add_replace_reply", // ["u16", "_vl_msg_id"], @@ -198,7 +255,7 @@ func NewACLAddReplaceReply() api.Message { } // ACLDel represents the VPP binary API message 'acl_del'. -// Generated from 'bin_api/acl.api.json', line 60: +// Generated from 'bin_api/acl.api.json', line 74: // // ["acl_del", // ["u16", "_vl_msg_id"], @@ -226,7 +283,7 @@ func NewACLDel() api.Message { } // ACLDelReply represents the VPP binary API message 'acl_del_reply'. -// Generated from 'bin_api/acl.api.json', line 67: +// Generated from 'bin_api/acl.api.json', line 81: // // ["acl_del_reply", // ["u16", "_vl_msg_id"], @@ -253,7 +310,7 @@ func NewACLDelReply() api.Message { } // ACLInterfaceAddDel represents the VPP binary API message 'acl_interface_add_del'. -// Generated from 'bin_api/acl.api.json', line 73: +// Generated from 'bin_api/acl.api.json', line 87: // // ["acl_interface_add_del", // ["u16", "_vl_msg_id"], @@ -287,7 +344,7 @@ func NewACLInterfaceAddDel() api.Message { } // ACLInterfaceAddDelReply represents the VPP binary API message 'acl_interface_add_del_reply'. -// Generated from 'bin_api/acl.api.json', line 83: +// Generated from 'bin_api/acl.api.json', line 97: // // ["acl_interface_add_del_reply", // ["u16", "_vl_msg_id"], @@ -314,7 +371,7 @@ func NewACLInterfaceAddDelReply() api.Message { } // ACLInterfaceSetACLList represents the VPP binary API message 'acl_interface_set_acl_list'. -// Generated from 'bin_api/acl.api.json', line 89: +// Generated from 'bin_api/acl.api.json', line 103: // // ["acl_interface_set_acl_list", // ["u16", "_vl_msg_id"], @@ -348,7 +405,7 @@ func NewACLInterfaceSetACLList() api.Message { } // ACLInterfaceSetACLListReply represents the VPP binary API message 'acl_interface_set_acl_list_reply'. -// Generated from 'bin_api/acl.api.json', line 99: +// Generated from 'bin_api/acl.api.json', line 113: // // ["acl_interface_set_acl_list_reply", // ["u16", "_vl_msg_id"], @@ -375,7 +432,7 @@ func NewACLInterfaceSetACLListReply() api.Message { } // ACLDump represents the VPP binary API message 'acl_dump'. -// Generated from 'bin_api/acl.api.json', line 105: +// Generated from 'bin_api/acl.api.json', line 119: // // ["acl_dump", // ["u16", "_vl_msg_id"], @@ -403,7 +460,7 @@ func NewACLDump() api.Message { } // ACLDetails represents the VPP binary API message 'acl_details'. -// Generated from 'bin_api/acl.api.json', line 112: +// Generated from 'bin_api/acl.api.json', line 126: // // ["acl_details", // ["u16", "_vl_msg_id"], @@ -436,7 +493,7 @@ func NewACLDetails() api.Message { } // ACLInterfaceListDump represents the VPP binary API message 'acl_interface_list_dump'. -// Generated from 'bin_api/acl.api.json', line 121: +// Generated from 'bin_api/acl.api.json', line 135: // // ["acl_interface_list_dump", // ["u16", "_vl_msg_id"], @@ -464,7 +521,7 @@ func NewACLInterfaceListDump() api.Message { } // ACLInterfaceListDetails represents the VPP binary API message 'acl_interface_list_details'. -// Generated from 'bin_api/acl.api.json', line 128: +// Generated from 'bin_api/acl.api.json', line 142: // // ["acl_interface_list_details", // ["u16", "_vl_msg_id"], @@ -497,7 +554,7 @@ func NewACLInterfaceListDetails() api.Message { } // MacipACLAdd represents the VPP binary API message 'macip_acl_add'. -// Generated from 'bin_api/acl.api.json', line 137: +// Generated from 'bin_api/acl.api.json', line 151: // // ["macip_acl_add", // ["u16", "_vl_msg_id"], @@ -529,7 +586,7 @@ func NewMacipACLAdd() api.Message { } // MacipACLAddReply represents the VPP binary API message 'macip_acl_add_reply'. -// Generated from 'bin_api/acl.api.json', line 146: +// Generated from 'bin_api/acl.api.json', line 160: // // ["macip_acl_add_reply", // ["u16", "_vl_msg_id"], @@ -558,7 +615,7 @@ func NewMacipACLAddReply() api.Message { } // MacipACLDel represents the VPP binary API message 'macip_acl_del'. -// Generated from 'bin_api/acl.api.json', line 153: +// Generated from 'bin_api/acl.api.json', line 167: // // ["macip_acl_del", // ["u16", "_vl_msg_id"], @@ -586,7 +643,7 @@ func NewMacipACLDel() api.Message { } // MacipACLDelReply represents the VPP binary API message 'macip_acl_del_reply'. -// Generated from 'bin_api/acl.api.json', line 160: +// Generated from 'bin_api/acl.api.json', line 174: // // ["macip_acl_del_reply", // ["u16", "_vl_msg_id"], @@ -613,7 +670,7 @@ func NewMacipACLDelReply() api.Message { } // MacipACLInterfaceAddDel represents the VPP binary API message 'macip_acl_interface_add_del'. -// Generated from 'bin_api/acl.api.json', line 166: +// Generated from 'bin_api/acl.api.json', line 180: // // ["macip_acl_interface_add_del", // ["u16", "_vl_msg_id"], @@ -645,7 +702,7 @@ func NewMacipACLInterfaceAddDel() api.Message { } // MacipACLInterfaceAddDelReply represents the VPP binary API message 'macip_acl_interface_add_del_reply'. -// Generated from 'bin_api/acl.api.json', line 175: +// Generated from 'bin_api/acl.api.json', line 189: // // ["macip_acl_interface_add_del_reply", // ["u16", "_vl_msg_id"], @@ -672,7 +729,7 @@ func NewMacipACLInterfaceAddDelReply() api.Message { } // MacipACLDump represents the VPP binary API message 'macip_acl_dump'. -// Generated from 'bin_api/acl.api.json', line 181: +// Generated from 'bin_api/acl.api.json', line 195: // // ["macip_acl_dump", // ["u16", "_vl_msg_id"], @@ -700,7 +757,7 @@ func NewMacipACLDump() api.Message { } // MacipACLDetails represents the VPP binary API message 'macip_acl_details'. -// Generated from 'bin_api/acl.api.json', line 188: +// Generated from 'bin_api/acl.api.json', line 202: // // ["macip_acl_details", // ["u16", "_vl_msg_id"], @@ -733,7 +790,7 @@ func NewMacipACLDetails() api.Message { } // MacipACLInterfaceGet represents the VPP binary API message 'macip_acl_interface_get'. -// Generated from 'bin_api/acl.api.json', line 197: +// Generated from 'bin_api/acl.api.json', line 211: // // ["macip_acl_interface_get", // ["u16", "_vl_msg_id"], @@ -759,7 +816,7 @@ func NewMacipACLInterfaceGet() api.Message { } // MacipACLInterfaceGetReply represents the VPP binary API message 'macip_acl_interface_get_reply'. -// Generated from 'bin_api/acl.api.json', line 203: +// Generated from 'bin_api/acl.api.json', line 217: // // ["macip_acl_interface_get_reply", // ["u16", "_vl_msg_id"], diff --git a/examples/bin_api/af_packet.api.json b/examples/bin_api/af_packet.api.json index 211fc3e..b0c8e7d 100644 --- a/examples/bin_api/af_packet.api.json +++ b/examples/bin_api/af_packet.api.json @@ -33,5 +33,5 @@ {"crc" : "0x1a80431a"} ] ], -"vl_api_version" :"0x4ca71f33" +"vl_api_version" :"0xd4ce9f85" } diff --git a/examples/bin_api/af_packet/af_packet.go b/examples/bin_api/af_packet/af_packet.go index c8b60f9..58db69d 100644 --- a/examples/bin_api/af_packet/af_packet.go +++ b/examples/bin_api/af_packet/af_packet.go @@ -1,11 +1,11 @@ // Package af_packet represents the VPP binary API of the 'af_packet' VPP module. -// DO NOT EDIT. Generated from 'bin_api/af_packet.api.json' on Thu, 04 May 2017 13:11:57 CEST. +// DO NOT EDIT. Generated from 'bin_api/af_packet.api.json' package af_packet import "git.fd.io/govpp.git/api" // VlApiVersion contains version of the API. -const VlAPIVersion = 0x4ca71f33 +const VlAPIVersion = 0xd4ce9f85 // AfPacketCreate represents the VPP binary API message 'af_packet_create'. // Generated from 'bin_api/af_packet.api.json', line 6: diff --git a/examples/bin_api/interface.api.json b/examples/bin_api/interface.api.json index 81f81bd..21511fa 100644 --- a/examples/bin_api/interface.api.json +++ b/examples/bin_api/interface.api.json @@ -1,6 +1,10 @@ { "types" : [ - + ["vlib_counter", + ["u64", "packets"], + ["u64", "bytes"], + {"crc" : "0x62db67f0"} + ] ], "messages" : [ ["sw_interface_set_flags", @@ -138,14 +142,21 @@ ["u32", "vrf_id"], {"crc" : "0xab44111d"} ], - ["vnet_interface_counters", + ["vnet_interface_simple_counters", + ["u16", "_vl_msg_id"], + ["u8", "vnet_counter_type"], + ["u32", "first_sw_if_index"], + ["u32", "count"], + ["u64", "data", 0, "count"], + {"crc" : "0x302f0983"} + ], + ["vnet_interface_combined_counters", ["u16", "_vl_msg_id"], ["u8", "vnet_counter_type"], - ["u8", "is_combined"], ["u32", "first_sw_if_index"], ["u32", "count"], - ["u8", "data", 0, "count"], - {"crc" : "0x312082b4"} + ["vl_api_vlib_counter_t", "data", 0, "count"], + {"crc" : "0xd82426e3"} ], ["sw_interface_set_unnumbered", ["u16", "_vl_msg_id"], @@ -189,7 +200,21 @@ ["u32", "context"], ["i32", "retval"], {"crc" : "0x761cbcb0"} + ], + ["sw_interface_set_mac_address", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u32", "sw_if_index"], + ["u8", "mac_address", 6], + {"crc" : "0xe4f22660"} + ], + ["sw_interface_set_mac_address_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + {"crc" : "0x9dc8a452"} ] ], -"vl_api_version" :"0x6857f668" +"vl_api_version" :"0xcdfdf626" } diff --git a/examples/bin_api/interfaces/interfaces.go b/examples/bin_api/interfaces/interfaces.go index a83b517..7d89f09 100644 --- a/examples/bin_api/interfaces/interfaces.go +++ b/examples/bin_api/interfaces/interfaces.go @@ -1,14 +1,35 @@ // Package interfaces represents the VPP binary API of the 'interfaces' VPP module. -// DO NOT EDIT. Generated from 'bin_api/interface.api.json' on Thu, 04 May 2017 13:11:57 CEST. +// DO NOT EDIT. Generated from 'bin_api/interface.api.json' package interfaces import "git.fd.io/govpp.git/api" // VlApiVersion contains version of the API. -const VlAPIVersion = 0x6857f668 +const VlAPIVersion = 0xcdfdf626 + +// VlibCounter represents the VPP binary API data type 'vlib_counter'. +// Generated from 'bin_api/interface.api.json', line 3: +// +// ["vlib_counter", +// ["u64", "packets"], +// ["u64", "bytes"], +// {"crc" : "0x62db67f0"} +// ] +// +type VlibCounter struct { + Packets uint64 + Bytes uint64 +} + +func (*VlibCounter) GetTypeName() string { + return "vlib_counter" +} +func (*VlibCounter) GetCrcString() string { + return "62db67f0" +} // SwInterfaceSetFlags represents the VPP binary API message 'sw_interface_set_flags'. -// Generated from 'bin_api/interface.api.json', line 6: +// Generated from 'bin_api/interface.api.json', line 10: // // ["sw_interface_set_flags", // ["u16", "_vl_msg_id"], @@ -42,7 +63,7 @@ func NewSwInterfaceSetFlags() api.Message { } // SwInterfaceSetFlagsReply represents the VPP binary API message 'sw_interface_set_flags_reply'. -// Generated from 'bin_api/interface.api.json', line 16: +// Generated from 'bin_api/interface.api.json', line 20: // // ["sw_interface_set_flags_reply", // ["u16", "_vl_msg_id"], @@ -69,7 +90,7 @@ func NewSwInterfaceSetFlagsReply() api.Message { } // SwInterfaceSetMtu represents the VPP binary API message 'sw_interface_set_mtu'. -// Generated from 'bin_api/interface.api.json', line 22: +// Generated from 'bin_api/interface.api.json', line 26: // // ["sw_interface_set_mtu", // ["u16", "_vl_msg_id"], @@ -99,7 +120,7 @@ func NewSwInterfaceSetMtu() api.Message { } // SwInterfaceSetMtuReply represents the VPP binary API message 'sw_interface_set_mtu_reply'. -// Generated from 'bin_api/interface.api.json', line 30: +// Generated from 'bin_api/interface.api.json', line 34: // // ["sw_interface_set_mtu_reply", // ["u16", "_vl_msg_id"], @@ -126,7 +147,7 @@ func NewSwInterfaceSetMtuReply() api.Message { } // WantInterfaceEvents represents the VPP binary API message 'want_interface_events'. -// Generated from 'bin_api/interface.api.json', line 36: +// Generated from 'bin_api/interface.api.json', line 40: // // ["want_interface_events", // ["u16", "_vl_msg_id"], @@ -156,7 +177,7 @@ func NewWantInterfaceEvents() api.Message { } // WantInterfaceEventsReply represents the VPP binary API message 'want_interface_events_reply'. -// Generated from 'bin_api/interface.api.json', line 44: +// Generated from 'bin_api/interface.api.json', line 48: // // ["want_interface_events_reply", // ["u16", "_vl_msg_id"], @@ -183,7 +204,7 @@ func NewWantInterfaceEventsReply() api.Message { } // SwInterfaceDetails represents the VPP binary API message 'sw_interface_details'. -// Generated from 'bin_api/interface.api.json', line 50: +// Generated from 'bin_api/interface.api.json', line 54: // // ["sw_interface_details", // ["u16", "_vl_msg_id"], @@ -268,7 +289,7 @@ func NewSwInterfaceDetails() api.Message { } // SwInterfaceDump represents the VPP binary API message 'sw_interface_dump'. -// Generated from 'bin_api/interface.api.json', line 85: +// Generated from 'bin_api/interface.api.json', line 89: // // ["sw_interface_dump", // ["u16", "_vl_msg_id"], @@ -298,7 +319,7 @@ func NewSwInterfaceDump() api.Message { } // SwInterfaceAddDelAddress represents the VPP binary API message 'sw_interface_add_del_address'. -// Generated from 'bin_api/interface.api.json', line 93: +// Generated from 'bin_api/interface.api.json', line 97: // // ["sw_interface_add_del_address", // ["u16", "_vl_msg_id"], @@ -336,7 +357,7 @@ func NewSwInterfaceAddDelAddress() api.Message { } // SwInterfaceAddDelAddressReply represents the VPP binary API message 'sw_interface_add_del_address_reply'. -// Generated from 'bin_api/interface.api.json', line 105: +// Generated from 'bin_api/interface.api.json', line 109: // // ["sw_interface_add_del_address_reply", // ["u16", "_vl_msg_id"], @@ -363,7 +384,7 @@ func NewSwInterfaceAddDelAddressReply() api.Message { } // SwInterfaceSetTable represents the VPP binary API message 'sw_interface_set_table'. -// Generated from 'bin_api/interface.api.json', line 111: +// Generated from 'bin_api/interface.api.json', line 115: // // ["sw_interface_set_table", // ["u16", "_vl_msg_id"], @@ -395,7 +416,7 @@ func NewSwInterfaceSetTable() api.Message { } // SwInterfaceSetTableReply represents the VPP binary API message 'sw_interface_set_table_reply'. -// Generated from 'bin_api/interface.api.json', line 120: +// Generated from 'bin_api/interface.api.json', line 124: // // ["sw_interface_set_table_reply", // ["u16", "_vl_msg_id"], @@ -422,7 +443,7 @@ func NewSwInterfaceSetTableReply() api.Message { } // SwInterfaceGetTable represents the VPP binary API message 'sw_interface_get_table'. -// Generated from 'bin_api/interface.api.json', line 126: +// Generated from 'bin_api/interface.api.json', line 130: // // ["sw_interface_get_table", // ["u16", "_vl_msg_id"], @@ -452,7 +473,7 @@ func NewSwInterfaceGetTable() api.Message { } // SwInterfaceGetTableReply represents the VPP binary API message 'sw_interface_get_table_reply'. -// Generated from 'bin_api/interface.api.json', line 134: +// Generated from 'bin_api/interface.api.json', line 138: // // ["sw_interface_get_table_reply", // ["u16", "_vl_msg_id"], @@ -480,42 +501,72 @@ func NewSwInterfaceGetTableReply() api.Message { return &SwInterfaceGetTableReply{} } -// VnetInterfaceCounters represents the VPP binary API message 'vnet_interface_counters'. -// Generated from 'bin_api/interface.api.json', line 141: +// VnetInterfaceSimpleCounters represents the VPP binary API message 'vnet_interface_simple_counters'. +// Generated from 'bin_api/interface.api.json', line 145: // -// ["vnet_interface_counters", +// ["vnet_interface_simple_counters", // ["u16", "_vl_msg_id"], // ["u8", "vnet_counter_type"], -// ["u8", "is_combined"], // ["u32", "first_sw_if_index"], // ["u32", "count"], -// ["u8", "data", 0, "count"], -// {"crc" : "0x312082b4"} +// ["u64", "data", 0, "count"], +// {"crc" : "0x302f0983"} // ], // -type VnetInterfaceCounters struct { +type VnetInterfaceSimpleCounters struct { VnetCounterType uint8 - IsCombined uint8 FirstSwIfIndex uint32 Count uint32 `struc:"sizeof=Data"` - Data []byte + Data []uint64 } -func (*VnetInterfaceCounters) GetMessageName() string { - return "vnet_interface_counters" +func (*VnetInterfaceSimpleCounters) GetMessageName() string { + return "vnet_interface_simple_counters" } -func (*VnetInterfaceCounters) GetMessageType() api.MessageType { +func (*VnetInterfaceSimpleCounters) GetMessageType() api.MessageType { return api.OtherMessage } -func (*VnetInterfaceCounters) GetCrcString() string { - return "312082b4" +func (*VnetInterfaceSimpleCounters) GetCrcString() string { + return "302f0983" } -func NewVnetInterfaceCounters() api.Message { - return &VnetInterfaceCounters{} +func NewVnetInterfaceSimpleCounters() api.Message { + return &VnetInterfaceSimpleCounters{} +} + +// VnetInterfaceCombinedCounters represents the VPP binary API message 'vnet_interface_combined_counters'. +// Generated from 'bin_api/interface.api.json', line 153: +// +// ["vnet_interface_combined_counters", +// ["u16", "_vl_msg_id"], +// ["u8", "vnet_counter_type"], +// ["u32", "first_sw_if_index"], +// ["u32", "count"], +// ["vl_api_vlib_counter_t", "data", 0, "count"], +// {"crc" : "0xd82426e3"} +// ], +// +type VnetInterfaceCombinedCounters struct { + VnetCounterType uint8 + FirstSwIfIndex uint32 + Count uint32 `struc:"sizeof=Data"` + Data []VlibCounter +} + +func (*VnetInterfaceCombinedCounters) GetMessageName() string { + return "vnet_interface_combined_counters" +} +func (*VnetInterfaceCombinedCounters) GetMessageType() api.MessageType { + return api.OtherMessage +} +func (*VnetInterfaceCombinedCounters) GetCrcString() string { + return "d82426e3" +} +func NewVnetInterfaceCombinedCounters() api.Message { + return &VnetInterfaceCombinedCounters{} } // SwInterfaceSetUnnumbered represents the VPP binary API message 'sw_interface_set_unnumbered'. -// Generated from 'bin_api/interface.api.json', line 150: +// Generated from 'bin_api/interface.api.json', line 161: // // ["sw_interface_set_unnumbered", // ["u16", "_vl_msg_id"], @@ -547,7 +598,7 @@ func NewSwInterfaceSetUnnumbered() api.Message { } // SwInterfaceSetUnnumberedReply represents the VPP binary API message 'sw_interface_set_unnumbered_reply'. -// Generated from 'bin_api/interface.api.json', line 159: +// Generated from 'bin_api/interface.api.json', line 170: // // ["sw_interface_set_unnumbered_reply", // ["u16", "_vl_msg_id"], @@ -574,7 +625,7 @@ func NewSwInterfaceSetUnnumberedReply() api.Message { } // SwInterfaceClearStats represents the VPP binary API message 'sw_interface_clear_stats'. -// Generated from 'bin_api/interface.api.json', line 165: +// Generated from 'bin_api/interface.api.json', line 176: // // ["sw_interface_clear_stats", // ["u16", "_vl_msg_id"], @@ -602,7 +653,7 @@ func NewSwInterfaceClearStats() api.Message { } // SwInterfaceClearStatsReply represents the VPP binary API message 'sw_interface_clear_stats_reply'. -// Generated from 'bin_api/interface.api.json', line 172: +// Generated from 'bin_api/interface.api.json', line 183: // // ["sw_interface_clear_stats_reply", // ["u16", "_vl_msg_id"], @@ -629,7 +680,7 @@ func NewSwInterfaceClearStatsReply() api.Message { } // SwInterfaceTagAddDel represents the VPP binary API message 'sw_interface_tag_add_del'. -// Generated from 'bin_api/interface.api.json', line 178: +// Generated from 'bin_api/interface.api.json', line 189: // // ["sw_interface_tag_add_del", // ["u16", "_vl_msg_id"], @@ -661,14 +712,14 @@ func NewSwInterfaceTagAddDel() api.Message { } // SwInterfaceTagAddDelReply represents the VPP binary API message 'sw_interface_tag_add_del_reply'. -// Generated from 'bin_api/interface.api.json', line 187: +// Generated from 'bin_api/interface.api.json', line 198: // // ["sw_interface_tag_add_del_reply", // ["u16", "_vl_msg_id"], // ["u32", "context"], // ["i32", "retval"], // {"crc" : "0x761cbcb0"} -// ] +// ], // type SwInterfaceTagAddDelReply struct { Retval int32 @@ -686,3 +737,60 @@ func (*SwInterfaceTagAddDelReply) GetCrcString() string { func NewSwInterfaceTagAddDelReply() api.Message { return &SwInterfaceTagAddDelReply{} } + +// SwInterfaceSetMacAddress represents the VPP binary API message 'sw_interface_set_mac_address'. +// Generated from 'bin_api/interface.api.json', line 204: +// +// ["sw_interface_set_mac_address", +// ["u16", "_vl_msg_id"], +// ["u32", "client_index"], +// ["u32", "context"], +// ["u32", "sw_if_index"], +// ["u8", "mac_address", 6], +// {"crc" : "0xe4f22660"} +// ], +// +type SwInterfaceSetMacAddress struct { + SwIfIndex uint32 + MacAddress []byte `struc:"[6]byte"` +} + +func (*SwInterfaceSetMacAddress) GetMessageName() string { + return "sw_interface_set_mac_address" +} +func (*SwInterfaceSetMacAddress) GetMessageType() api.MessageType { + return api.RequestMessage +} +func (*SwInterfaceSetMacAddress) GetCrcString() string { + return "e4f22660" +} +func NewSwInterfaceSetMacAddress() api.Message { + return &SwInterfaceSetMacAddress{} +} + +// SwInterfaceSetMacAddressReply represents the VPP binary API message 'sw_interface_set_mac_address_reply'. +// Generated from 'bin_api/interface.api.json', line 212: +// +// ["sw_interface_set_mac_address_reply", +// ["u16", "_vl_msg_id"], +// ["u32", "context"], +// ["i32", "retval"], +// {"crc" : "0x9dc8a452"} +// ] +// +type SwInterfaceSetMacAddressReply struct { + Retval int32 +} + +func (*SwInterfaceSetMacAddressReply) GetMessageName() string { + return "sw_interface_set_mac_address_reply" +} +func (*SwInterfaceSetMacAddressReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func (*SwInterfaceSetMacAddressReply) GetCrcString() string { + return "9dc8a452" +} +func NewSwInterfaceSetMacAddressReply() api.Message { + return &SwInterfaceSetMacAddressReply{} +} diff --git a/examples/bin_api/ip.api.json b/examples/bin_api/ip.api.json index 970ec4b..805e56f 100644 --- a/examples/bin_api/ip.api.json +++ b/examples/bin_api/ip.api.json @@ -66,14 +66,14 @@ ["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", "is_no_adj_fib"], ["u8", "mac_address", 6], ["u8", "dst_address", 16], - {"crc" : "0x66f2112c"} + {"crc" : "0x5a0d070b"} ], ["ip_neighbor_add_del_reply", ["u16", "_vl_msg_id"], @@ -150,6 +150,35 @@ ["i32", "retval"], {"crc" : "0x8050adb3"} ], + ["ip6nd_proxy_add_del", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u32", "sw_if_index"], + ["u8", "is_del"], + ["u8", "address", 16], + {"crc" : "0xc56f802d"} + ], + ["ip6nd_proxy_add_del_reply", + ["u16", "_vl_msg_id"], + ["u32", "context"], + ["i32", "retval"], + {"crc" : "0x00ddc2d5"} + ], + ["ip6nd_proxy_details", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + ["u32", "sw_if_index"], + ["u8", "address", 16], + {"crc" : "0xf805ccc1"} + ], + ["ip6nd_proxy_dump", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + {"crc" : "0x21597d88"} + ], ["sw_interface_ip6_enable_disable", ["u16", "_vl_msg_id"], ["u32", "client_index"], @@ -221,6 +250,7 @@ ["u32", "table_id"], ["u32", "entry_flags"], ["u32", "itf_flags"], + ["u32", "rpf_id"], ["u16", "grp_address_length"], ["u8", "create_vrf_if_needed"], ["u8", "is_add"], @@ -228,7 +258,7 @@ ["u8", "is_local"], ["u8", "grp_address", 16], ["u8", "src_address", 16], - {"crc" : "0x8312830f"} + {"crc" : "0x8f5f21a8"} ], ["ip_mroute_add_del_reply", ["u16", "_vl_msg_id"], @@ -236,6 +266,42 @@ ["i32", "retval"], {"crc" : "0x8cabe02c"} ], + ["ip_mfib_dump", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + {"crc" : "0xee61390e"} + ], + ["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" : "0x395e5699"} + ], + ["ip6_mfib_dump", + ["u16", "_vl_msg_id"], + ["u32", "client_index"], + ["u32", "context"], + {"crc" : "0x0839e143"} + ], + ["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" : "0x921b153f"} + ], ["ip_address_details", ["u16", "_vl_msg_id"], ["u32", "client_index"], @@ -288,5 +354,5 @@ {"crc" : "0x6ba92c72"} ] ], -"vl_api_version" :"0x6a819870" +"vl_api_version" :"0x50fe2434" } diff --git a/examples/bin_api/ip/ip.go b/examples/bin_api/ip/ip.go index 1db05d4..884e218 100644 --- a/examples/bin_api/ip/ip.go +++ b/examples/bin_api/ip/ip.go @@ -1,11 +1,11 @@ // Package ip represents the VPP binary API of the 'ip' VPP module. -// DO NOT EDIT. Generated from 'bin_api/ip.api.json' on Thu, 04 May 2017 13:11:57 CEST. +// DO NOT EDIT. Generated from 'bin_api/ip.api.json' package ip import "git.fd.io/govpp.git/api" // VlApiVersion contains version of the API. -const VlAPIVersion = 0x6a819870 +const VlAPIVersion = 0x50fe2434 // FibPath represents the VPP binary API data type 'fib_path'. // Generated from 'bin_api/ip.api.json', line 3: @@ -232,22 +232,22 @@ func NewIPNeighborDetails() api.Message { // ["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", "is_no_adj_fib"], // ["u8", "mac_address", 6], // ["u8", "dst_address", 16], -// {"crc" : "0x66f2112c"} +// {"crc" : "0x5a0d070b"} // ], // type IPNeighborAddDel struct { - VrfID uint32 SwIfIndex uint32 IsAdd uint8 IsIpv6 uint8 IsStatic uint8 + IsNoAdjFib uint8 MacAddress []byte `struc:"[6]byte"` DstAddress []byte `struc:"[16]byte"` } @@ -259,7 +259,7 @@ func (*IPNeighborAddDel) GetMessageType() api.MessageType { return api.RequestMessage } func (*IPNeighborAddDel) GetCrcString() string { - return "66f2112c" + return "5a0d070b" } func NewIPNeighborAddDel() api.Message { return &IPNeighborAddDel{} @@ -517,9 +517,124 @@ func NewSwInterfaceIP6ndRaPrefixReply() api.Message { return &SwInterfaceIP6ndRaPrefixReply{} } -// SwInterfaceIP6EnableDisable represents the VPP binary API message 'sw_interface_ip6_enable_disable'. +// IP6ndProxyAddDel represents the VPP binary API message 'ip6nd_proxy_add_del'. // Generated from 'bin_api/ip.api.json', line 153: // +// ["ip6nd_proxy_add_del", +// ["u16", "_vl_msg_id"], +// ["u32", "client_index"], +// ["u32", "context"], +// ["u32", "sw_if_index"], +// ["u8", "is_del"], +// ["u8", "address", 16], +// {"crc" : "0xc56f802d"} +// ], +// +type IP6ndProxyAddDel struct { + SwIfIndex uint32 + IsDel uint8 + Address []byte `struc:"[16]byte"` +} + +func (*IP6ndProxyAddDel) GetMessageName() string { + return "ip6nd_proxy_add_del" +} +func (*IP6ndProxyAddDel) GetMessageType() api.MessageType { + return api.RequestMessage +} +func (*IP6ndProxyAddDel) GetCrcString() string { + return "c56f802d" +} +func NewIP6ndProxyAddDel() api.Message { + return &IP6ndProxyAddDel{} +} + +// IP6ndProxyAddDelReply represents the VPP binary API message 'ip6nd_proxy_add_del_reply'. +// Generated from 'bin_api/ip.api.json', line 162: +// +// ["ip6nd_proxy_add_del_reply", +// ["u16", "_vl_msg_id"], +// ["u32", "context"], +// ["i32", "retval"], +// {"crc" : "0x00ddc2d5"} +// ], +// +type IP6ndProxyAddDelReply struct { + Retval int32 +} + +func (*IP6ndProxyAddDelReply) GetMessageName() string { + return "ip6nd_proxy_add_del_reply" +} +func (*IP6ndProxyAddDelReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func (*IP6ndProxyAddDelReply) GetCrcString() string { + return "00ddc2d5" +} +func NewIP6ndProxyAddDelReply() api.Message { + return &IP6ndProxyAddDelReply{} +} + +// IP6ndProxyDetails represents the VPP binary API message 'ip6nd_proxy_details'. +// Generated from 'bin_api/ip.api.json', line 168: +// +// ["ip6nd_proxy_details", +// ["u16", "_vl_msg_id"], +// ["u32", "client_index"], +// ["u32", "context"], +// ["u32", "sw_if_index"], +// ["u8", "address", 16], +// {"crc" : "0xf805ccc1"} +// ], +// +type IP6ndProxyDetails struct { + SwIfIndex uint32 + Address []byte `struc:"[16]byte"` +} + +func (*IP6ndProxyDetails) GetMessageName() string { + return "ip6nd_proxy_details" +} +func (*IP6ndProxyDetails) GetMessageType() api.MessageType { + return api.RequestMessage +} +func (*IP6ndProxyDetails) GetCrcString() string { + return "f805ccc1" +} +func NewIP6ndProxyDetails() api.Message { + return &IP6ndProxyDetails{} +} + +// IP6ndProxyDump represents the VPP binary API message 'ip6nd_proxy_dump'. +// Generated from 'bin_api/ip.api.json', line 176: +// +// ["ip6nd_proxy_dump", +// ["u16", "_vl_msg_id"], +// ["u32", "client_index"], +// ["u32", "context"], +// {"crc" : "0x21597d88"} +// ], +// +type IP6ndProxyDump struct { +} + +func (*IP6ndProxyDump) GetMessageName() string { + return "ip6nd_proxy_dump" +} +func (*IP6ndProxyDump) GetMessageType() api.MessageType { + return api.RequestMessage +} +func (*IP6ndProxyDump) GetCrcString() string { + return "21597d88" +} +func NewIP6ndProxyDump() api.Message { + return &IP6ndProxyDump{} +} + +// SwInterfaceIP6EnableDisable represents the VPP binary API message 'sw_interface_ip6_enable_disable'. +// Generated from 'bin_api/ip.api.json', line 182: +// // ["sw_interface_ip6_enable_disable", // ["u16", "_vl_msg_id"], // ["u32", "client_index"], @@ -548,7 +663,7 @@ func NewSwInterfaceIP6EnableDisable() api.Message { } // SwInterfaceIP6EnableDisableReply represents the VPP binary API message 'sw_interface_ip6_enable_disable_reply'. -// Generated from 'bin_api/ip.api.json', line 161: +// Generated from 'bin_api/ip.api.json', line 190: // // ["sw_interface_ip6_enable_disable_reply", // ["u16", "_vl_msg_id"], @@ -575,7 +690,7 @@ func NewSwInterfaceIP6EnableDisableReply() api.Message { } // SwInterfaceIP6SetLinkLocalAddress represents the VPP binary API message 'sw_interface_ip6_set_link_local_address'. -// Generated from 'bin_api/ip.api.json', line 167: +// Generated from 'bin_api/ip.api.json', line 196: // // ["sw_interface_ip6_set_link_local_address", // ["u16", "_vl_msg_id"], @@ -605,7 +720,7 @@ func NewSwInterfaceIP6SetLinkLocalAddress() api.Message { } // SwInterfaceIP6SetLinkLocalAddressReply represents the VPP binary API message 'sw_interface_ip6_set_link_local_address_reply'. -// Generated from 'bin_api/ip.api.json', line 175: +// Generated from 'bin_api/ip.api.json', line 204: // // ["sw_interface_ip6_set_link_local_address_reply", // ["u16", "_vl_msg_id"], @@ -632,7 +747,7 @@ func NewSwInterfaceIP6SetLinkLocalAddressReply() api.Message { } // IPAddDelRoute represents the VPP binary API message 'ip_add_del_route'. -// Generated from 'bin_api/ip.api.json', line 181: +// Generated from 'bin_api/ip.api.json', line 210: // // ["ip_add_del_route", // ["u16", "_vl_msg_id"], @@ -704,7 +819,7 @@ func NewIPAddDelRoute() api.Message { } // IPAddDelRouteReply represents the VPP binary API message 'ip_add_del_route_reply'. -// Generated from 'bin_api/ip.api.json', line 210: +// Generated from 'bin_api/ip.api.json', line 239: // // ["ip_add_del_route_reply", // ["u16", "_vl_msg_id"], @@ -731,7 +846,7 @@ func NewIPAddDelRouteReply() api.Message { } // IPMrouteAddDel represents the VPP binary API message 'ip_mroute_add_del'. -// Generated from 'bin_api/ip.api.json', line 216: +// Generated from 'bin_api/ip.api.json', line 245: // // ["ip_mroute_add_del", // ["u16", "_vl_msg_id"], @@ -741,6 +856,7 @@ func NewIPAddDelRouteReply() api.Message { // ["u32", "table_id"], // ["u32", "entry_flags"], // ["u32", "itf_flags"], +// ["u32", "rpf_id"], // ["u16", "grp_address_length"], // ["u8", "create_vrf_if_needed"], // ["u8", "is_add"], @@ -748,7 +864,7 @@ func NewIPAddDelRouteReply() api.Message { // ["u8", "is_local"], // ["u8", "grp_address", 16], // ["u8", "src_address", 16], -// {"crc" : "0x8312830f"} +// {"crc" : "0x8f5f21a8"} // ], // type IPMrouteAddDel struct { @@ -756,6 +872,7 @@ type IPMrouteAddDel struct { TableID uint32 EntryFlags uint32 ItfFlags uint32 + RpfID uint32 GrpAddressLength uint16 CreateVrfIfNeeded uint8 IsAdd uint8 @@ -772,14 +889,14 @@ func (*IPMrouteAddDel) GetMessageType() api.MessageType { return api.RequestMessage } func (*IPMrouteAddDel) GetCrcString() string { - return "8312830f" + return "8f5f21a8" } func NewIPMrouteAddDel() api.Message { return &IPMrouteAddDel{} } // IPMrouteAddDelReply represents the VPP binary API message 'ip_mroute_add_del_reply'. -// Generated from 'bin_api/ip.api.json', line 233: +// Generated from 'bin_api/ip.api.json', line 263: // // ["ip_mroute_add_del_reply", // ["u16", "_vl_msg_id"], @@ -805,8 +922,138 @@ func NewIPMrouteAddDelReply() api.Message { return &IPMrouteAddDelReply{} } +// IPMfibDump represents the VPP binary API message 'ip_mfib_dump'. +// Generated from 'bin_api/ip.api.json', line 269: +// +// ["ip_mfib_dump", +// ["u16", "_vl_msg_id"], +// ["u32", "client_index"], +// ["u32", "context"], +// {"crc" : "0xee61390e"} +// ], +// +type IPMfibDump struct { +} + +func (*IPMfibDump) GetMessageName() string { + return "ip_mfib_dump" +} +func (*IPMfibDump) GetMessageType() api.MessageType { + return api.RequestMessage +} +func (*IPMfibDump) GetCrcString() string { + return "ee61390e" +} +func NewIPMfibDump() api.Message { + return &IPMfibDump{} +} + +// IPMfibDetails represents the VPP binary API message 'ip_mfib_details'. +// Generated from 'bin_api/ip.api.json', line 275: +// +// ["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" : "0x395e5699"} +// ], +// +type IPMfibDetails struct { + TableID uint32 + EntryFlags uint32 + RpfID uint32 + AddressLength uint8 + GrpAddress []byte `struc:"[4]byte"` + SrcAddress []byte `struc:"[4]byte"` + Count uint32 `struc:"sizeof=Path"` + Path []FibPath +} + +func (*IPMfibDetails) GetMessageName() string { + return "ip_mfib_details" +} +func (*IPMfibDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func (*IPMfibDetails) GetCrcString() string { + return "395e5699" +} +func NewIPMfibDetails() api.Message { + return &IPMfibDetails{} +} + +// IP6MfibDump represents the VPP binary API message 'ip6_mfib_dump'. +// Generated from 'bin_api/ip.api.json', line 288: +// +// ["ip6_mfib_dump", +// ["u16", "_vl_msg_id"], +// ["u32", "client_index"], +// ["u32", "context"], +// {"crc" : "0x0839e143"} +// ], +// +type IP6MfibDump struct { +} + +func (*IP6MfibDump) GetMessageName() string { + return "ip6_mfib_dump" +} +func (*IP6MfibDump) GetMessageType() api.MessageType { + return api.RequestMessage +} +func (*IP6MfibDump) GetCrcString() string { + return "0839e143" +} +func NewIP6MfibDump() api.Message { + return &IP6MfibDump{} +} + +// IP6MfibDetails represents the VPP binary API message 'ip6_mfib_details'. +// Generated from 'bin_api/ip.api.json', line 294: +// +// ["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" : "0x921b153f"} +// ], +// +type IP6MfibDetails struct { + TableID uint32 + AddressLength uint8 + GrpAddress []byte `struc:"[16]byte"` + SrcAddress []byte `struc:"[16]byte"` + Count uint32 `struc:"sizeof=Path"` + Path []FibPath +} + +func (*IP6MfibDetails) GetMessageName() string { + return "ip6_mfib_details" +} +func (*IP6MfibDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func (*IP6MfibDetails) GetCrcString() string { + return "921b153f" +} +func NewIP6MfibDetails() api.Message { + return &IP6MfibDetails{} +} + // IPAddressDetails represents the VPP binary API message 'ip_address_details'. -// Generated from 'bin_api/ip.api.json', line 239: +// Generated from 'bin_api/ip.api.json', line 305: // // ["ip_address_details", // ["u16", "_vl_msg_id"], @@ -840,7 +1087,7 @@ func NewIPAddressDetails() api.Message { } // IPAddressDump represents the VPP binary API message 'ip_address_dump'. -// Generated from 'bin_api/ip.api.json', line 249: +// Generated from 'bin_api/ip.api.json', line 315: // // ["ip_address_dump", // ["u16", "_vl_msg_id"], @@ -870,7 +1117,7 @@ func NewIPAddressDump() api.Message { } // IPDetails represents the VPP binary API message 'ip_details'. -// Generated from 'bin_api/ip.api.json', line 257: +// Generated from 'bin_api/ip.api.json', line 323: // // ["ip_details", // ["u16", "_vl_msg_id"], @@ -900,7 +1147,7 @@ func NewIPDetails() api.Message { } // IPDump represents the VPP binary API message 'ip_dump'. -// Generated from 'bin_api/ip.api.json', line 264: +// Generated from 'bin_api/ip.api.json', line 330: // // ["ip_dump", // ["u16", "_vl_msg_id"], @@ -928,7 +1175,7 @@ func NewIPDump() api.Message { } // MfibSignalDump represents the VPP binary API message 'mfib_signal_dump'. -// Generated from 'bin_api/ip.api.json', line 271: +// Generated from 'bin_api/ip.api.json', line 337: // // ["mfib_signal_dump", // ["u16", "_vl_msg_id"], @@ -954,7 +1201,7 @@ func NewMfibSignalDump() api.Message { } // MfibSignalDetails represents the VPP binary API message 'mfib_signal_details'. -// Generated from 'bin_api/ip.api.json', line 277: +// Generated from 'bin_api/ip.api.json', line 343: // // ["mfib_signal_details", // ["u16", "_vl_msg_id"], diff --git a/examples/bin_api/memif.api.json b/examples/bin_api/memif.api.json index e41c82d..fd38316 100644 --- a/examples/bin_api/memif.api.json +++ b/examples/bin_api/memif.api.json @@ -8,12 +8,16 @@ ["u32", "client_index"], ["u32", "context"], ["u8", "role"], - ["u64", "key"], + ["u8", "mode"], + ["u8", "rx_queues"], + ["u8", "tx_queues"], + ["u32", "id"], ["u8", "socket_filename", 128], + ["u8", "secret", 24], ["u32", "ring_size"], ["u16", "buffer_size"], ["u8", "hw_addr", 6], - {"crc" : "0x23fe3309"} + {"crc" : "0xc809c235"} ], ["memif_create_reply", ["u16", "_vl_msg_id"], @@ -41,14 +45,15 @@ ["u32", "sw_if_index"], ["u8", "if_name", 64], ["u8", "hw_addr", 6], - ["u64", "key"], + ["u32", "id"], ["u8", "role"], + ["u8", "mode"], ["u8", "socket_filename", 128], ["u32", "ring_size"], ["u16", "buffer_size"], ["u8", "admin_up_down"], ["u8", "link_up_down"], - {"crc" : "0xcf105583"} + {"crc" : "0x4d74fd96"} ], ["memif_dump", ["u16", "_vl_msg_id"], @@ -57,5 +62,5 @@ {"crc" : "0x68d39e95"} ] ], -"vl_api_version" :"0xadb63e82" +"vl_api_version" :"0xed3def5d" } diff --git a/examples/bin_api/memif/memif.go b/examples/bin_api/memif/memif.go index c7c27f4..aa847e4 100644 --- a/examples/bin_api/memif/memif.go +++ b/examples/bin_api/memif/memif.go @@ -1,11 +1,11 @@ // Package memif represents the VPP binary API of the 'memif' VPP module. -// DO NOT EDIT. Generated from 'bin_api/memif.api.json' on Thu, 04 May 2017 13:11:57 CEST. +// DO NOT EDIT. Generated from 'bin_api/memif.api.json' package memif import "git.fd.io/govpp.git/api" // VlApiVersion contains version of the API. -const VlAPIVersion = 0xadb63e82 +const VlAPIVersion = 0xed3def5d // MemifCreate represents the VPP binary API message 'memif_create'. // Generated from 'bin_api/memif.api.json', line 6: @@ -15,18 +15,26 @@ const VlAPIVersion = 0xadb63e82 // ["u32", "client_index"], // ["u32", "context"], // ["u8", "role"], -// ["u64", "key"], +// ["u8", "mode"], +// ["u8", "rx_queues"], +// ["u8", "tx_queues"], +// ["u32", "id"], // ["u8", "socket_filename", 128], +// ["u8", "secret", 24], // ["u32", "ring_size"], // ["u16", "buffer_size"], // ["u8", "hw_addr", 6], -// {"crc" : "0x23fe3309"} +// {"crc" : "0xc809c235"} // ], // type MemifCreate struct { Role uint8 - Key uint64 + Mode uint8 + RxQueues uint8 + TxQueues uint8 + ID uint32 SocketFilename []byte `struc:"[128]byte"` + Secret []byte `struc:"[24]byte"` RingSize uint32 BufferSize uint16 HwAddr []byte `struc:"[6]byte"` @@ -39,14 +47,14 @@ func (*MemifCreate) GetMessageType() api.MessageType { return api.RequestMessage } func (*MemifCreate) GetCrcString() string { - return "23fe3309" + return "c809c235" } func NewMemifCreate() api.Message { return &MemifCreate{} } // MemifCreateReply represents the VPP binary API message 'memif_create_reply'. -// Generated from 'bin_api/memif.api.json', line 18: +// Generated from 'bin_api/memif.api.json', line 22: // // ["memif_create_reply", // ["u16", "_vl_msg_id"], @@ -75,7 +83,7 @@ func NewMemifCreateReply() api.Message { } // MemifDelete represents the VPP binary API message 'memif_delete'. -// Generated from 'bin_api/memif.api.json', line 25: +// Generated from 'bin_api/memif.api.json', line 29: // // ["memif_delete", // ["u16", "_vl_msg_id"], @@ -103,7 +111,7 @@ func NewMemifDelete() api.Message { } // MemifDeleteReply represents the VPP binary API message 'memif_delete_reply'. -// Generated from 'bin_api/memif.api.json', line 32: +// Generated from 'bin_api/memif.api.json', line 36: // // ["memif_delete_reply", // ["u16", "_vl_msg_id"], @@ -130,7 +138,7 @@ func NewMemifDeleteReply() api.Message { } // MemifDetails represents the VPP binary API message 'memif_details'. -// Generated from 'bin_api/memif.api.json', line 38: +// Generated from 'bin_api/memif.api.json', line 42: // // ["memif_details", // ["u16", "_vl_msg_id"], @@ -138,22 +146,24 @@ func NewMemifDeleteReply() api.Message { // ["u32", "sw_if_index"], // ["u8", "if_name", 64], // ["u8", "hw_addr", 6], -// ["u64", "key"], +// ["u32", "id"], // ["u8", "role"], +// ["u8", "mode"], // ["u8", "socket_filename", 128], // ["u32", "ring_size"], // ["u16", "buffer_size"], // ["u8", "admin_up_down"], // ["u8", "link_up_down"], -// {"crc" : "0xcf105583"} +// {"crc" : "0x4d74fd96"} // ], // type MemifDetails struct { SwIfIndex uint32 IfName []byte `struc:"[64]byte"` HwAddr []byte `struc:"[6]byte"` - Key uint64 + ID uint32 Role uint8 + Mode uint8 SocketFilename []byte `struc:"[128]byte"` RingSize uint32 BufferSize uint16 @@ -168,14 +178,14 @@ func (*MemifDetails) GetMessageType() api.MessageType { return api.ReplyMessage } func (*MemifDetails) GetCrcString() string { - return "cf105583" + return "4d74fd96" } func NewMemifDetails() api.Message { return &MemifDetails{} } // MemifDump represents the VPP binary API message 'memif_dump'. -// Generated from 'bin_api/memif.api.json', line 53: +// Generated from 'bin_api/memif.api.json', line 58: // // ["memif_dump", // ["u16", "_vl_msg_id"], diff --git a/examples/bin_api/tap.api.json b/examples/bin_api/tap.api.json index 7143010..43432c9 100644 --- a/examples/bin_api/tap.api.json +++ b/examples/bin_api/tap.api.json @@ -74,5 +74,5 @@ {"crc" : "0x0df07bc3"} ] ], -"vl_api_version" :"0x1aedb9f2" +"vl_api_version" :"0x4eaa2b5a" } diff --git a/examples/bin_api/tap/tap.go b/examples/bin_api/tap/tap.go index a3d6df7..451bce2 100644 --- a/examples/bin_api/tap/tap.go +++ b/examples/bin_api/tap/tap.go @@ -1,11 +1,11 @@ // Package tap represents the VPP binary API of the 'tap' VPP module. -// DO NOT EDIT. Generated from 'bin_api/tap.api.json' on Thu, 04 May 2017 13:11:57 CEST. +// DO NOT EDIT. Generated from 'bin_api/tap.api.json' package tap import "git.fd.io/govpp.git/api" // VlApiVersion contains version of the API. -const VlAPIVersion = 0x1aedb9f2 +const VlAPIVersion = 0x4eaa2b5a // TapConnect represents the VPP binary API message 'tap_connect'. // Generated from 'bin_api/tap.api.json', line 6: diff --git a/examples/cmd/stats-client/stats_client.go b/examples/cmd/stats-client/stats_client.go index fc40b24..ac2176d 100644 --- a/examples/cmd/stats-client/stats_client.go +++ b/examples/cmd/stats-client/stats_client.go @@ -26,7 +26,6 @@ import ( "git.fd.io/govpp.git" "git.fd.io/govpp.git/api" - "git.fd.io/govpp.git/api/ifcounters" "git.fd.io/govpp.git/core" "git.fd.io/govpp.git/core/bin_api/vpe" "git.fd.io/govpp.git/examples/bin_api/interfaces" @@ -55,7 +54,8 @@ func main() { sigChan := make(chan os.Signal, 1) signal.Notify(sigChan, os.Interrupt) - var subs *api.NotifSubscription + var simpleCountersSubs *api.NotifSubscription + var combinedCountersSubs *api.NotifSubscription var notifChan chan api.Message // loop until Interrupt signal is received @@ -68,8 +68,8 @@ loop: switch connEvent.State { case core.Connected: fmt.Println("VPP connected.") - if subs == nil { - subs, notifChan = subscribeNotification(ch) + if simpleCountersSubs == nil { + simpleCountersSubs, combinedCountersSubs, notifChan = subscribeNotifications(ch) } requestStatistics(ch) @@ -77,9 +77,17 @@ loop: fmt.Println("VPP disconnected.") } - case notifMsg := <-notifChan: - // counter notification received - processCounters(notifMsg.(*interfaces.VnetInterfaceCounters)) + case msg := <-notifChan: + switch notif := msg.(type) { + case *interfaces.VnetInterfaceSimpleCounters: + // simple counter notification received + processSimpleCounters(notif) + case *interfaces.VnetInterfaceCombinedCounters: + // combined counter notification received + processCombinedCounters(notif) + default: + fmt.Println("Ignoring unknown VPP notification") + } case <-sigChan: // interrupt received @@ -88,16 +96,18 @@ loop: } } - ch.UnsubscribeNotification(subs) + ch.UnsubscribeNotification(simpleCountersSubs) + ch.UnsubscribeNotification(combinedCountersSubs) } -// subscribeNotification subscribes for interface counters notifications. -func subscribeNotification(ch *api.Channel) (*api.NotifSubscription, chan api.Message) { +// subscribeNotifications subscribes for interface counters notifications. +func subscribeNotifications(ch *api.Channel) (*api.NotifSubscription, *api.NotifSubscription, chan api.Message) { notifChan := make(chan api.Message, 100) - subs, _ := ch.SubscribeNotification(notifChan, interfaces.NewVnetInterfaceCounters) + simpleCountersSubs, _ := ch.SubscribeNotification(notifChan, interfaces.NewVnetInterfaceSimpleCounters) + combinedCountersSubs, _ := ch.SubscribeNotification(notifChan, interfaces.NewVnetInterfaceCombinedCounters) - return subs, notifChan + return simpleCountersSubs, combinedCountersSubs, notifChan } // requestStatistics requests interface counters notifications from VPP. @@ -108,25 +118,27 @@ func requestStatistics(ch *api.Channel) { }).ReceiveReply(&vpe.WantStatsReply{}) } -// processCounters processes a counter message received from VPP. -func processCounters(msg *interfaces.VnetInterfaceCounters) { - fmt.Printf("%+v\n", msg) - - if msg.IsCombined == 0 { - // simple counter - counters, err := ifcounters.DecodeCounters(ifcounters.VnetInterfaceCounters(*msg)) - if err != nil { - fmt.Println("Error:", err) - } else { - fmt.Printf("%+v\n", counters) - } - } else { - // combined counter - counters, err := ifcounters.DecodeCombinedCounters(ifcounters.VnetInterfaceCounters(*msg)) - if err != nil { - fmt.Println("Error:", err) - } else { - fmt.Printf("%+v\n", counters) - } +// processSimpleCounters processes simple counters received from VPP. +func processSimpleCounters(counters *interfaces.VnetInterfaceSimpleCounters) { + fmt.Printf("%+v\n", counters) + + counterNames := []string{"Drop", "Punt", "IPv4", "IPv6", "RxNoBuf", "RxMiss", "RxError", "TxError", "MPLS"} + + for i := uint32(0); i < counters.Count; i++ { + fmt.Printf("Interface '%d': %s = %d\n", + counters.FirstSwIfIndex+i, counterNames[counters.VnetCounterType], counters.Data[i]) + } +} + +// processCombinedCounters processes combined counters received from VPP. +func processCombinedCounters(counters *interfaces.VnetInterfaceCombinedCounters) { + fmt.Printf("%+v\n", counters) + + counterNames := []string{"Rx", "Tx"} + + for i := uint32(0); i < counters.Count; i++ { + fmt.Printf("Interface '%d': %s packets = %d, %s bytes = %d\n", + counters.FirstSwIfIndex+i, counterNames[counters.VnetCounterType], counters.Data[i].Packets, + counterNames[counters.VnetCounterType], counters.Data[i].Bytes) } } |