Commit Graph

44 Commits

Author SHA1 Message Date
Eugene Yakubovich
a59b20a402 honor MTU in LinkAdd 2015-02-06 18:30:52 -08:00
Dave Tucker
10b7e3a40a Add link to godoc in the README
As the documentation in this library is in pretty good shape, it's
worthwhile adding a link here to GoDoc.

Signed-off-by: Dave Tucker <dave@socketplane.io>
2015-02-02 13:35:08 -08:00
Dave Tucker
f9a4246807 Add LinkSetHardwareAddr
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
2015-01-31 22:44:21 +00:00
Dave Tucker
085dc47dcc Add LinkSetName
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
2015-01-31 22:44:01 +00:00
Vishvananda Ishaya
7663a3b4b6 Dst may be nil, so don't force it to String()
Fixes #14
2015-01-14 07:59:00 -08:00
Dave Tucker
80a80badbd Implement basic route get functionality
This provides the basic functionality of the iproute2 `route get`
command. It allows you to query netlink for the route to a destination
IP.Net

While implementing I noticed that the `s.Receive()` function was hanging
after the netlink response was recieved, so I added an additional clause
to break from the loop and return the decoded message if the NLM_F_MULTI
flag is not set.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
2015-01-11 18:15:59 +00:00
Vishvananda Ishaya
7f10b9c2b8 only fmt on make all 2014-12-11 13:48:16 -08:00
Vishvananda Ishaya
3e09ca6940 Use sudo for testing 2014-12-11 11:58:33 -08:00
Alexander Morozov
7bedf70b9b Test for TxQLen
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2014-12-04 18:25:38 -08:00
Alexander Morozov
f7f54f4512 Add TxQLen support
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2014-12-04 18:25:10 -08:00
xuzhaokui
c3cc0540f8 fix addradd docs 2014-12-01 11:31:00 +08:00
Ruben Kerkhof
178d3a43f5 Fix path to git repo 2014-11-25 18:04:52 +01:00
Vishvananda Ishaya
2187ba67a2 update readme for new syntax 2014-10-31 12:37:48 -07:00
Vishvananda Ishaya
9c1aab3e9f add dependency and travis status 2014-10-31 12:33:12 -07:00
Vishvananda Ishaya
f622e51d99 updates for fmt testing 2014-10-31 12:21:50 -07:00
Vishvananda Ishaya
dfb90f83f1 skips for root priveleges 2014-10-31 12:21:39 -07:00
Vishvananda Ishaya
a383c76b6d Modified travis.yml for test 2014-10-31 11:57:26 -07:00
Vishvananda Ishaya
12d489e7d0 add .travis.yml 2014-10-31 11:48:25 -07:00
Vishvananda Ishaya
1d0a6a3ac1 add Makefile for testing 2014-10-31 11:45:51 -07:00
Eugene Yakubovich
ffab401087 gofmt: style violations have crept up 2014-10-28 17:22:52 -07:00
Eugene Yakubovich
0e908ca36d Fallback to LinkList on LinkByName when needed
Older kernels (e.g. one shipped with RHEL 6.5) don't
support RTM_GETLINK with IFLA_IFNAME. In these cases
fallback to dumping all interfaces and filtering
in userspace.
2014-10-28 14:15:07 -07:00
Eugene Yakubovich
dd2d5f17ae vxlan bug fix: check VtepDevIndex when setting IFLA_VXLAN_LINK 2014-10-19 12:23:14 -07:00
Vishvananda Ishaya
50bae0e9af Update docstrings and make linkDeserialize private 2014-10-13 19:01:36 -07:00
Eugene Yakubovich
cc912bac14 avoid dumping all interfaces to look up one 2014-10-13 18:07:39 -07:00
Eugene Yakubovich
e7911d879f Use LinkIndex instead of Link obj in Route, Neigh
Having object composition causes both client and library to
do potentially unecessary work to retrieve Link attributes
when only index is often sufficient.
2014-10-13 16:09:09 -07:00
Eugene Yakubovich
33e8718673 arp and vxlan support added 2014-10-13 11:04:09 -07:00
Vishvananda Ishaya
f87c54f846 Make links have different types 2014-09-24 16:32:16 -07:00
Andy Hill
2e7de143b9 Typo in README 2014-09-23 15:32:47 -04:00
Vishvananda Ishaya
14677ef60e add missing file 2014-09-22 22:36:00 -07:00
Vishvananda Ishaya
116d8f6e86 Optimize byte order handling 2014-09-22 08:38:23 -07:00
Vishvananda Ishaya
e69415012d Fix a couple of readme typos 2014-09-18 19:09:35 -07:00
Vishvananda Ishaya
1a26b9f251 Move all low level calls into nl subpackage 2014-09-18 19:04:48 -07:00
Vishvananda Ishaya
c84dba1b12 Convert syscall.AF_INET to FAMILY_V4 2014-09-17 09:33:53 -07:00
Vishvananda Ishaya
349cca1850 Formatting cleanup 2014-09-15 17:06:08 -07:00
Vishvananda Ishaya
c074f56200 Add support for XfrmState Encapsulation 2014-09-15 17:05:35 -07:00
Vishvananda Ishaya
88c13bcb5c Add support for more xfrm policy dir values 2014-09-15 17:03:37 -07:00
Vishvananda Ishaya
e676db42c0 Add support for ReplayWindow in XfrmState 2014-09-15 16:13:06 -07:00
Vishvananda Ishaya
72264c566c Set the limits for XfmAlgos to infinite as well 2014-09-14 20:46:58 -07:00
Vishvananda Ishaya
f093b431aa Set the limits for Xfrm to infinite 2014-09-14 18:26:20 -07:00
Vishvananda Ishaya
950b852cad Add scope parameter to route 2014-09-14 17:44:56 -07:00
Vishvananda Ishaya
0e7e6d493a Convert addr and xfrm to use IPNet pointers 2014-09-07 11:27:46 -07:00
Vishvananda Ishaya
9f98335fb3 Change route to hold pointers to structs 2014-09-07 11:27:46 -07:00
Vishvananda Ishaya
ec452b3aa1 Add helper method for creating an IPNet from an IP 2014-09-07 11:27:46 -07:00
Vishvananda Ishaya
8dab8b7462 Initial commit of netlink package 2014-08-31 20:34:46 -07:00