summaryrefslogtreecommitdiffstats
path: root/internal/testbinapi/binapi2001/mactime
diff options
context:
space:
mode:
Diffstat (limited to 'internal/testbinapi/binapi2001/mactime')
-rw-r--r--internal/testbinapi/binapi2001/mactime/mactime.ba.go11
-rw-r--r--internal/testbinapi/binapi2001/mactime/mactime_rpc.ba.go13
2 files changed, 17 insertions, 7 deletions
diff --git a/internal/testbinapi/binapi2001/mactime/mactime.ba.go b/internal/testbinapi/binapi2001/mactime/mactime.ba.go
index 2824cf2..699d329 100644
--- a/internal/testbinapi/binapi2001/mactime/mactime.ba.go
+++ b/internal/testbinapi/binapi2001/mactime/mactime.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/plugins/mactime.api.json
@@ -15,10 +15,11 @@
package mactime
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
@@ -299,15 +300,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/mactime/mactime_rpc.ba.go b/internal/testbinapi/binapi2001/mactime/mactime_rpc.ba.go
index 4e17e54..89630da 100644
--- a/internal/testbinapi/binapi2001/mactime/mactime_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/mactime/mactime_rpc.ba.go
@@ -5,12 +5,13 @@ package mactime
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 mactime.
+// RPCService defines RPC service mactime.
type RPCService interface {
MactimeAddDelRange(ctx context.Context, in *MactimeAddDelRange) (*MactimeAddDelRangeReply, error)
MactimeDump(ctx context.Context, in *MactimeDump) (RPCService_MactimeDumpClient, error)
@@ -31,7 +32,7 @@ func (c *serviceClient) MactimeAddDelRange(ctx context.Context, in *MactimeAddDe
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) MactimeDump(ctx context.Context, in *MactimeDump) (RPCService_MactimeDumpClient, error) {
@@ -67,6 +68,10 @@ func (c *serviceClient_MactimeDumpClient) Recv() (*MactimeDetails, error) {
case *MactimeDetails:
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)
@@ -79,5 +84,5 @@ func (c *serviceClient) MactimeEnableDisable(ctx context.Context, in *MactimeEna
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}