// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
-// VPP: 20.05-release
+// binapi-generator: v0.4.0
+// VPP: 20.05.1-release
// source: /usr/share/vpp/api/core/ip_types.api.json
// Package ip_types contains generated bindings for API file ip_types.api.
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ 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
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
return
}
func (u *AddressUnion) SetIP4(a IP4Address) {
- var buf = codec.NewBuffer(u.XXX_UnionData[:])
+ buf := codec.NewBuffer(u.XXX_UnionData[:])
buf.EncodeBytes(a[:], 4)
}
func (u *AddressUnion) GetIP4() (a IP4Address) {
- var buf = codec.NewBuffer(u.XXX_UnionData[:])
+ buf := codec.NewBuffer(u.XXX_UnionData[:])
copy(a[:], buf.DecodeBytes(4))
return
}
return
}
func (u *AddressUnion) SetIP6(a IP6Address) {
- var buf = codec.NewBuffer(u.XXX_UnionData[:])
+ buf := codec.NewBuffer(u.XXX_UnionData[:])
buf.EncodeBytes(a[:], 16)
}
func (u *AddressUnion) GetIP6() (a IP6Address) {
- var buf = codec.NewBuffer(u.XXX_UnionData[:])
+ buf := codec.NewBuffer(u.XXX_UnionData[:])
copy(a[:], buf.DecodeBytes(16))
return
}