Code Review
/
govpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Improve doc & fix import ordering
[govpp.git]
/
binapi
/
gtpu
/
gtpu.ba.go
diff --git
a/binapi/gtpu/gtpu.ba.go
b/binapi/gtpu/gtpu.ba.go
index
02903a9
..
de7d29f
100644
(file)
--- a/
binapi/gtpu/gtpu.ba.go
+++ b/
binapi/gtpu/gtpu.ba.go
@@
-2,7
+2,6
@@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
-// source: /usr/share/vpp/api/plugins/gtpu.api.json
// Package gtpu contains generated bindings for API file gtpu.api.
//
// Package gtpu contains generated bindings for API file gtpu.api.
//
@@
-48,11
+47,10
@@
func (*GtpuAddDelTunnel) GetMessageType() api.MessageType {
return api.RequestMessage
}
return api.RequestMessage
}
-func (m *GtpuAddDelTunnel) Size()
int
{
+func (m *GtpuAddDelTunnel) Size()
(size int)
{
if m == nil {
return 0
}
if m == nil {
return 0
}
- var size int
size += 1 // m.IsAdd
size += 1 // m.SrcAddress.Af
size += 1 * 16 // m.SrcAddress.Un
size += 1 // m.IsAdd
size += 1 // m.SrcAddress.Af
size += 1 * 16 // m.SrcAddress.Un
@@
-65,21
+63,19
@@
func (m *GtpuAddDelTunnel) Size() int {
return size
}
func (m *GtpuAddDelTunnel) Marshal(b []byte) ([]byte, error) {
return size
}
func (m *GtpuAddDelTunnel) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
}
+ buf := codec.NewBuffer(b)
buf.EncodeBool(m.IsAdd)
buf.EncodeUint8(uint8(m.SrcAddress.Af))
buf.EncodeBool(m.IsAdd)
buf.EncodeUint8(uint8(m.SrcAddress.Af))
- buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:],
0
)
+ buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:],
16
)
buf.EncodeUint8(uint8(m.DstAddress.Af))
buf.EncodeUint8(uint8(m.DstAddress.Af))
- buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:],
0
)
+ buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:],
16
)
buf.EncodeUint32(uint32(m.McastSwIfIndex))
buf.EncodeUint32(uint32(m.McastSwIfIndex))
- buf.EncodeUint32(
uint32(m.EncapVrfID)
)
- buf.EncodeUint32(
uint32(m.DecapNextIndex)
)
- buf.EncodeUint32(
uint32(m.Teid)
)
+ buf.EncodeUint32(
m.EncapVrfID
)
+ buf.EncodeUint32(
m.DecapNextIndex
)
+ buf.EncodeUint32(
m.Teid
)
return buf.Bytes(), nil
}
func (m *GtpuAddDelTunnel) Unmarshal(b []byte) error {
return buf.Bytes(), nil
}
func (m *GtpuAddDelTunnel) Unmarshal(b []byte) error {
@@
-109,29
+105,26
@@
func (*GtpuAddDelTunnelReply) GetMessageType() api.MessageType {
return api.ReplyMessage
}
return api.ReplyMessage
}
-func (m *GtpuAddDelTunnelReply) Size()
int
{
+func (m *GtpuAddDelTunnelReply) Size()
(size int)
{
if m == nil {
return 0
}
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
size += 4 // m.SwIfIndex
return size
}
func (m *GtpuAddDelTunnelReply) Marshal(b []byte) ([]byte, error) {
size += 4 // m.Retval
size += 4 // m.SwIfIndex
return size
}
func (m *GtpuAddDelTunnelReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
buf.EncodeUint32(uint32(m.SwIfIndex))
return buf.Bytes(), nil
}
func (m *GtpuAddDelTunnelReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
buf.EncodeUint32(uint32(m.SwIfIndex))
return buf.Bytes(), nil
}
func (m *GtpuAddDelTunnelReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval =
int32(buf.DecodeUint32()
)
+ m.Retval =
buf.DecodeInt32(
)
m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
return nil
}
m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
return nil
}
@@
-150,26
+143,23
@@
func (*GtpuOffloadRx) GetMessageType() api.MessageType {
return api.RequestMessage
}
return api.RequestMessage
}
-func (m *GtpuOffloadRx) Size()
int
{
+func (m *GtpuOffloadRx) Size()
(size int)
{
if m == nil {
return 0
}
if m == nil {
return 0
}
- var size int
size += 4 // m.HwIfIndex
size += 4 // m.SwIfIndex
size += 1 // m.Enable
return size
}
func (m *GtpuOffloadRx) Marshal(b []byte) ([]byte, error) {
size += 4 // m.HwIfIndex
size += 4 // m.SwIfIndex
size += 1 // m.Enable
return size
}
func (m *GtpuOffloadRx) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
}
- buf.EncodeUint32(uint32(m.HwIfIndex))
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint8(uint8(m.Enable))
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.HwIfIndex)
+ buf.EncodeUint32(m.SwIfIndex)
+ buf.EncodeUint8(m.Enable)
return buf.Bytes(), nil
}
func (m *GtpuOffloadRx) Unmarshal(b []byte) error {
return buf.Bytes(), nil
}
func (m *GtpuOffloadRx) Unmarshal(b []byte) error {
@@
-192,27
+182,24
@@
func (*GtpuOffloadRxReply) GetMessageType() api.MessageType {
return api.ReplyMessage
}
return api.ReplyMessage
}
-func (m *GtpuOffloadRxReply) Size()
int
{
+func (m *GtpuOffloadRxReply) Size()
(size int)
{
if m == nil {
return 0
}
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *GtpuOffloadRxReply) Marshal(b []byte) ([]byte, error) {
size += 4 // m.Retval
return size
}
func (m *GtpuOffloadRxReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *GtpuOffloadRxReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
return buf.Bytes(), nil
}
func (m *GtpuOffloadRxReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval =
int32(buf.DecodeUint32()
)
+ m.Retval =
buf.DecodeInt32(
)
return nil
}
return nil
}
@@
-234,11
+221,10
@@
func (*GtpuTunnelDetails) GetMessageType() api.MessageType {
return api.ReplyMessage
}
return api.ReplyMessage
}
-func (m *GtpuTunnelDetails) Size()
int
{
+func (m *GtpuTunnelDetails) Size()
(size int)
{
if m == nil {
return 0
}
if m == nil {
return 0
}
- var size int
size += 4 // m.SwIfIndex
size += 1 // m.SrcAddress.Af
size += 1 * 16 // m.SrcAddress.Un
size += 4 // m.SwIfIndex
size += 1 // m.SrcAddress.Af
size += 1 * 16 // m.SrcAddress.Un
@@
-251,21
+237,19
@@
func (m *GtpuTunnelDetails) Size() int {
return size
}
func (m *GtpuTunnelDetails) Marshal(b []byte) ([]byte, error) {
return size
}
func (m *GtpuTunnelDetails) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint32(uint32(m.SwIfIndex))
buf.EncodeUint8(uint8(m.SrcAddress.Af))
buf.EncodeUint32(uint32(m.SwIfIndex))
buf.EncodeUint8(uint8(m.SrcAddress.Af))
- buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:],
0
)
+ buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:],
16
)
buf.EncodeUint8(uint8(m.DstAddress.Af))
buf.EncodeUint8(uint8(m.DstAddress.Af))
- buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:],
0
)
+ buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:],
16
)
buf.EncodeUint32(uint32(m.McastSwIfIndex))
buf.EncodeUint32(uint32(m.McastSwIfIndex))
- buf.EncodeUint32(
uint32(m.EncapVrfID)
)
- buf.EncodeUint32(
uint32(m.DecapNextIndex)
)
- buf.EncodeUint32(
uint32(m.Teid)
)
+ buf.EncodeUint32(
m.EncapVrfID
)
+ buf.EncodeUint32(
m.DecapNextIndex
)
+ buf.EncodeUint32(
m.Teid
)
return buf.Bytes(), nil
}
func (m *GtpuTunnelDetails) Unmarshal(b []byte) error {
return buf.Bytes(), nil
}
func (m *GtpuTunnelDetails) Unmarshal(b []byte) error {
@@
-294,21
+278,18
@@
func (*GtpuTunnelDump) GetMessageType() api.MessageType {
return api.RequestMessage
}
return api.RequestMessage
}
-func (m *GtpuTunnelDump) Size()
int
{
+func (m *GtpuTunnelDump) Size()
(size int)
{
if m == nil {
return 0
}
if m == nil {
return 0
}
- var size int
size += 4 // m.SwIfIndex
return size
}
func (m *GtpuTunnelDump) Marshal(b []byte) ([]byte, error) {
size += 4 // m.SwIfIndex
return size
}
func (m *GtpuTunnelDump) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint32(uint32(m.SwIfIndex))
return buf.Bytes(), nil
}
buf.EncodeUint32(uint32(m.SwIfIndex))
return buf.Bytes(), nil
}
@@
-332,23
+313,20
@@
func (*SwInterfaceSetGtpuBypass) GetMessageType() api.MessageType {
return api.RequestMessage
}
return api.RequestMessage
}
-func (m *SwInterfaceSetGtpuBypass) Size()
int
{
+func (m *SwInterfaceSetGtpuBypass) Size()
(size int)
{
if m == nil {
return 0
}
if m == nil {
return 0
}
- var size int
size += 4 // m.SwIfIndex
size += 1 // m.IsIPv6
size += 1 // m.Enable
return size
}
func (m *SwInterfaceSetGtpuBypass) Marshal(b []byte) ([]byte, error) {
size += 4 // m.SwIfIndex
size += 1 // m.IsIPv6
size += 1 // m.Enable
return size
}
func (m *SwInterfaceSetGtpuBypass) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint32(uint32(m.SwIfIndex))
buf.EncodeBool(m.IsIPv6)
buf.EncodeBool(m.Enable)
buf.EncodeUint32(uint32(m.SwIfIndex))
buf.EncodeBool(m.IsIPv6)
buf.EncodeBool(m.Enable)
@@
-376,27
+354,24
@@
func (*SwInterfaceSetGtpuBypassReply) GetMessageType() api.MessageType {
return api.ReplyMessage
}
return api.ReplyMessage
}
-func (m *SwInterfaceSetGtpuBypassReply) Size()
int
{
+func (m *SwInterfaceSetGtpuBypassReply) Size()
(size int)
{
if m == nil {
return 0
}
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *SwInterfaceSetGtpuBypassReply) Marshal(b []byte) ([]byte, error) {
size += 4 // m.Retval
return size
}
func (m *SwInterfaceSetGtpuBypassReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *SwInterfaceSetGtpuBypassReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
return buf.Bytes(), nil
}
func (m *SwInterfaceSetGtpuBypassReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval =
int32(buf.DecodeUint32()
)
+ m.Retval =
buf.DecodeInt32(
)
return nil
}
return nil
}