add kpod stats function
Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
This commit is contained in:
parent
dda5511a2b
commit
ceeed6c32e
92 changed files with 34227 additions and 218 deletions
32
vendor/github.com/vishvananda/netlink/order.go
generated
vendored
Normal file
32
vendor/github.com/vishvananda/netlink/order.go
generated
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
package netlink
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
|
||||
"github.com/vishvananda/netlink/nl"
|
||||
)
|
||||
|
||||
var (
|
||||
native = nl.NativeEndian()
|
||||
networkOrder = binary.BigEndian
|
||||
)
|
||||
|
||||
func htonl(val uint32) []byte {
|
||||
bytes := make([]byte, 4)
|
||||
binary.BigEndian.PutUint32(bytes, val)
|
||||
return bytes
|
||||
}
|
||||
|
||||
func htons(val uint16) []byte {
|
||||
bytes := make([]byte, 2)
|
||||
binary.BigEndian.PutUint16(bytes, val)
|
||||
return bytes
|
||||
}
|
||||
|
||||
func ntohl(buf []byte) uint32 {
|
||||
return binary.BigEndian.Uint32(buf)
|
||||
}
|
||||
|
||||
func ntohs(buf []byte) uint16 {
|
||||
return binary.BigEndian.Uint16(buf)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue