(b []byte)
| 38 | } |
| 39 | |
| 40 | func (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 |
no test coverage detected