MCPcopy Create free account
hub / github.com/google/nftables / Decode

Method Decode

util.go:40–47  ·  view source on GitHub ↗
(b []byte)

Source from the content-addressed store, hash-verified

38}
39
40func (genmsg *NFGenMsg) Decode(b []byte) {
41 if len(b) < 4 {
42 return
43 }
44 genmsg.NFGenFamily = b[0]
45 genmsg.Version = b[1]
46 genmsg.ResourceID = binary.BigEndian.Uint16(b[2:])
47}
48
49// NetFirstAndLastIP takes the beginning address of an entire network in CIDR
50// notation (e.g. 192.168.1.0/24) and returns the first and last IP addresses

Callers 1

parseRuleFromMsgFunction · 0.95

Calls 1

Uint16Method · 0.65

Tested by

no test coverage detected