Commit Graph

10 Commits

Author SHA1 Message Date
Martynas Pumputis 96dce1cb9f Add LinkIndex to Addr struct
Currently, it's cumbersome to get a link by an IP addr - one needs to
list all links and then call AddrList() for each of them.

Considering that ifindex is already available to to the parseAddr()
helper function, we can expose it to a user via the newly added
Addr.LinkIndex field. This makes the retrieving link by IP addr much
more simple.

Signed-off-by: Martynas Pumputis <m@lambda.lt>
2020-06-03 11:20:50 -07:00
Toke Høiland-Jørgensen 69df5c75fb addr: Parse address lifetime information from IFA_CACHEINFO attr
This adds parsing of the preferred and valid lifetime information from the
netlink IFA_CACHEINFO attribute. They are stored as PreferedLft and ValidLft in
the Addr struct if found.

Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
2017-04-12 11:24:37 -07:00
kishiguro 6b895203a7 Broadcast address can be specified when adding address. 2017-02-02 13:05:14 -08:00
JC Martin 9438c6ff27 Add support for VTI and IPIP 2016-11-22 17:06:50 -08: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
Dan Williams b8bd116f5e Trim whitespace from Addr.String()
If the address has no label, there's extra whitespace at the end.
2015-10-15 08:26:22 -05:00
Alexander Morozov 12f4097df1 Fix some style issues as suggested by golint
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-06-18 17:41:46 -07:00
Vishvananda Ishaya 0e7e6d493a Convert addr and xfrm to use IPNet pointers 2014-09-07 11:27:46 -07:00
Vishvananda Ishaya 8dab8b7462 Initial commit of netlink package 2014-08-31 20:34:46 -07:00