summaryrefslogtreecommitdiffstats
path: root/internal/testbinapi/binapi2001/af_packet
diff options
context:
space:
mode:
Diffstat (limited to 'internal/testbinapi/binapi2001/af_packet')
-rw-r--r--internal/testbinapi/binapi2001/af_packet/af_packet.ba.go11
-rw-r--r--internal/testbinapi/binapi2001/af_packet/af_packet_rpc.ba.go15
2 files changed, 18 insertions, 8 deletions
diff --git a/internal/testbinapi/binapi2001/af_packet/af_packet.ba.go b/internal/testbinapi/binapi2001/af_packet/af_packet.ba.go
index ff82ee7..a3a8183 100644
--- a/internal/testbinapi/binapi2001/af_packet/af_packet.ba.go
+++ b/internal/testbinapi/binapi2001/af_packet/af_packet.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/af_packet.api.json
@@ -14,10 +14,11 @@
package af_packet
import (
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -298,15 +299,19 @@ func ParseMacAddress(s string) (MacAddress, error) {
copy(macaddr[:], mac[:])
return macaddr, nil
}
+
func (x MacAddress) ToMAC() net.HardwareAddr {
return net.HardwareAddr(x[:])
}
+
func (x MacAddress) String() string {
return x.ToMAC().String()
}
+
func (x *MacAddress) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *MacAddress) UnmarshalText(text []byte) error {
mac, err := ParseMacAddress(string(text))
if err != nil {
diff --git a/internal/testbinapi/binapi2001/af_packet/af_packet_rpc.ba.go b/internal/testbinapi/binapi2001/af_packet/af_packet_rpc.ba.go
index 4b0fc7c..19355ab 100644
--- a/internal/testbinapi/binapi2001/af_packet/af_packet_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/af_packet/af_packet_rpc.ba.go
@@ -5,12 +5,13 @@ package af_packet
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service af_packet.
+// RPCService defines RPC service af_packet.
type RPCService interface {
AfPacketCreate(ctx context.Context, in *AfPacketCreate) (*AfPacketCreateReply, error)
AfPacketDelete(ctx context.Context, in *AfPacketDelete) (*AfPacketDeleteReply, error)
@@ -32,7 +33,7 @@ func (c *serviceClient) AfPacketCreate(ctx context.Context, in *AfPacketCreate)
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) AfPacketDelete(ctx context.Context, in *AfPacketDelete) (*AfPacketDeleteReply, error) {
@@ -41,7 +42,7 @@ func (c *serviceClient) AfPacketDelete(ctx context.Context, in *AfPacketDelete)
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) AfPacketDump(ctx context.Context, in *AfPacketDump) (RPCService_AfPacketDumpClient, error) {
@@ -77,6 +78,10 @@ func (c *serviceClient_AfPacketDumpClient) Recv() (*AfPacketDetails, error) {
case *AfPacketDetails:
return m, nil
case *vpe.ControlPingReply:
+ err = c.Stream.Close()
+ if err != nil {
+ return nil, err
+ }
return nil, io.EOF
default:
return nil, fmt.Errorf("unexpected message: %T %v", m, m)
@@ -89,5 +94,5 @@ func (c *serviceClient) AfPacketSetL4CksumOffload(ctx context.Context, in *AfPac
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}