Expose a lower-level JoinGroup and LeaveGroup interface.
This enables the use of newer APIs for watching IPv4 and IPv6 rule
changes via netlink groups.
Example:
```go
conn.JoinGroup(unix.RTNLGRP_IPV4_RULE)
conn.JoinGroup(unix.RTNLGRP_IPV6_RULE)
conn.LeaveGroup(unix.RTNLGRP_IPV4_RULE)
conn.LeaveGroup(unix.RTNLGRP_IPV6_RULE)
```
Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
the linux kernel handles a RTM_GETLINK request even in case of incorrect
kind filter. if it finds requested kind it responds with
a list of this kind of links and marks every message in a response
by NLM_F_DUMP_FILTERED flag. Otherwise it sends all available links
w/o NLF_F_DUMP_FILTERED. So, looks much better to return to a callee
empty link list if there are no links of requested kind.
Signed-off-by: Andrey Grafin <conquistador@yandex-team.ru>
Co-authored-by: Andrey Grafin <conquistador@yandex-team.ru>
This will change the way messages are send and received to a
goroutine concurrent safe netlink.Execute call.
Signed-off-by: Jeroen Simonetti <jeroen@simonetti.nl>
* Basic RouteService
* Netlink header flag name changed in netlink lib
* Add fallthrough for RTM_GETROUTE and RTM_DELROUTE message parsing
* RouteService tests
* Update conn_test to use new netlink header flag names
* Fix off-by-one bug in AddressMessage.UnmarshalBinary()
* Update address test for off-by-one bug in AddressMessage.UnmarshalBinary()
* Fix case statement in messageUnmarshall