mirror of
https://github.com/hanzos3/madmin-go.git
synced 2026-10-30 20:35:32 +00:00
Add NetStackStats, NetConnStates, NetListenerBacklog and NetIfaceLink types used by AIStor network metrics collectors, with msgp codegen for the eventual realtime-metrics integration. Extend NetInfo with DriverVersion and BusInfo from the ethtool driver-info call.
2458 lines
61 KiB
Go
2458 lines
61 KiB
Go
// Code generated by github.com/tinylib/msgp DO NOT EDIT.
|
|
|
|
package madmin
|
|
|
|
import (
|
|
"github.com/tinylib/msgp/msgp"
|
|
)
|
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
func (z *NetConnStates) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
var field []byte
|
|
_ = field
|
|
var zb0001 uint32
|
|
zb0001, err = dc.ReadMapHeader()
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
var zb0001Mask uint8 /* 2 bits */
|
|
_ = zb0001Mask
|
|
for zb0001 > 0 {
|
|
zb0001--
|
|
field, err = dc.ReadMapKeyPtr()
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
switch msgp.UnsafeString(field) {
|
|
case "states":
|
|
var zb0002 uint32
|
|
zb0002, err = dc.ReadMapHeader()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "States")
|
|
return
|
|
}
|
|
if z.States == nil {
|
|
z.States = make(map[string]uint64, zb0002)
|
|
} else if len(z.States) > 0 {
|
|
clear(z.States)
|
|
}
|
|
for zb0002 > 0 {
|
|
zb0002--
|
|
var za0001 string
|
|
za0001, err = dc.ReadString()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "States")
|
|
return
|
|
}
|
|
var za0002 uint64
|
|
za0002, err = dc.ReadUint64()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "States", za0001)
|
|
return
|
|
}
|
|
z.States[za0001] = za0002
|
|
}
|
|
zb0001Mask |= 0x1
|
|
case "listeners":
|
|
var zb0003 uint32
|
|
zb0003, err = dc.ReadArrayHeader()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "Listeners")
|
|
return
|
|
}
|
|
if cap(z.Listeners) >= int(zb0003) {
|
|
z.Listeners = (z.Listeners)[:zb0003]
|
|
} else {
|
|
z.Listeners = make([]NetListenerBacklog, zb0003)
|
|
}
|
|
for za0003 := range z.Listeners {
|
|
var zb0004 uint32
|
|
zb0004, err = dc.ReadMapHeader()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "Listeners", za0003)
|
|
return
|
|
}
|
|
for zb0004 > 0 {
|
|
zb0004--
|
|
field, err = dc.ReadMapKeyPtr()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "Listeners", za0003)
|
|
return
|
|
}
|
|
switch msgp.UnsafeString(field) {
|
|
case "local_addr":
|
|
z.Listeners[za0003].LocalAddr, err = dc.ReadString()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "Listeners", za0003, "LocalAddr")
|
|
return
|
|
}
|
|
case "backlog":
|
|
z.Listeners[za0003].Backlog, err = dc.ReadUint32()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "Listeners", za0003, "Backlog")
|
|
return
|
|
}
|
|
case "max_backlog":
|
|
z.Listeners[za0003].MaxBacklog, err = dc.ReadUint32()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "Listeners", za0003, "MaxBacklog")
|
|
return
|
|
}
|
|
default:
|
|
err = dc.Skip()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "Listeners", za0003)
|
|
return
|
|
}
|
|
}
|
|
}
|
|
}
|
|
zb0001Mask |= 0x2
|
|
default:
|
|
err = dc.Skip()
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
}
|
|
}
|
|
// Clear omitted fields.
|
|
if zb0001Mask != 0x3 {
|
|
if (zb0001Mask & 0x1) == 0 {
|
|
z.States = nil
|
|
}
|
|
if (zb0001Mask & 0x2) == 0 {
|
|
z.Listeners = nil
|
|
}
|
|
}
|
|
return
|
|
}
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
func (z *NetConnStates) EncodeMsg(en *msgp.Writer) (err error) {
|
|
// check for omitted fields
|
|
zb0001Len := uint32(2)
|
|
var zb0001Mask uint8 /* 2 bits */
|
|
_ = zb0001Mask
|
|
if z.States == nil {
|
|
zb0001Len--
|
|
zb0001Mask |= 0x1
|
|
}
|
|
if z.Listeners == nil {
|
|
zb0001Len--
|
|
zb0001Mask |= 0x2
|
|
}
|
|
// variable map header, size zb0001Len
|
|
err = en.Append(0x80 | uint8(zb0001Len))
|
|
if err != nil {
|
|
return
|
|
}
|
|
|
|
// skip if no fields are to be emitted
|
|
if zb0001Len != 0 {
|
|
if (zb0001Mask & 0x1) == 0 { // if not omitted
|
|
// write "states"
|
|
err = en.Append(0xa6, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = en.WriteMapHeader(uint32(len(z.States)))
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "States")
|
|
return
|
|
}
|
|
for za0001, za0002 := range z.States {
|
|
err = en.WriteString(za0001)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "States")
|
|
return
|
|
}
|
|
err = en.WriteUint64(za0002)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "States", za0001)
|
|
return
|
|
}
|
|
}
|
|
}
|
|
if (zb0001Mask & 0x2) == 0 { // if not omitted
|
|
// write "listeners"
|
|
err = en.Append(0xa9, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = en.WriteArrayHeader(uint32(len(z.Listeners)))
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "Listeners")
|
|
return
|
|
}
|
|
for za0003 := range z.Listeners {
|
|
// map header, size 3
|
|
// write "local_addr"
|
|
err = en.Append(0x83, 0xaa, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = en.WriteString(z.Listeners[za0003].LocalAddr)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "Listeners", za0003, "LocalAddr")
|
|
return
|
|
}
|
|
// write "backlog"
|
|
err = en.Append(0xa7, 0x62, 0x61, 0x63, 0x6b, 0x6c, 0x6f, 0x67)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = en.WriteUint32(z.Listeners[za0003].Backlog)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "Listeners", za0003, "Backlog")
|
|
return
|
|
}
|
|
// write "max_backlog"
|
|
err = en.Append(0xab, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x6c, 0x6f, 0x67)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = en.WriteUint32(z.Listeners[za0003].MaxBacklog)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "Listeners", za0003, "MaxBacklog")
|
|
return
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return
|
|
}
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
func (z *NetConnStates) MarshalMsg(b []byte) (o []byte, err error) {
|
|
o = msgp.Require(b, z.Msgsize())
|
|
// check for omitted fields
|
|
zb0001Len := uint32(2)
|
|
var zb0001Mask uint8 /* 2 bits */
|
|
_ = zb0001Mask
|
|
if z.States == nil {
|
|
zb0001Len--
|
|
zb0001Mask |= 0x1
|
|
}
|
|
if z.Listeners == nil {
|
|
zb0001Len--
|
|
zb0001Mask |= 0x2
|
|
}
|
|
// variable map header, size zb0001Len
|
|
o = append(o, 0x80|uint8(zb0001Len))
|
|
|
|
// skip if no fields are to be emitted
|
|
if zb0001Len != 0 {
|
|
if (zb0001Mask & 0x1) == 0 { // if not omitted
|
|
// string "states"
|
|
o = append(o, 0xa6, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73)
|
|
o = msgp.AppendMapHeader(o, uint32(len(z.States)))
|
|
for za0001, za0002 := range z.States {
|
|
o = msgp.AppendString(o, za0001)
|
|
o = msgp.AppendUint64(o, za0002)
|
|
}
|
|
}
|
|
if (zb0001Mask & 0x2) == 0 { // if not omitted
|
|
// string "listeners"
|
|
o = append(o, 0xa9, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73)
|
|
o = msgp.AppendArrayHeader(o, uint32(len(z.Listeners)))
|
|
for za0003 := range z.Listeners {
|
|
// map header, size 3
|
|
// string "local_addr"
|
|
o = append(o, 0x83, 0xaa, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72)
|
|
o = msgp.AppendString(o, z.Listeners[za0003].LocalAddr)
|
|
// string "backlog"
|
|
o = append(o, 0xa7, 0x62, 0x61, 0x63, 0x6b, 0x6c, 0x6f, 0x67)
|
|
o = msgp.AppendUint32(o, z.Listeners[za0003].Backlog)
|
|
// string "max_backlog"
|
|
o = append(o, 0xab, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x6c, 0x6f, 0x67)
|
|
o = msgp.AppendUint32(o, z.Listeners[za0003].MaxBacklog)
|
|
}
|
|
}
|
|
}
|
|
return
|
|
}
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
func (z *NetConnStates) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
var field []byte
|
|
_ = field
|
|
var zb0001 uint32
|
|
zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
var zb0001Mask uint8 /* 2 bits */
|
|
_ = zb0001Mask
|
|
for zb0001 > 0 {
|
|
zb0001--
|
|
field, bts, err = msgp.ReadMapKeyZC(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
switch msgp.UnsafeString(field) {
|
|
case "states":
|
|
var zb0002 uint32
|
|
zb0002, bts, err = msgp.ReadMapHeaderBytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "States")
|
|
return
|
|
}
|
|
if z.States == nil {
|
|
z.States = make(map[string]uint64, zb0002)
|
|
} else if len(z.States) > 0 {
|
|
clear(z.States)
|
|
}
|
|
for zb0002 > 0 {
|
|
var za0002 uint64
|
|
zb0002--
|
|
var za0001 string
|
|
za0001, bts, err = msgp.ReadStringBytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "States")
|
|
return
|
|
}
|
|
za0002, bts, err = msgp.ReadUint64Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "States", za0001)
|
|
return
|
|
}
|
|
z.States[za0001] = za0002
|
|
}
|
|
zb0001Mask |= 0x1
|
|
case "listeners":
|
|
var zb0003 uint32
|
|
zb0003, bts, err = msgp.ReadArrayHeaderBytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "Listeners")
|
|
return
|
|
}
|
|
if cap(z.Listeners) >= int(zb0003) {
|
|
z.Listeners = (z.Listeners)[:zb0003]
|
|
} else {
|
|
z.Listeners = make([]NetListenerBacklog, zb0003)
|
|
}
|
|
for za0003 := range z.Listeners {
|
|
var zb0004 uint32
|
|
zb0004, bts, err = msgp.ReadMapHeaderBytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "Listeners", za0003)
|
|
return
|
|
}
|
|
for zb0004 > 0 {
|
|
zb0004--
|
|
field, bts, err = msgp.ReadMapKeyZC(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "Listeners", za0003)
|
|
return
|
|
}
|
|
switch msgp.UnsafeString(field) {
|
|
case "local_addr":
|
|
z.Listeners[za0003].LocalAddr, bts, err = msgp.ReadStringBytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "Listeners", za0003, "LocalAddr")
|
|
return
|
|
}
|
|
case "backlog":
|
|
z.Listeners[za0003].Backlog, bts, err = msgp.ReadUint32Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "Listeners", za0003, "Backlog")
|
|
return
|
|
}
|
|
case "max_backlog":
|
|
z.Listeners[za0003].MaxBacklog, bts, err = msgp.ReadUint32Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "Listeners", za0003, "MaxBacklog")
|
|
return
|
|
}
|
|
default:
|
|
bts, err = msgp.Skip(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "Listeners", za0003)
|
|
return
|
|
}
|
|
}
|
|
}
|
|
}
|
|
zb0001Mask |= 0x2
|
|
default:
|
|
bts, err = msgp.Skip(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
}
|
|
}
|
|
// Clear omitted fields.
|
|
if zb0001Mask != 0x3 {
|
|
if (zb0001Mask & 0x1) == 0 {
|
|
z.States = nil
|
|
}
|
|
if (zb0001Mask & 0x2) == 0 {
|
|
z.Listeners = nil
|
|
}
|
|
}
|
|
o = bts
|
|
return
|
|
}
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
func (z *NetConnStates) Msgsize() (s int) {
|
|
s = 1 + 7 + msgp.MapHeaderSize
|
|
if z.States != nil {
|
|
for za0001, za0002 := range z.States {
|
|
_ = za0002
|
|
s += msgp.StringPrefixSize + len(za0001) + msgp.Uint64Size
|
|
}
|
|
}
|
|
s += 10 + msgp.ArrayHeaderSize
|
|
for za0003 := range z.Listeners {
|
|
s += 1 + 11 + msgp.StringPrefixSize + len(z.Listeners[za0003].LocalAddr) + 8 + msgp.Uint32Size + 12 + msgp.Uint32Size
|
|
}
|
|
return
|
|
}
|
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
func (z *NetIfaceLink) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
var field []byte
|
|
_ = field
|
|
var zb0001 uint32
|
|
zb0001, err = dc.ReadMapHeader()
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
var zb0001Mask uint8 /* 2 bits */
|
|
_ = zb0001Mask
|
|
for zb0001 > 0 {
|
|
zb0001--
|
|
field, err = dc.ReadMapKeyPtr()
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
switch msgp.UnsafeString(field) {
|
|
case "name":
|
|
z.Name, err = dc.ReadString()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "Name")
|
|
return
|
|
}
|
|
case "oper_state":
|
|
z.OperState, err = dc.ReadString()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "OperState")
|
|
return
|
|
}
|
|
zb0001Mask |= 0x1
|
|
case "speed_mbps":
|
|
z.SpeedMbps, err = dc.ReadInt64()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "SpeedMbps")
|
|
return
|
|
}
|
|
case "duplex":
|
|
z.Duplex, err = dc.ReadString()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "Duplex")
|
|
return
|
|
}
|
|
zb0001Mask |= 0x2
|
|
case "mtu":
|
|
z.MTU, err = dc.ReadUint32()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "MTU")
|
|
return
|
|
}
|
|
case "carrier_changes":
|
|
z.CarrierChanges, err = dc.ReadUint64()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "CarrierChanges")
|
|
return
|
|
}
|
|
default:
|
|
err = dc.Skip()
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
}
|
|
}
|
|
// Clear omitted fields.
|
|
if zb0001Mask != 0x3 {
|
|
if (zb0001Mask & 0x1) == 0 {
|
|
z.OperState = ""
|
|
}
|
|
if (zb0001Mask & 0x2) == 0 {
|
|
z.Duplex = ""
|
|
}
|
|
}
|
|
return
|
|
}
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
func (z *NetIfaceLink) EncodeMsg(en *msgp.Writer) (err error) {
|
|
// check for omitted fields
|
|
zb0001Len := uint32(6)
|
|
var zb0001Mask uint8 /* 6 bits */
|
|
_ = zb0001Mask
|
|
if z.OperState == "" {
|
|
zb0001Len--
|
|
zb0001Mask |= 0x2
|
|
}
|
|
if z.Duplex == "" {
|
|
zb0001Len--
|
|
zb0001Mask |= 0x8
|
|
}
|
|
// variable map header, size zb0001Len
|
|
err = en.Append(0x80 | uint8(zb0001Len))
|
|
if err != nil {
|
|
return
|
|
}
|
|
|
|
// skip if no fields are to be emitted
|
|
if zb0001Len != 0 {
|
|
// write "name"
|
|
err = en.Append(0xa4, 0x6e, 0x61, 0x6d, 0x65)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = en.WriteString(z.Name)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "Name")
|
|
return
|
|
}
|
|
if (zb0001Mask & 0x2) == 0 { // if not omitted
|
|
// write "oper_state"
|
|
err = en.Append(0xaa, 0x6f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = en.WriteString(z.OperState)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "OperState")
|
|
return
|
|
}
|
|
}
|
|
// write "speed_mbps"
|
|
err = en.Append(0xaa, 0x73, 0x70, 0x65, 0x65, 0x64, 0x5f, 0x6d, 0x62, 0x70, 0x73)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = en.WriteInt64(z.SpeedMbps)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "SpeedMbps")
|
|
return
|
|
}
|
|
if (zb0001Mask & 0x8) == 0 { // if not omitted
|
|
// write "duplex"
|
|
err = en.Append(0xa6, 0x64, 0x75, 0x70, 0x6c, 0x65, 0x78)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = en.WriteString(z.Duplex)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "Duplex")
|
|
return
|
|
}
|
|
}
|
|
// write "mtu"
|
|
err = en.Append(0xa3, 0x6d, 0x74, 0x75)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = en.WriteUint32(z.MTU)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "MTU")
|
|
return
|
|
}
|
|
// write "carrier_changes"
|
|
err = en.Append(0xaf, 0x63, 0x61, 0x72, 0x72, 0x69, 0x65, 0x72, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = en.WriteUint64(z.CarrierChanges)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "CarrierChanges")
|
|
return
|
|
}
|
|
}
|
|
return
|
|
}
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
func (z *NetIfaceLink) MarshalMsg(b []byte) (o []byte, err error) {
|
|
o = msgp.Require(b, z.Msgsize())
|
|
// check for omitted fields
|
|
zb0001Len := uint32(6)
|
|
var zb0001Mask uint8 /* 6 bits */
|
|
_ = zb0001Mask
|
|
if z.OperState == "" {
|
|
zb0001Len--
|
|
zb0001Mask |= 0x2
|
|
}
|
|
if z.Duplex == "" {
|
|
zb0001Len--
|
|
zb0001Mask |= 0x8
|
|
}
|
|
// variable map header, size zb0001Len
|
|
o = append(o, 0x80|uint8(zb0001Len))
|
|
|
|
// skip if no fields are to be emitted
|
|
if zb0001Len != 0 {
|
|
// string "name"
|
|
o = append(o, 0xa4, 0x6e, 0x61, 0x6d, 0x65)
|
|
o = msgp.AppendString(o, z.Name)
|
|
if (zb0001Mask & 0x2) == 0 { // if not omitted
|
|
// string "oper_state"
|
|
o = append(o, 0xaa, 0x6f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65)
|
|
o = msgp.AppendString(o, z.OperState)
|
|
}
|
|
// string "speed_mbps"
|
|
o = append(o, 0xaa, 0x73, 0x70, 0x65, 0x65, 0x64, 0x5f, 0x6d, 0x62, 0x70, 0x73)
|
|
o = msgp.AppendInt64(o, z.SpeedMbps)
|
|
if (zb0001Mask & 0x8) == 0 { // if not omitted
|
|
// string "duplex"
|
|
o = append(o, 0xa6, 0x64, 0x75, 0x70, 0x6c, 0x65, 0x78)
|
|
o = msgp.AppendString(o, z.Duplex)
|
|
}
|
|
// string "mtu"
|
|
o = append(o, 0xa3, 0x6d, 0x74, 0x75)
|
|
o = msgp.AppendUint32(o, z.MTU)
|
|
// string "carrier_changes"
|
|
o = append(o, 0xaf, 0x63, 0x61, 0x72, 0x72, 0x69, 0x65, 0x72, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73)
|
|
o = msgp.AppendUint64(o, z.CarrierChanges)
|
|
}
|
|
return
|
|
}
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
func (z *NetIfaceLink) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
var field []byte
|
|
_ = field
|
|
var zb0001 uint32
|
|
zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
var zb0001Mask uint8 /* 2 bits */
|
|
_ = zb0001Mask
|
|
for zb0001 > 0 {
|
|
zb0001--
|
|
field, bts, err = msgp.ReadMapKeyZC(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
switch msgp.UnsafeString(field) {
|
|
case "name":
|
|
z.Name, bts, err = msgp.ReadStringBytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "Name")
|
|
return
|
|
}
|
|
case "oper_state":
|
|
z.OperState, bts, err = msgp.ReadStringBytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "OperState")
|
|
return
|
|
}
|
|
zb0001Mask |= 0x1
|
|
case "speed_mbps":
|
|
z.SpeedMbps, bts, err = msgp.ReadInt64Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "SpeedMbps")
|
|
return
|
|
}
|
|
case "duplex":
|
|
z.Duplex, bts, err = msgp.ReadStringBytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "Duplex")
|
|
return
|
|
}
|
|
zb0001Mask |= 0x2
|
|
case "mtu":
|
|
z.MTU, bts, err = msgp.ReadUint32Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "MTU")
|
|
return
|
|
}
|
|
case "carrier_changes":
|
|
z.CarrierChanges, bts, err = msgp.ReadUint64Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "CarrierChanges")
|
|
return
|
|
}
|
|
default:
|
|
bts, err = msgp.Skip(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
}
|
|
}
|
|
// Clear omitted fields.
|
|
if zb0001Mask != 0x3 {
|
|
if (zb0001Mask & 0x1) == 0 {
|
|
z.OperState = ""
|
|
}
|
|
if (zb0001Mask & 0x2) == 0 {
|
|
z.Duplex = ""
|
|
}
|
|
}
|
|
o = bts
|
|
return
|
|
}
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
func (z *NetIfaceLink) Msgsize() (s int) {
|
|
s = 1 + 5 + msgp.StringPrefixSize + len(z.Name) + 11 + msgp.StringPrefixSize + len(z.OperState) + 11 + msgp.Int64Size + 7 + msgp.StringPrefixSize + len(z.Duplex) + 4 + msgp.Uint32Size + 16 + msgp.Uint64Size
|
|
return
|
|
}
|
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
func (z *NetListenerBacklog) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
var field []byte
|
|
_ = field
|
|
var zb0001 uint32
|
|
zb0001, err = dc.ReadMapHeader()
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
for zb0001 > 0 {
|
|
zb0001--
|
|
field, err = dc.ReadMapKeyPtr()
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
switch msgp.UnsafeString(field) {
|
|
case "local_addr":
|
|
z.LocalAddr, err = dc.ReadString()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "LocalAddr")
|
|
return
|
|
}
|
|
case "backlog":
|
|
z.Backlog, err = dc.ReadUint32()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "Backlog")
|
|
return
|
|
}
|
|
case "max_backlog":
|
|
z.MaxBacklog, err = dc.ReadUint32()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "MaxBacklog")
|
|
return
|
|
}
|
|
default:
|
|
err = dc.Skip()
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
}
|
|
}
|
|
return
|
|
}
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
func (z NetListenerBacklog) EncodeMsg(en *msgp.Writer) (err error) {
|
|
// map header, size 3
|
|
// write "local_addr"
|
|
err = en.Append(0x83, 0xaa, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = en.WriteString(z.LocalAddr)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "LocalAddr")
|
|
return
|
|
}
|
|
// write "backlog"
|
|
err = en.Append(0xa7, 0x62, 0x61, 0x63, 0x6b, 0x6c, 0x6f, 0x67)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = en.WriteUint32(z.Backlog)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "Backlog")
|
|
return
|
|
}
|
|
// write "max_backlog"
|
|
err = en.Append(0xab, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x6c, 0x6f, 0x67)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = en.WriteUint32(z.MaxBacklog)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "MaxBacklog")
|
|
return
|
|
}
|
|
return
|
|
}
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
func (z NetListenerBacklog) MarshalMsg(b []byte) (o []byte, err error) {
|
|
o = msgp.Require(b, z.Msgsize())
|
|
// map header, size 3
|
|
// string "local_addr"
|
|
o = append(o, 0x83, 0xaa, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72)
|
|
o = msgp.AppendString(o, z.LocalAddr)
|
|
// string "backlog"
|
|
o = append(o, 0xa7, 0x62, 0x61, 0x63, 0x6b, 0x6c, 0x6f, 0x67)
|
|
o = msgp.AppendUint32(o, z.Backlog)
|
|
// string "max_backlog"
|
|
o = append(o, 0xab, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x6c, 0x6f, 0x67)
|
|
o = msgp.AppendUint32(o, z.MaxBacklog)
|
|
return
|
|
}
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
func (z *NetListenerBacklog) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
var field []byte
|
|
_ = field
|
|
var zb0001 uint32
|
|
zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
for zb0001 > 0 {
|
|
zb0001--
|
|
field, bts, err = msgp.ReadMapKeyZC(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
switch msgp.UnsafeString(field) {
|
|
case "local_addr":
|
|
z.LocalAddr, bts, err = msgp.ReadStringBytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "LocalAddr")
|
|
return
|
|
}
|
|
case "backlog":
|
|
z.Backlog, bts, err = msgp.ReadUint32Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "Backlog")
|
|
return
|
|
}
|
|
case "max_backlog":
|
|
z.MaxBacklog, bts, err = msgp.ReadUint32Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "MaxBacklog")
|
|
return
|
|
}
|
|
default:
|
|
bts, err = msgp.Skip(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
}
|
|
}
|
|
o = bts
|
|
return
|
|
}
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
func (z NetListenerBacklog) Msgsize() (s int) {
|
|
s = 1 + 11 + msgp.StringPrefixSize + len(z.LocalAddr) + 8 + msgp.Uint32Size + 12 + msgp.Uint32Size
|
|
return
|
|
}
|
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
func (z *NetStackStats) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
var field []byte
|
|
_ = field
|
|
var zb0001 uint32
|
|
zb0001, err = dc.ReadMapHeader()
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
var zb0001Mask uint16 /* 13 bits */
|
|
_ = zb0001Mask
|
|
for zb0001 > 0 {
|
|
zb0001--
|
|
field, err = dc.ReadMapKeyPtr()
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
switch msgp.UnsafeString(field) {
|
|
case "tcp_active_opens":
|
|
z.TCPActiveOpens, err = dc.ReadUint64()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPActiveOpens")
|
|
return
|
|
}
|
|
case "tcp_passive_opens":
|
|
z.TCPPassiveOpens, err = dc.ReadUint64()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPPassiveOpens")
|
|
return
|
|
}
|
|
case "tcp_attempt_fails":
|
|
z.TCPAttemptFails, err = dc.ReadUint64()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPAttemptFails")
|
|
return
|
|
}
|
|
case "tcp_estab_resets":
|
|
z.TCPEstabResets, err = dc.ReadUint64()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPEstabResets")
|
|
return
|
|
}
|
|
case "tcp_curr_estab":
|
|
z.TCPCurrEstab, err = dc.ReadInt64()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPCurrEstab")
|
|
return
|
|
}
|
|
case "tcp_in_segs":
|
|
z.TCPInSegs, err = dc.ReadUint64()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPInSegs")
|
|
return
|
|
}
|
|
case "tcp_out_segs":
|
|
z.TCPOutSegs, err = dc.ReadUint64()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPOutSegs")
|
|
return
|
|
}
|
|
case "tcp_retrans_segs":
|
|
z.TCPRetransSegs, err = dc.ReadUint64()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPRetransSegs")
|
|
return
|
|
}
|
|
case "tcp_in_errs":
|
|
z.TCPInErrs, err = dc.ReadUint64()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPInErrs")
|
|
return
|
|
}
|
|
case "tcp_out_rsts":
|
|
z.TCPOutRsts, err = dc.ReadUint64()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPOutRsts")
|
|
return
|
|
}
|
|
case "ip_in_discards":
|
|
z.IPInDiscards, err = dc.ReadUint64()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "IPInDiscards")
|
|
return
|
|
}
|
|
case "ip_in_hdr_errors":
|
|
z.IPInHdrErrors, err = dc.ReadUint64()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "IPInHdrErrors")
|
|
return
|
|
}
|
|
case "udp_in_errors":
|
|
z.UDPInErrors, err = dc.ReadUint64()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "UDPInErrors")
|
|
return
|
|
}
|
|
case "udp_rcvbuf_errors":
|
|
z.UDPRcvbufErrors, err = dc.ReadUint64()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "UDPRcvbufErrors")
|
|
return
|
|
}
|
|
case "udp_sndbuf_errors":
|
|
z.UDPSndbufErrors, err = dc.ReadUint64()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "UDPSndbufErrors")
|
|
return
|
|
}
|
|
case "tcp_listen_drops":
|
|
if dc.IsNil() {
|
|
err = dc.ReadNil()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPListenDrops")
|
|
return
|
|
}
|
|
z.TCPListenDrops = nil
|
|
} else {
|
|
if z.TCPListenDrops == nil {
|
|
z.TCPListenDrops = new(uint64)
|
|
}
|
|
*z.TCPListenDrops, err = dc.ReadUint64()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPListenDrops")
|
|
return
|
|
}
|
|
}
|
|
zb0001Mask |= 0x1
|
|
case "tcp_listen_overflows":
|
|
if dc.IsNil() {
|
|
err = dc.ReadNil()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPListenOverflows")
|
|
return
|
|
}
|
|
z.TCPListenOverflows = nil
|
|
} else {
|
|
if z.TCPListenOverflows == nil {
|
|
z.TCPListenOverflows = new(uint64)
|
|
}
|
|
*z.TCPListenOverflows, err = dc.ReadUint64()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPListenOverflows")
|
|
return
|
|
}
|
|
}
|
|
zb0001Mask |= 0x2
|
|
case "tcp_syn_retrans":
|
|
if dc.IsNil() {
|
|
err = dc.ReadNil()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPSynRetrans")
|
|
return
|
|
}
|
|
z.TCPSynRetrans = nil
|
|
} else {
|
|
if z.TCPSynRetrans == nil {
|
|
z.TCPSynRetrans = new(uint64)
|
|
}
|
|
*z.TCPSynRetrans, err = dc.ReadUint64()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPSynRetrans")
|
|
return
|
|
}
|
|
}
|
|
zb0001Mask |= 0x4
|
|
case "tcp_syncookies_sent":
|
|
if dc.IsNil() {
|
|
err = dc.ReadNil()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPSyncookiesSent")
|
|
return
|
|
}
|
|
z.TCPSyncookiesSent = nil
|
|
} else {
|
|
if z.TCPSyncookiesSent == nil {
|
|
z.TCPSyncookiesSent = new(uint64)
|
|
}
|
|
*z.TCPSyncookiesSent, err = dc.ReadUint64()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPSyncookiesSent")
|
|
return
|
|
}
|
|
}
|
|
zb0001Mask |= 0x8
|
|
case "tcp_syncookies_recv":
|
|
if dc.IsNil() {
|
|
err = dc.ReadNil()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPSyncookiesRecv")
|
|
return
|
|
}
|
|
z.TCPSyncookiesRecv = nil
|
|
} else {
|
|
if z.TCPSyncookiesRecv == nil {
|
|
z.TCPSyncookiesRecv = new(uint64)
|
|
}
|
|
*z.TCPSyncookiesRecv, err = dc.ReadUint64()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPSyncookiesRecv")
|
|
return
|
|
}
|
|
}
|
|
zb0001Mask |= 0x10
|
|
case "tcp_syncookies_failed":
|
|
if dc.IsNil() {
|
|
err = dc.ReadNil()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPSyncookiesFailed")
|
|
return
|
|
}
|
|
z.TCPSyncookiesFailed = nil
|
|
} else {
|
|
if z.TCPSyncookiesFailed == nil {
|
|
z.TCPSyncookiesFailed = new(uint64)
|
|
}
|
|
*z.TCPSyncookiesFailed, err = dc.ReadUint64()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPSyncookiesFailed")
|
|
return
|
|
}
|
|
}
|
|
zb0001Mask |= 0x20
|
|
case "tcp_abort_on_timeout":
|
|
if dc.IsNil() {
|
|
err = dc.ReadNil()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPAbortOnTimeout")
|
|
return
|
|
}
|
|
z.TCPAbortOnTimeout = nil
|
|
} else {
|
|
if z.TCPAbortOnTimeout == nil {
|
|
z.TCPAbortOnTimeout = new(uint64)
|
|
}
|
|
*z.TCPAbortOnTimeout, err = dc.ReadUint64()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPAbortOnTimeout")
|
|
return
|
|
}
|
|
}
|
|
zb0001Mask |= 0x40
|
|
case "tcp_abort_on_data":
|
|
if dc.IsNil() {
|
|
err = dc.ReadNil()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPAbortOnData")
|
|
return
|
|
}
|
|
z.TCPAbortOnData = nil
|
|
} else {
|
|
if z.TCPAbortOnData == nil {
|
|
z.TCPAbortOnData = new(uint64)
|
|
}
|
|
*z.TCPAbortOnData, err = dc.ReadUint64()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPAbortOnData")
|
|
return
|
|
}
|
|
}
|
|
zb0001Mask |= 0x80
|
|
case "tcp_spurious_rtos":
|
|
if dc.IsNil() {
|
|
err = dc.ReadNil()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPSpuriousRTOs")
|
|
return
|
|
}
|
|
z.TCPSpuriousRTOs = nil
|
|
} else {
|
|
if z.TCPSpuriousRTOs == nil {
|
|
z.TCPSpuriousRTOs = new(uint64)
|
|
}
|
|
*z.TCPSpuriousRTOs, err = dc.ReadUint64()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPSpuriousRTOs")
|
|
return
|
|
}
|
|
}
|
|
zb0001Mask |= 0x100
|
|
case "tcp_loss_undo":
|
|
if dc.IsNil() {
|
|
err = dc.ReadNil()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPLossUndo")
|
|
return
|
|
}
|
|
z.TCPLossUndo = nil
|
|
} else {
|
|
if z.TCPLossUndo == nil {
|
|
z.TCPLossUndo = new(uint64)
|
|
}
|
|
*z.TCPLossUndo, err = dc.ReadUint64()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPLossUndo")
|
|
return
|
|
}
|
|
}
|
|
zb0001Mask |= 0x200
|
|
case "tcp_ofo_queue":
|
|
if dc.IsNil() {
|
|
err = dc.ReadNil()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPOFOQueue")
|
|
return
|
|
}
|
|
z.TCPOFOQueue = nil
|
|
} else {
|
|
if z.TCPOFOQueue == nil {
|
|
z.TCPOFOQueue = new(uint64)
|
|
}
|
|
*z.TCPOFOQueue, err = dc.ReadUint64()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPOFOQueue")
|
|
return
|
|
}
|
|
}
|
|
zb0001Mask |= 0x400
|
|
case "tcp_reno_recovery":
|
|
if dc.IsNil() {
|
|
err = dc.ReadNil()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPRenoRecovery")
|
|
return
|
|
}
|
|
z.TCPRenoRecovery = nil
|
|
} else {
|
|
if z.TCPRenoRecovery == nil {
|
|
z.TCPRenoRecovery = new(uint64)
|
|
}
|
|
*z.TCPRenoRecovery, err = dc.ReadUint64()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPRenoRecovery")
|
|
return
|
|
}
|
|
}
|
|
zb0001Mask |= 0x800
|
|
case "tcp_lost_retransmit":
|
|
if dc.IsNil() {
|
|
err = dc.ReadNil()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPLostRetransmit")
|
|
return
|
|
}
|
|
z.TCPLostRetransmit = nil
|
|
} else {
|
|
if z.TCPLostRetransmit == nil {
|
|
z.TCPLostRetransmit = new(uint64)
|
|
}
|
|
*z.TCPLostRetransmit, err = dc.ReadUint64()
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPLostRetransmit")
|
|
return
|
|
}
|
|
}
|
|
zb0001Mask |= 0x1000
|
|
default:
|
|
err = dc.Skip()
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
}
|
|
}
|
|
// Clear omitted fields.
|
|
if zb0001Mask != 0x1fff {
|
|
if (zb0001Mask & 0x1) == 0 {
|
|
z.TCPListenDrops = nil
|
|
}
|
|
if (zb0001Mask & 0x2) == 0 {
|
|
z.TCPListenOverflows = nil
|
|
}
|
|
if (zb0001Mask & 0x4) == 0 {
|
|
z.TCPSynRetrans = nil
|
|
}
|
|
if (zb0001Mask & 0x8) == 0 {
|
|
z.TCPSyncookiesSent = nil
|
|
}
|
|
if (zb0001Mask & 0x10) == 0 {
|
|
z.TCPSyncookiesRecv = nil
|
|
}
|
|
if (zb0001Mask & 0x20) == 0 {
|
|
z.TCPSyncookiesFailed = nil
|
|
}
|
|
if (zb0001Mask & 0x40) == 0 {
|
|
z.TCPAbortOnTimeout = nil
|
|
}
|
|
if (zb0001Mask & 0x80) == 0 {
|
|
z.TCPAbortOnData = nil
|
|
}
|
|
if (zb0001Mask & 0x100) == 0 {
|
|
z.TCPSpuriousRTOs = nil
|
|
}
|
|
if (zb0001Mask & 0x200) == 0 {
|
|
z.TCPLossUndo = nil
|
|
}
|
|
if (zb0001Mask & 0x400) == 0 {
|
|
z.TCPOFOQueue = nil
|
|
}
|
|
if (zb0001Mask & 0x800) == 0 {
|
|
z.TCPRenoRecovery = nil
|
|
}
|
|
if (zb0001Mask & 0x1000) == 0 {
|
|
z.TCPLostRetransmit = nil
|
|
}
|
|
}
|
|
return
|
|
}
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
func (z *NetStackStats) EncodeMsg(en *msgp.Writer) (err error) {
|
|
// check for omitted fields
|
|
zb0001Len := uint32(28)
|
|
var zb0001Mask uint32 /* 28 bits */
|
|
_ = zb0001Mask
|
|
if z.TCPListenDrops == nil {
|
|
zb0001Len--
|
|
zb0001Mask |= 0x8000
|
|
}
|
|
if z.TCPListenOverflows == nil {
|
|
zb0001Len--
|
|
zb0001Mask |= 0x10000
|
|
}
|
|
if z.TCPSynRetrans == nil {
|
|
zb0001Len--
|
|
zb0001Mask |= 0x20000
|
|
}
|
|
if z.TCPSyncookiesSent == nil {
|
|
zb0001Len--
|
|
zb0001Mask |= 0x40000
|
|
}
|
|
if z.TCPSyncookiesRecv == nil {
|
|
zb0001Len--
|
|
zb0001Mask |= 0x80000
|
|
}
|
|
if z.TCPSyncookiesFailed == nil {
|
|
zb0001Len--
|
|
zb0001Mask |= 0x100000
|
|
}
|
|
if z.TCPAbortOnTimeout == nil {
|
|
zb0001Len--
|
|
zb0001Mask |= 0x200000
|
|
}
|
|
if z.TCPAbortOnData == nil {
|
|
zb0001Len--
|
|
zb0001Mask |= 0x400000
|
|
}
|
|
if z.TCPSpuriousRTOs == nil {
|
|
zb0001Len--
|
|
zb0001Mask |= 0x800000
|
|
}
|
|
if z.TCPLossUndo == nil {
|
|
zb0001Len--
|
|
zb0001Mask |= 0x1000000
|
|
}
|
|
if z.TCPOFOQueue == nil {
|
|
zb0001Len--
|
|
zb0001Mask |= 0x2000000
|
|
}
|
|
if z.TCPRenoRecovery == nil {
|
|
zb0001Len--
|
|
zb0001Mask |= 0x4000000
|
|
}
|
|
if z.TCPLostRetransmit == nil {
|
|
zb0001Len--
|
|
zb0001Mask |= 0x8000000
|
|
}
|
|
// variable map header, size zb0001Len
|
|
err = en.WriteMapHeader(zb0001Len)
|
|
if err != nil {
|
|
return
|
|
}
|
|
|
|
// skip if no fields are to be emitted
|
|
if zb0001Len != 0 {
|
|
// write "tcp_active_opens"
|
|
err = en.Append(0xb0, 0x74, 0x63, 0x70, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x73)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = en.WriteUint64(z.TCPActiveOpens)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPActiveOpens")
|
|
return
|
|
}
|
|
// write "tcp_passive_opens"
|
|
err = en.Append(0xb1, 0x74, 0x63, 0x70, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x73)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = en.WriteUint64(z.TCPPassiveOpens)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPPassiveOpens")
|
|
return
|
|
}
|
|
// write "tcp_attempt_fails"
|
|
err = en.Append(0xb1, 0x74, 0x63, 0x70, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x73)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = en.WriteUint64(z.TCPAttemptFails)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPAttemptFails")
|
|
return
|
|
}
|
|
// write "tcp_estab_resets"
|
|
err = en.Append(0xb0, 0x74, 0x63, 0x70, 0x5f, 0x65, 0x73, 0x74, 0x61, 0x62, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = en.WriteUint64(z.TCPEstabResets)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPEstabResets")
|
|
return
|
|
}
|
|
// write "tcp_curr_estab"
|
|
err = en.Append(0xae, 0x74, 0x63, 0x70, 0x5f, 0x63, 0x75, 0x72, 0x72, 0x5f, 0x65, 0x73, 0x74, 0x61, 0x62)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = en.WriteInt64(z.TCPCurrEstab)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPCurrEstab")
|
|
return
|
|
}
|
|
// write "tcp_in_segs"
|
|
err = en.Append(0xab, 0x74, 0x63, 0x70, 0x5f, 0x69, 0x6e, 0x5f, 0x73, 0x65, 0x67, 0x73)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = en.WriteUint64(z.TCPInSegs)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPInSegs")
|
|
return
|
|
}
|
|
// write "tcp_out_segs"
|
|
err = en.Append(0xac, 0x74, 0x63, 0x70, 0x5f, 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x65, 0x67, 0x73)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = en.WriteUint64(z.TCPOutSegs)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPOutSegs")
|
|
return
|
|
}
|
|
// write "tcp_retrans_segs"
|
|
err = en.Append(0xb0, 0x74, 0x63, 0x70, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x5f, 0x73, 0x65, 0x67, 0x73)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = en.WriteUint64(z.TCPRetransSegs)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPRetransSegs")
|
|
return
|
|
}
|
|
// write "tcp_in_errs"
|
|
err = en.Append(0xab, 0x74, 0x63, 0x70, 0x5f, 0x69, 0x6e, 0x5f, 0x65, 0x72, 0x72, 0x73)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = en.WriteUint64(z.TCPInErrs)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPInErrs")
|
|
return
|
|
}
|
|
// write "tcp_out_rsts"
|
|
err = en.Append(0xac, 0x74, 0x63, 0x70, 0x5f, 0x6f, 0x75, 0x74, 0x5f, 0x72, 0x73, 0x74, 0x73)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = en.WriteUint64(z.TCPOutRsts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPOutRsts")
|
|
return
|
|
}
|
|
// write "ip_in_discards"
|
|
err = en.Append(0xae, 0x69, 0x70, 0x5f, 0x69, 0x6e, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x61, 0x72, 0x64, 0x73)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = en.WriteUint64(z.IPInDiscards)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "IPInDiscards")
|
|
return
|
|
}
|
|
// write "ip_in_hdr_errors"
|
|
err = en.Append(0xb0, 0x69, 0x70, 0x5f, 0x69, 0x6e, 0x5f, 0x68, 0x64, 0x72, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = en.WriteUint64(z.IPInHdrErrors)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "IPInHdrErrors")
|
|
return
|
|
}
|
|
// write "udp_in_errors"
|
|
err = en.Append(0xad, 0x75, 0x64, 0x70, 0x5f, 0x69, 0x6e, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = en.WriteUint64(z.UDPInErrors)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "UDPInErrors")
|
|
return
|
|
}
|
|
// write "udp_rcvbuf_errors"
|
|
err = en.Append(0xb1, 0x75, 0x64, 0x70, 0x5f, 0x72, 0x63, 0x76, 0x62, 0x75, 0x66, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = en.WriteUint64(z.UDPRcvbufErrors)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "UDPRcvbufErrors")
|
|
return
|
|
}
|
|
// write "udp_sndbuf_errors"
|
|
err = en.Append(0xb1, 0x75, 0x64, 0x70, 0x5f, 0x73, 0x6e, 0x64, 0x62, 0x75, 0x66, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73)
|
|
if err != nil {
|
|
return
|
|
}
|
|
err = en.WriteUint64(z.UDPSndbufErrors)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "UDPSndbufErrors")
|
|
return
|
|
}
|
|
if (zb0001Mask & 0x8000) == 0 { // if not omitted
|
|
// write "tcp_listen_drops"
|
|
err = en.Append(0xb0, 0x74, 0x63, 0x70, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x5f, 0x64, 0x72, 0x6f, 0x70, 0x73)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if z.TCPListenDrops == nil {
|
|
err = en.WriteNil()
|
|
if err != nil {
|
|
return
|
|
}
|
|
} else {
|
|
err = en.WriteUint64(*z.TCPListenDrops)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPListenDrops")
|
|
return
|
|
}
|
|
}
|
|
}
|
|
if (zb0001Mask & 0x10000) == 0 { // if not omitted
|
|
// write "tcp_listen_overflows"
|
|
err = en.Append(0xb4, 0x74, 0x63, 0x70, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x66, 0x6c, 0x6f, 0x77, 0x73)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if z.TCPListenOverflows == nil {
|
|
err = en.WriteNil()
|
|
if err != nil {
|
|
return
|
|
}
|
|
} else {
|
|
err = en.WriteUint64(*z.TCPListenOverflows)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPListenOverflows")
|
|
return
|
|
}
|
|
}
|
|
}
|
|
if (zb0001Mask & 0x20000) == 0 { // if not omitted
|
|
// write "tcp_syn_retrans"
|
|
err = en.Append(0xaf, 0x74, 0x63, 0x70, 0x5f, 0x73, 0x79, 0x6e, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x61, 0x6e, 0x73)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if z.TCPSynRetrans == nil {
|
|
err = en.WriteNil()
|
|
if err != nil {
|
|
return
|
|
}
|
|
} else {
|
|
err = en.WriteUint64(*z.TCPSynRetrans)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPSynRetrans")
|
|
return
|
|
}
|
|
}
|
|
}
|
|
if (zb0001Mask & 0x40000) == 0 { // if not omitted
|
|
// write "tcp_syncookies_sent"
|
|
err = en.Append(0xb3, 0x74, 0x63, 0x70, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if z.TCPSyncookiesSent == nil {
|
|
err = en.WriteNil()
|
|
if err != nil {
|
|
return
|
|
}
|
|
} else {
|
|
err = en.WriteUint64(*z.TCPSyncookiesSent)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPSyncookiesSent")
|
|
return
|
|
}
|
|
}
|
|
}
|
|
if (zb0001Mask & 0x80000) == 0 { // if not omitted
|
|
// write "tcp_syncookies_recv"
|
|
err = en.Append(0xb3, 0x74, 0x63, 0x70, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x76)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if z.TCPSyncookiesRecv == nil {
|
|
err = en.WriteNil()
|
|
if err != nil {
|
|
return
|
|
}
|
|
} else {
|
|
err = en.WriteUint64(*z.TCPSyncookiesRecv)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPSyncookiesRecv")
|
|
return
|
|
}
|
|
}
|
|
}
|
|
if (zb0001Mask & 0x100000) == 0 { // if not omitted
|
|
// write "tcp_syncookies_failed"
|
|
err = en.Append(0xb5, 0x74, 0x63, 0x70, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x73, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if z.TCPSyncookiesFailed == nil {
|
|
err = en.WriteNil()
|
|
if err != nil {
|
|
return
|
|
}
|
|
} else {
|
|
err = en.WriteUint64(*z.TCPSyncookiesFailed)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPSyncookiesFailed")
|
|
return
|
|
}
|
|
}
|
|
}
|
|
if (zb0001Mask & 0x200000) == 0 { // if not omitted
|
|
// write "tcp_abort_on_timeout"
|
|
err = en.Append(0xb4, 0x74, 0x63, 0x70, 0x5f, 0x61, 0x62, 0x6f, 0x72, 0x74, 0x5f, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if z.TCPAbortOnTimeout == nil {
|
|
err = en.WriteNil()
|
|
if err != nil {
|
|
return
|
|
}
|
|
} else {
|
|
err = en.WriteUint64(*z.TCPAbortOnTimeout)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPAbortOnTimeout")
|
|
return
|
|
}
|
|
}
|
|
}
|
|
if (zb0001Mask & 0x400000) == 0 { // if not omitted
|
|
// write "tcp_abort_on_data"
|
|
err = en.Append(0xb1, 0x74, 0x63, 0x70, 0x5f, 0x61, 0x62, 0x6f, 0x72, 0x74, 0x5f, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if z.TCPAbortOnData == nil {
|
|
err = en.WriteNil()
|
|
if err != nil {
|
|
return
|
|
}
|
|
} else {
|
|
err = en.WriteUint64(*z.TCPAbortOnData)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPAbortOnData")
|
|
return
|
|
}
|
|
}
|
|
}
|
|
if (zb0001Mask & 0x800000) == 0 { // if not omitted
|
|
// write "tcp_spurious_rtos"
|
|
err = en.Append(0xb1, 0x74, 0x63, 0x70, 0x5f, 0x73, 0x70, 0x75, 0x72, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x72, 0x74, 0x6f, 0x73)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if z.TCPSpuriousRTOs == nil {
|
|
err = en.WriteNil()
|
|
if err != nil {
|
|
return
|
|
}
|
|
} else {
|
|
err = en.WriteUint64(*z.TCPSpuriousRTOs)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPSpuriousRTOs")
|
|
return
|
|
}
|
|
}
|
|
}
|
|
if (zb0001Mask & 0x1000000) == 0 { // if not omitted
|
|
// write "tcp_loss_undo"
|
|
err = en.Append(0xad, 0x74, 0x63, 0x70, 0x5f, 0x6c, 0x6f, 0x73, 0x73, 0x5f, 0x75, 0x6e, 0x64, 0x6f)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if z.TCPLossUndo == nil {
|
|
err = en.WriteNil()
|
|
if err != nil {
|
|
return
|
|
}
|
|
} else {
|
|
err = en.WriteUint64(*z.TCPLossUndo)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPLossUndo")
|
|
return
|
|
}
|
|
}
|
|
}
|
|
if (zb0001Mask & 0x2000000) == 0 { // if not omitted
|
|
// write "tcp_ofo_queue"
|
|
err = en.Append(0xad, 0x74, 0x63, 0x70, 0x5f, 0x6f, 0x66, 0x6f, 0x5f, 0x71, 0x75, 0x65, 0x75, 0x65)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if z.TCPOFOQueue == nil {
|
|
err = en.WriteNil()
|
|
if err != nil {
|
|
return
|
|
}
|
|
} else {
|
|
err = en.WriteUint64(*z.TCPOFOQueue)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPOFOQueue")
|
|
return
|
|
}
|
|
}
|
|
}
|
|
if (zb0001Mask & 0x4000000) == 0 { // if not omitted
|
|
// write "tcp_reno_recovery"
|
|
err = en.Append(0xb1, 0x74, 0x63, 0x70, 0x5f, 0x72, 0x65, 0x6e, 0x6f, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if z.TCPRenoRecovery == nil {
|
|
err = en.WriteNil()
|
|
if err != nil {
|
|
return
|
|
}
|
|
} else {
|
|
err = en.WriteUint64(*z.TCPRenoRecovery)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPRenoRecovery")
|
|
return
|
|
}
|
|
}
|
|
}
|
|
if (zb0001Mask & 0x8000000) == 0 { // if not omitted
|
|
// write "tcp_lost_retransmit"
|
|
err = en.Append(0xb3, 0x74, 0x63, 0x70, 0x5f, 0x6c, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74)
|
|
if err != nil {
|
|
return
|
|
}
|
|
if z.TCPLostRetransmit == nil {
|
|
err = en.WriteNil()
|
|
if err != nil {
|
|
return
|
|
}
|
|
} else {
|
|
err = en.WriteUint64(*z.TCPLostRetransmit)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPLostRetransmit")
|
|
return
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return
|
|
}
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
func (z *NetStackStats) MarshalMsg(b []byte) (o []byte, err error) {
|
|
o = msgp.Require(b, z.Msgsize())
|
|
// check for omitted fields
|
|
zb0001Len := uint32(28)
|
|
var zb0001Mask uint32 /* 28 bits */
|
|
_ = zb0001Mask
|
|
if z.TCPListenDrops == nil {
|
|
zb0001Len--
|
|
zb0001Mask |= 0x8000
|
|
}
|
|
if z.TCPListenOverflows == nil {
|
|
zb0001Len--
|
|
zb0001Mask |= 0x10000
|
|
}
|
|
if z.TCPSynRetrans == nil {
|
|
zb0001Len--
|
|
zb0001Mask |= 0x20000
|
|
}
|
|
if z.TCPSyncookiesSent == nil {
|
|
zb0001Len--
|
|
zb0001Mask |= 0x40000
|
|
}
|
|
if z.TCPSyncookiesRecv == nil {
|
|
zb0001Len--
|
|
zb0001Mask |= 0x80000
|
|
}
|
|
if z.TCPSyncookiesFailed == nil {
|
|
zb0001Len--
|
|
zb0001Mask |= 0x100000
|
|
}
|
|
if z.TCPAbortOnTimeout == nil {
|
|
zb0001Len--
|
|
zb0001Mask |= 0x200000
|
|
}
|
|
if z.TCPAbortOnData == nil {
|
|
zb0001Len--
|
|
zb0001Mask |= 0x400000
|
|
}
|
|
if z.TCPSpuriousRTOs == nil {
|
|
zb0001Len--
|
|
zb0001Mask |= 0x800000
|
|
}
|
|
if z.TCPLossUndo == nil {
|
|
zb0001Len--
|
|
zb0001Mask |= 0x1000000
|
|
}
|
|
if z.TCPOFOQueue == nil {
|
|
zb0001Len--
|
|
zb0001Mask |= 0x2000000
|
|
}
|
|
if z.TCPRenoRecovery == nil {
|
|
zb0001Len--
|
|
zb0001Mask |= 0x4000000
|
|
}
|
|
if z.TCPLostRetransmit == nil {
|
|
zb0001Len--
|
|
zb0001Mask |= 0x8000000
|
|
}
|
|
// variable map header, size zb0001Len
|
|
o = msgp.AppendMapHeader(o, zb0001Len)
|
|
|
|
// skip if no fields are to be emitted
|
|
if zb0001Len != 0 {
|
|
// string "tcp_active_opens"
|
|
o = append(o, 0xb0, 0x74, 0x63, 0x70, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x73)
|
|
o = msgp.AppendUint64(o, z.TCPActiveOpens)
|
|
// string "tcp_passive_opens"
|
|
o = append(o, 0xb1, 0x74, 0x63, 0x70, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x73)
|
|
o = msgp.AppendUint64(o, z.TCPPassiveOpens)
|
|
// string "tcp_attempt_fails"
|
|
o = append(o, 0xb1, 0x74, 0x63, 0x70, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x73)
|
|
o = msgp.AppendUint64(o, z.TCPAttemptFails)
|
|
// string "tcp_estab_resets"
|
|
o = append(o, 0xb0, 0x74, 0x63, 0x70, 0x5f, 0x65, 0x73, 0x74, 0x61, 0x62, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73)
|
|
o = msgp.AppendUint64(o, z.TCPEstabResets)
|
|
// string "tcp_curr_estab"
|
|
o = append(o, 0xae, 0x74, 0x63, 0x70, 0x5f, 0x63, 0x75, 0x72, 0x72, 0x5f, 0x65, 0x73, 0x74, 0x61, 0x62)
|
|
o = msgp.AppendInt64(o, z.TCPCurrEstab)
|
|
// string "tcp_in_segs"
|
|
o = append(o, 0xab, 0x74, 0x63, 0x70, 0x5f, 0x69, 0x6e, 0x5f, 0x73, 0x65, 0x67, 0x73)
|
|
o = msgp.AppendUint64(o, z.TCPInSegs)
|
|
// string "tcp_out_segs"
|
|
o = append(o, 0xac, 0x74, 0x63, 0x70, 0x5f, 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x65, 0x67, 0x73)
|
|
o = msgp.AppendUint64(o, z.TCPOutSegs)
|
|
// string "tcp_retrans_segs"
|
|
o = append(o, 0xb0, 0x74, 0x63, 0x70, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x5f, 0x73, 0x65, 0x67, 0x73)
|
|
o = msgp.AppendUint64(o, z.TCPRetransSegs)
|
|
// string "tcp_in_errs"
|
|
o = append(o, 0xab, 0x74, 0x63, 0x70, 0x5f, 0x69, 0x6e, 0x5f, 0x65, 0x72, 0x72, 0x73)
|
|
o = msgp.AppendUint64(o, z.TCPInErrs)
|
|
// string "tcp_out_rsts"
|
|
o = append(o, 0xac, 0x74, 0x63, 0x70, 0x5f, 0x6f, 0x75, 0x74, 0x5f, 0x72, 0x73, 0x74, 0x73)
|
|
o = msgp.AppendUint64(o, z.TCPOutRsts)
|
|
// string "ip_in_discards"
|
|
o = append(o, 0xae, 0x69, 0x70, 0x5f, 0x69, 0x6e, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x61, 0x72, 0x64, 0x73)
|
|
o = msgp.AppendUint64(o, z.IPInDiscards)
|
|
// string "ip_in_hdr_errors"
|
|
o = append(o, 0xb0, 0x69, 0x70, 0x5f, 0x69, 0x6e, 0x5f, 0x68, 0x64, 0x72, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73)
|
|
o = msgp.AppendUint64(o, z.IPInHdrErrors)
|
|
// string "udp_in_errors"
|
|
o = append(o, 0xad, 0x75, 0x64, 0x70, 0x5f, 0x69, 0x6e, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73)
|
|
o = msgp.AppendUint64(o, z.UDPInErrors)
|
|
// string "udp_rcvbuf_errors"
|
|
o = append(o, 0xb1, 0x75, 0x64, 0x70, 0x5f, 0x72, 0x63, 0x76, 0x62, 0x75, 0x66, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73)
|
|
o = msgp.AppendUint64(o, z.UDPRcvbufErrors)
|
|
// string "udp_sndbuf_errors"
|
|
o = append(o, 0xb1, 0x75, 0x64, 0x70, 0x5f, 0x73, 0x6e, 0x64, 0x62, 0x75, 0x66, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73)
|
|
o = msgp.AppendUint64(o, z.UDPSndbufErrors)
|
|
if (zb0001Mask & 0x8000) == 0 { // if not omitted
|
|
// string "tcp_listen_drops"
|
|
o = append(o, 0xb0, 0x74, 0x63, 0x70, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x5f, 0x64, 0x72, 0x6f, 0x70, 0x73)
|
|
if z.TCPListenDrops == nil {
|
|
o = msgp.AppendNil(o)
|
|
} else {
|
|
o = msgp.AppendUint64(o, *z.TCPListenDrops)
|
|
}
|
|
}
|
|
if (zb0001Mask & 0x10000) == 0 { // if not omitted
|
|
// string "tcp_listen_overflows"
|
|
o = append(o, 0xb4, 0x74, 0x63, 0x70, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x66, 0x6c, 0x6f, 0x77, 0x73)
|
|
if z.TCPListenOverflows == nil {
|
|
o = msgp.AppendNil(o)
|
|
} else {
|
|
o = msgp.AppendUint64(o, *z.TCPListenOverflows)
|
|
}
|
|
}
|
|
if (zb0001Mask & 0x20000) == 0 { // if not omitted
|
|
// string "tcp_syn_retrans"
|
|
o = append(o, 0xaf, 0x74, 0x63, 0x70, 0x5f, 0x73, 0x79, 0x6e, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x61, 0x6e, 0x73)
|
|
if z.TCPSynRetrans == nil {
|
|
o = msgp.AppendNil(o)
|
|
} else {
|
|
o = msgp.AppendUint64(o, *z.TCPSynRetrans)
|
|
}
|
|
}
|
|
if (zb0001Mask & 0x40000) == 0 { // if not omitted
|
|
// string "tcp_syncookies_sent"
|
|
o = append(o, 0xb3, 0x74, 0x63, 0x70, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74)
|
|
if z.TCPSyncookiesSent == nil {
|
|
o = msgp.AppendNil(o)
|
|
} else {
|
|
o = msgp.AppendUint64(o, *z.TCPSyncookiesSent)
|
|
}
|
|
}
|
|
if (zb0001Mask & 0x80000) == 0 { // if not omitted
|
|
// string "tcp_syncookies_recv"
|
|
o = append(o, 0xb3, 0x74, 0x63, 0x70, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x76)
|
|
if z.TCPSyncookiesRecv == nil {
|
|
o = msgp.AppendNil(o)
|
|
} else {
|
|
o = msgp.AppendUint64(o, *z.TCPSyncookiesRecv)
|
|
}
|
|
}
|
|
if (zb0001Mask & 0x100000) == 0 { // if not omitted
|
|
// string "tcp_syncookies_failed"
|
|
o = append(o, 0xb5, 0x74, 0x63, 0x70, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x73, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64)
|
|
if z.TCPSyncookiesFailed == nil {
|
|
o = msgp.AppendNil(o)
|
|
} else {
|
|
o = msgp.AppendUint64(o, *z.TCPSyncookiesFailed)
|
|
}
|
|
}
|
|
if (zb0001Mask & 0x200000) == 0 { // if not omitted
|
|
// string "tcp_abort_on_timeout"
|
|
o = append(o, 0xb4, 0x74, 0x63, 0x70, 0x5f, 0x61, 0x62, 0x6f, 0x72, 0x74, 0x5f, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74)
|
|
if z.TCPAbortOnTimeout == nil {
|
|
o = msgp.AppendNil(o)
|
|
} else {
|
|
o = msgp.AppendUint64(o, *z.TCPAbortOnTimeout)
|
|
}
|
|
}
|
|
if (zb0001Mask & 0x400000) == 0 { // if not omitted
|
|
// string "tcp_abort_on_data"
|
|
o = append(o, 0xb1, 0x74, 0x63, 0x70, 0x5f, 0x61, 0x62, 0x6f, 0x72, 0x74, 0x5f, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61)
|
|
if z.TCPAbortOnData == nil {
|
|
o = msgp.AppendNil(o)
|
|
} else {
|
|
o = msgp.AppendUint64(o, *z.TCPAbortOnData)
|
|
}
|
|
}
|
|
if (zb0001Mask & 0x800000) == 0 { // if not omitted
|
|
// string "tcp_spurious_rtos"
|
|
o = append(o, 0xb1, 0x74, 0x63, 0x70, 0x5f, 0x73, 0x70, 0x75, 0x72, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x72, 0x74, 0x6f, 0x73)
|
|
if z.TCPSpuriousRTOs == nil {
|
|
o = msgp.AppendNil(o)
|
|
} else {
|
|
o = msgp.AppendUint64(o, *z.TCPSpuriousRTOs)
|
|
}
|
|
}
|
|
if (zb0001Mask & 0x1000000) == 0 { // if not omitted
|
|
// string "tcp_loss_undo"
|
|
o = append(o, 0xad, 0x74, 0x63, 0x70, 0x5f, 0x6c, 0x6f, 0x73, 0x73, 0x5f, 0x75, 0x6e, 0x64, 0x6f)
|
|
if z.TCPLossUndo == nil {
|
|
o = msgp.AppendNil(o)
|
|
} else {
|
|
o = msgp.AppendUint64(o, *z.TCPLossUndo)
|
|
}
|
|
}
|
|
if (zb0001Mask & 0x2000000) == 0 { // if not omitted
|
|
// string "tcp_ofo_queue"
|
|
o = append(o, 0xad, 0x74, 0x63, 0x70, 0x5f, 0x6f, 0x66, 0x6f, 0x5f, 0x71, 0x75, 0x65, 0x75, 0x65)
|
|
if z.TCPOFOQueue == nil {
|
|
o = msgp.AppendNil(o)
|
|
} else {
|
|
o = msgp.AppendUint64(o, *z.TCPOFOQueue)
|
|
}
|
|
}
|
|
if (zb0001Mask & 0x4000000) == 0 { // if not omitted
|
|
// string "tcp_reno_recovery"
|
|
o = append(o, 0xb1, 0x74, 0x63, 0x70, 0x5f, 0x72, 0x65, 0x6e, 0x6f, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79)
|
|
if z.TCPRenoRecovery == nil {
|
|
o = msgp.AppendNil(o)
|
|
} else {
|
|
o = msgp.AppendUint64(o, *z.TCPRenoRecovery)
|
|
}
|
|
}
|
|
if (zb0001Mask & 0x8000000) == 0 { // if not omitted
|
|
// string "tcp_lost_retransmit"
|
|
o = append(o, 0xb3, 0x74, 0x63, 0x70, 0x5f, 0x6c, 0x6f, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x74)
|
|
if z.TCPLostRetransmit == nil {
|
|
o = msgp.AppendNil(o)
|
|
} else {
|
|
o = msgp.AppendUint64(o, *z.TCPLostRetransmit)
|
|
}
|
|
}
|
|
}
|
|
return
|
|
}
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
func (z *NetStackStats) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
var field []byte
|
|
_ = field
|
|
var zb0001 uint32
|
|
zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
var zb0001Mask uint16 /* 13 bits */
|
|
_ = zb0001Mask
|
|
for zb0001 > 0 {
|
|
zb0001--
|
|
field, bts, err = msgp.ReadMapKeyZC(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
switch msgp.UnsafeString(field) {
|
|
case "tcp_active_opens":
|
|
z.TCPActiveOpens, bts, err = msgp.ReadUint64Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPActiveOpens")
|
|
return
|
|
}
|
|
case "tcp_passive_opens":
|
|
z.TCPPassiveOpens, bts, err = msgp.ReadUint64Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPPassiveOpens")
|
|
return
|
|
}
|
|
case "tcp_attempt_fails":
|
|
z.TCPAttemptFails, bts, err = msgp.ReadUint64Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPAttemptFails")
|
|
return
|
|
}
|
|
case "tcp_estab_resets":
|
|
z.TCPEstabResets, bts, err = msgp.ReadUint64Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPEstabResets")
|
|
return
|
|
}
|
|
case "tcp_curr_estab":
|
|
z.TCPCurrEstab, bts, err = msgp.ReadInt64Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPCurrEstab")
|
|
return
|
|
}
|
|
case "tcp_in_segs":
|
|
z.TCPInSegs, bts, err = msgp.ReadUint64Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPInSegs")
|
|
return
|
|
}
|
|
case "tcp_out_segs":
|
|
z.TCPOutSegs, bts, err = msgp.ReadUint64Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPOutSegs")
|
|
return
|
|
}
|
|
case "tcp_retrans_segs":
|
|
z.TCPRetransSegs, bts, err = msgp.ReadUint64Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPRetransSegs")
|
|
return
|
|
}
|
|
case "tcp_in_errs":
|
|
z.TCPInErrs, bts, err = msgp.ReadUint64Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPInErrs")
|
|
return
|
|
}
|
|
case "tcp_out_rsts":
|
|
z.TCPOutRsts, bts, err = msgp.ReadUint64Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPOutRsts")
|
|
return
|
|
}
|
|
case "ip_in_discards":
|
|
z.IPInDiscards, bts, err = msgp.ReadUint64Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "IPInDiscards")
|
|
return
|
|
}
|
|
case "ip_in_hdr_errors":
|
|
z.IPInHdrErrors, bts, err = msgp.ReadUint64Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "IPInHdrErrors")
|
|
return
|
|
}
|
|
case "udp_in_errors":
|
|
z.UDPInErrors, bts, err = msgp.ReadUint64Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "UDPInErrors")
|
|
return
|
|
}
|
|
case "udp_rcvbuf_errors":
|
|
z.UDPRcvbufErrors, bts, err = msgp.ReadUint64Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "UDPRcvbufErrors")
|
|
return
|
|
}
|
|
case "udp_sndbuf_errors":
|
|
z.UDPSndbufErrors, bts, err = msgp.ReadUint64Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "UDPSndbufErrors")
|
|
return
|
|
}
|
|
case "tcp_listen_drops":
|
|
if msgp.IsNil(bts) {
|
|
bts, err = msgp.ReadNilBytes(bts)
|
|
if err != nil {
|
|
return
|
|
}
|
|
z.TCPListenDrops = nil
|
|
} else {
|
|
if z.TCPListenDrops == nil {
|
|
z.TCPListenDrops = new(uint64)
|
|
}
|
|
*z.TCPListenDrops, bts, err = msgp.ReadUint64Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPListenDrops")
|
|
return
|
|
}
|
|
}
|
|
zb0001Mask |= 0x1
|
|
case "tcp_listen_overflows":
|
|
if msgp.IsNil(bts) {
|
|
bts, err = msgp.ReadNilBytes(bts)
|
|
if err != nil {
|
|
return
|
|
}
|
|
z.TCPListenOverflows = nil
|
|
} else {
|
|
if z.TCPListenOverflows == nil {
|
|
z.TCPListenOverflows = new(uint64)
|
|
}
|
|
*z.TCPListenOverflows, bts, err = msgp.ReadUint64Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPListenOverflows")
|
|
return
|
|
}
|
|
}
|
|
zb0001Mask |= 0x2
|
|
case "tcp_syn_retrans":
|
|
if msgp.IsNil(bts) {
|
|
bts, err = msgp.ReadNilBytes(bts)
|
|
if err != nil {
|
|
return
|
|
}
|
|
z.TCPSynRetrans = nil
|
|
} else {
|
|
if z.TCPSynRetrans == nil {
|
|
z.TCPSynRetrans = new(uint64)
|
|
}
|
|
*z.TCPSynRetrans, bts, err = msgp.ReadUint64Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPSynRetrans")
|
|
return
|
|
}
|
|
}
|
|
zb0001Mask |= 0x4
|
|
case "tcp_syncookies_sent":
|
|
if msgp.IsNil(bts) {
|
|
bts, err = msgp.ReadNilBytes(bts)
|
|
if err != nil {
|
|
return
|
|
}
|
|
z.TCPSyncookiesSent = nil
|
|
} else {
|
|
if z.TCPSyncookiesSent == nil {
|
|
z.TCPSyncookiesSent = new(uint64)
|
|
}
|
|
*z.TCPSyncookiesSent, bts, err = msgp.ReadUint64Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPSyncookiesSent")
|
|
return
|
|
}
|
|
}
|
|
zb0001Mask |= 0x8
|
|
case "tcp_syncookies_recv":
|
|
if msgp.IsNil(bts) {
|
|
bts, err = msgp.ReadNilBytes(bts)
|
|
if err != nil {
|
|
return
|
|
}
|
|
z.TCPSyncookiesRecv = nil
|
|
} else {
|
|
if z.TCPSyncookiesRecv == nil {
|
|
z.TCPSyncookiesRecv = new(uint64)
|
|
}
|
|
*z.TCPSyncookiesRecv, bts, err = msgp.ReadUint64Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPSyncookiesRecv")
|
|
return
|
|
}
|
|
}
|
|
zb0001Mask |= 0x10
|
|
case "tcp_syncookies_failed":
|
|
if msgp.IsNil(bts) {
|
|
bts, err = msgp.ReadNilBytes(bts)
|
|
if err != nil {
|
|
return
|
|
}
|
|
z.TCPSyncookiesFailed = nil
|
|
} else {
|
|
if z.TCPSyncookiesFailed == nil {
|
|
z.TCPSyncookiesFailed = new(uint64)
|
|
}
|
|
*z.TCPSyncookiesFailed, bts, err = msgp.ReadUint64Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPSyncookiesFailed")
|
|
return
|
|
}
|
|
}
|
|
zb0001Mask |= 0x20
|
|
case "tcp_abort_on_timeout":
|
|
if msgp.IsNil(bts) {
|
|
bts, err = msgp.ReadNilBytes(bts)
|
|
if err != nil {
|
|
return
|
|
}
|
|
z.TCPAbortOnTimeout = nil
|
|
} else {
|
|
if z.TCPAbortOnTimeout == nil {
|
|
z.TCPAbortOnTimeout = new(uint64)
|
|
}
|
|
*z.TCPAbortOnTimeout, bts, err = msgp.ReadUint64Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPAbortOnTimeout")
|
|
return
|
|
}
|
|
}
|
|
zb0001Mask |= 0x40
|
|
case "tcp_abort_on_data":
|
|
if msgp.IsNil(bts) {
|
|
bts, err = msgp.ReadNilBytes(bts)
|
|
if err != nil {
|
|
return
|
|
}
|
|
z.TCPAbortOnData = nil
|
|
} else {
|
|
if z.TCPAbortOnData == nil {
|
|
z.TCPAbortOnData = new(uint64)
|
|
}
|
|
*z.TCPAbortOnData, bts, err = msgp.ReadUint64Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPAbortOnData")
|
|
return
|
|
}
|
|
}
|
|
zb0001Mask |= 0x80
|
|
case "tcp_spurious_rtos":
|
|
if msgp.IsNil(bts) {
|
|
bts, err = msgp.ReadNilBytes(bts)
|
|
if err != nil {
|
|
return
|
|
}
|
|
z.TCPSpuriousRTOs = nil
|
|
} else {
|
|
if z.TCPSpuriousRTOs == nil {
|
|
z.TCPSpuriousRTOs = new(uint64)
|
|
}
|
|
*z.TCPSpuriousRTOs, bts, err = msgp.ReadUint64Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPSpuriousRTOs")
|
|
return
|
|
}
|
|
}
|
|
zb0001Mask |= 0x100
|
|
case "tcp_loss_undo":
|
|
if msgp.IsNil(bts) {
|
|
bts, err = msgp.ReadNilBytes(bts)
|
|
if err != nil {
|
|
return
|
|
}
|
|
z.TCPLossUndo = nil
|
|
} else {
|
|
if z.TCPLossUndo == nil {
|
|
z.TCPLossUndo = new(uint64)
|
|
}
|
|
*z.TCPLossUndo, bts, err = msgp.ReadUint64Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPLossUndo")
|
|
return
|
|
}
|
|
}
|
|
zb0001Mask |= 0x200
|
|
case "tcp_ofo_queue":
|
|
if msgp.IsNil(bts) {
|
|
bts, err = msgp.ReadNilBytes(bts)
|
|
if err != nil {
|
|
return
|
|
}
|
|
z.TCPOFOQueue = nil
|
|
} else {
|
|
if z.TCPOFOQueue == nil {
|
|
z.TCPOFOQueue = new(uint64)
|
|
}
|
|
*z.TCPOFOQueue, bts, err = msgp.ReadUint64Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPOFOQueue")
|
|
return
|
|
}
|
|
}
|
|
zb0001Mask |= 0x400
|
|
case "tcp_reno_recovery":
|
|
if msgp.IsNil(bts) {
|
|
bts, err = msgp.ReadNilBytes(bts)
|
|
if err != nil {
|
|
return
|
|
}
|
|
z.TCPRenoRecovery = nil
|
|
} else {
|
|
if z.TCPRenoRecovery == nil {
|
|
z.TCPRenoRecovery = new(uint64)
|
|
}
|
|
*z.TCPRenoRecovery, bts, err = msgp.ReadUint64Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPRenoRecovery")
|
|
return
|
|
}
|
|
}
|
|
zb0001Mask |= 0x800
|
|
case "tcp_lost_retransmit":
|
|
if msgp.IsNil(bts) {
|
|
bts, err = msgp.ReadNilBytes(bts)
|
|
if err != nil {
|
|
return
|
|
}
|
|
z.TCPLostRetransmit = nil
|
|
} else {
|
|
if z.TCPLostRetransmit == nil {
|
|
z.TCPLostRetransmit = new(uint64)
|
|
}
|
|
*z.TCPLostRetransmit, bts, err = msgp.ReadUint64Bytes(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err, "TCPLostRetransmit")
|
|
return
|
|
}
|
|
}
|
|
zb0001Mask |= 0x1000
|
|
default:
|
|
bts, err = msgp.Skip(bts)
|
|
if err != nil {
|
|
err = msgp.WrapError(err)
|
|
return
|
|
}
|
|
}
|
|
}
|
|
// Clear omitted fields.
|
|
if zb0001Mask != 0x1fff {
|
|
if (zb0001Mask & 0x1) == 0 {
|
|
z.TCPListenDrops = nil
|
|
}
|
|
if (zb0001Mask & 0x2) == 0 {
|
|
z.TCPListenOverflows = nil
|
|
}
|
|
if (zb0001Mask & 0x4) == 0 {
|
|
z.TCPSynRetrans = nil
|
|
}
|
|
if (zb0001Mask & 0x8) == 0 {
|
|
z.TCPSyncookiesSent = nil
|
|
}
|
|
if (zb0001Mask & 0x10) == 0 {
|
|
z.TCPSyncookiesRecv = nil
|
|
}
|
|
if (zb0001Mask & 0x20) == 0 {
|
|
z.TCPSyncookiesFailed = nil
|
|
}
|
|
if (zb0001Mask & 0x40) == 0 {
|
|
z.TCPAbortOnTimeout = nil
|
|
}
|
|
if (zb0001Mask & 0x80) == 0 {
|
|
z.TCPAbortOnData = nil
|
|
}
|
|
if (zb0001Mask & 0x100) == 0 {
|
|
z.TCPSpuriousRTOs = nil
|
|
}
|
|
if (zb0001Mask & 0x200) == 0 {
|
|
z.TCPLossUndo = nil
|
|
}
|
|
if (zb0001Mask & 0x400) == 0 {
|
|
z.TCPOFOQueue = nil
|
|
}
|
|
if (zb0001Mask & 0x800) == 0 {
|
|
z.TCPRenoRecovery = nil
|
|
}
|
|
if (zb0001Mask & 0x1000) == 0 {
|
|
z.TCPLostRetransmit = nil
|
|
}
|
|
}
|
|
o = bts
|
|
return
|
|
}
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
func (z *NetStackStats) Msgsize() (s int) {
|
|
s = 3 + 17 + msgp.Uint64Size + 18 + msgp.Uint64Size + 18 + msgp.Uint64Size + 17 + msgp.Uint64Size + 15 + msgp.Int64Size + 12 + msgp.Uint64Size + 13 + msgp.Uint64Size + 17 + msgp.Uint64Size + 12 + msgp.Uint64Size + 13 + msgp.Uint64Size + 15 + msgp.Uint64Size + 17 + msgp.Uint64Size + 14 + msgp.Uint64Size + 18 + msgp.Uint64Size + 18 + msgp.Uint64Size + 17
|
|
if z.TCPListenDrops == nil {
|
|
s += msgp.NilSize
|
|
} else {
|
|
s += msgp.Uint64Size
|
|
}
|
|
s += 21
|
|
if z.TCPListenOverflows == nil {
|
|
s += msgp.NilSize
|
|
} else {
|
|
s += msgp.Uint64Size
|
|
}
|
|
s += 16
|
|
if z.TCPSynRetrans == nil {
|
|
s += msgp.NilSize
|
|
} else {
|
|
s += msgp.Uint64Size
|
|
}
|
|
s += 20
|
|
if z.TCPSyncookiesSent == nil {
|
|
s += msgp.NilSize
|
|
} else {
|
|
s += msgp.Uint64Size
|
|
}
|
|
s += 20
|
|
if z.TCPSyncookiesRecv == nil {
|
|
s += msgp.NilSize
|
|
} else {
|
|
s += msgp.Uint64Size
|
|
}
|
|
s += 22
|
|
if z.TCPSyncookiesFailed == nil {
|
|
s += msgp.NilSize
|
|
} else {
|
|
s += msgp.Uint64Size
|
|
}
|
|
s += 21
|
|
if z.TCPAbortOnTimeout == nil {
|
|
s += msgp.NilSize
|
|
} else {
|
|
s += msgp.Uint64Size
|
|
}
|
|
s += 18
|
|
if z.TCPAbortOnData == nil {
|
|
s += msgp.NilSize
|
|
} else {
|
|
s += msgp.Uint64Size
|
|
}
|
|
s += 18
|
|
if z.TCPSpuriousRTOs == nil {
|
|
s += msgp.NilSize
|
|
} else {
|
|
s += msgp.Uint64Size
|
|
}
|
|
s += 14
|
|
if z.TCPLossUndo == nil {
|
|
s += msgp.NilSize
|
|
} else {
|
|
s += msgp.Uint64Size
|
|
}
|
|
s += 14
|
|
if z.TCPOFOQueue == nil {
|
|
s += msgp.NilSize
|
|
} else {
|
|
s += msgp.Uint64Size
|
|
}
|
|
s += 18
|
|
if z.TCPRenoRecovery == nil {
|
|
s += msgp.NilSize
|
|
} else {
|
|
s += msgp.Uint64Size
|
|
}
|
|
s += 20
|
|
if z.TCPLostRetransmit == nil {
|
|
s += msgp.NilSize
|
|
} else {
|
|
s += msgp.Uint64Size
|
|
}
|
|
return
|
|
}
|