Commit Graph

12 Commits

Author SHA1 Message Date
Vincent Bernat c684918a4f Add more variant with options to subscribe functions
For link, address, route, add a `WithOptions` variant to the
`*Subscribe()` function to specify a namespace and an error
callback. Those options can be extended in the future without adding
more functions. For example, it could be possible to subscribe only
for a given family by adding a `Family` member to the appropriate
struct.

As a minor change, the private function is always suffixed by `At`,
since it was the case for route and raw netlink functions (but not for
address and link).
2017-09-24 11:01:49 -07:00
Stuart McLaren aec6f885c2 Add AddrReplace
Add an AddrReplace call (and tests).

Equivalent to:
 $ ip addr replace $addr dev $link
2017-03-31 10:10:22 -07:00
Aithal dedc638a06 Fix compilation errors for non linux platforms.
The go get command and make both fail when executed on
non-linux platforms. Modified it so that there are no
compilation errors when developing in such an
environment.
2017-02-20 12:00:54 -08:00
JC Martin 9438c6ff27 Add support for VTI and IPIP 2016-11-22 17:06:50 -08:00
Vishvananda Ishaya adb0f53af6 Cleanup from golint and go vet 2016-03-19 17:12:26 -07:00
Liu Hua 8580636726 add test for addList with wrong family number
Signed-off-by: Liu Hua <sdu.liu@huawei.com>
2016-02-14 15:01:37 +00:00
Vishvananda Ishaya d2daa64e4b fix and skip tests for travis 2015-12-18 12:05:30 -08:00
Hubert Krauze 124b1f4449 Table driven test for Addr 2015-12-09 11:53:28 +01:00
Hubert Krauze f351153998 Remove FlagsMask from Addr struct 2015-12-09 11:30:21 +01:00
Hubert Krauze 87df994490 Add scope and flags support for netlink address 2015-11-26 12:47:18 +01:00
Vishvananda Ishaya c84dba1b12 Convert syscall.AF_INET to FAMILY_V4 2014-09-17 09:33:53 -07:00
Vishvananda Ishaya 8dab8b7462 Initial commit of netlink package 2014-08-31 20:34:46 -07:00