Sebastien Boving
a3f0be6352
Add support for tcp diags.
2017-02-04 16:48:17 -08:00
Alessandro Boch
ebdfb74020
Return 64 bits link statistics
...
Signed-off-by: Alessandro Boch <aboch@docker.com >
2017-01-17 08:21:17 -08:00
kishiguro
ade05d5c8f
Add support for VRF. With this change we can create VRF interface.
...
$ sudo ip link add vrf1 type vrf table 1
2017-01-05 13:05:17 -08:00
Shaun Crampton
7a823e360e
Parse the IFLA_OPERSTATE flag and recort in the link attributes. ( #180 )
...
The operstate gives the best picture of whether the interface is really up.
2016-12-09 14:08:27 -08:00
Martynas Pumputis
266f02d3a8
Parse IFLA_PROTINFO in LinkDeserialize
...
Extract and parse IFLA_PROTINFO fields from RTM_NEWLINK AF_BRIDGE
netlink messages.
2016-12-02 16:05:43 -08:00
JC Martin
9438c6ff27
Add support for VTI and IPIP
2016-11-22 17:06:50 -08:00
Sylvain Baubeau
18675e4393
Expose LinkDeserialize function ( #173 )
2016-11-22 12:39:47 -08:00
Vishvananda Ishaya
ffec63e1f1
add support for LinkSetVfTxRate
2016-11-07 08:35:30 -08:00
Nicolas PLANEL
8b4e34d697
[link] add Link Encapsulation Type in LinkAttr
...
Retreive the link type from Netlink GetLink information.
Aim to return the same value as nl-link-list for example :
gre0 gre <noarp,up,running,lowerup> slave-of NONE group 0 ipgre : gre0
gretap0 ether <broadcast,multicast> slave-of NONE group 0 ipgre : gretap0
dummy0 ether 36:d5:87:cf:eb:35 <broadcast,noarp> group 0
tun0 none <pointopoint,multicast,noarp> group 0
tap0 ether 4e:ce:43:4a:82:c2 <broadcast,multicast> group 0
Signed-off-by: Nicolas PLANEL <nplanel@redhat.com >
2016-11-03 19:52:05 -07:00
Alessandro Boch
da7420cab5
Expose link's raw flags ( #165 )
...
- This is needed so that caller can check link's
operational states.
Signed-off-by: Alessandro Boch <aboch@docker.com >
2016-09-20 16:53:49 -07:00
Brenden Blanco
fadc1088f6
Add support for xdp set/get of a bpf program ( #156 )
...
* Add netlink definitions for extra IFLAs
The relevant IFLA_* are defined in the kernel but not in the syscall
package.
* Parameterize the return value of loadSimpleBpf
Allow the return value of the bpf program created by loadSimpleBpf to
be specified by the caller. Before this, the value was hardcoded to 1.
* Add support for a new IFLA that enables using a bpf program as a
filter early in the driver path of some NICs.
* Add a test for set/get of an xdp program. Since currently, the XDP
IFLA is optional, check that the hardware supports it before trying to
set the field.
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com >
2016-08-25 11:08:23 -07:00
Dmitry Shulyak
49a7353739
Add functions to turn on/off promiscuous mode for interface ( #157 )
...
Analogs for:
ip l set dev eth0 promisc off
ip l set dev eth0 promisc on
2016-08-13 01:45:45 -07:00
Lukas Redynk
4e67e44a40
Tuntap: support for non-default flags ( #154 )
...
* Tuntap: support for non-default flags
* Tuntap: tap device with default flags if no flags are provided
2016-07-29 08:59:01 -07:00
Evan Farrar
e73bad418f
Changes GBP field to set a value of NULL when set. ( #145 )
...
Signed-off-by: Jay Dunkelberger <ldunkelberger@pivotal.io >
2016-06-29 12:57:46 -05:00
Alessandro Boch
fea1da6ef5
Allow to subscribe to events on a specfic netns ( #142 )
...
Signed-off-by: Alessandro Boch <aboch@docker.com >
2016-06-29 11:11:35 -05:00
Vish Ishaya
0bc457d244
fix darwin build by moving code ( #138 )
...
Fixes issue #135
2016-06-15 08:44:14 -07:00
Manohar Castelino
fb4e4d39b4
fix macvtap interface mode setup ( #137 )
...
The mode on macvtap interfaces was not being set correctly.
Due to this the mode on macvtap is always set to default.
Set the mode correctly and add unit tests to check the same
This fixes issue https://github.com/vishvananda/netlink/issues/136
Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com >
2016-06-14 22:01:11 -07:00
Alessandro Boch
339261d114
Parse link statistics ( #118 )
...
Signed-off-by: Alessandro Boch <aboch@docker.com >
2016-05-12 10:53:32 -07:00
Alessandro Boch
f116a3048a
Use package empty handle for pkg APIs ( #117 )
...
- Package methods only need an empty handle.
Not a regular Handle with a couple of
sockets creation/delete.
Signed-off-by: Alessandro Boch <aboch@docker.com >
2016-05-09 16:55:00 -07:00
Alessandro Boch
14f41c27fa
Provide netlink handle ( #104 )
...
- Ties to a netlink socket. All client requests
will re-use same socket. Socket released at
handle deletion.
- Also network namespace can be specified during
handle creation. Socket will be opened on the
specified network namespace.
Signed-off-by: Alessandro Boch <aboch@docker.com >
2016-05-08 11:35:49 -07:00
Vish Ishaya
d09ee68ad5
Make sure port is big endian ( #111 )
...
Fixes #107
2016-04-30 20:30:03 -07:00
Lei Jitang
5693665855
Typo: fix a typo in comment of LinkAdd method ( #109 )
...
Signed-off-by: Lei Jitang <leijitang@huawei.com >
2016-04-29 22:45:47 -07:00
Vishvananda Ishaya
377a621360
add SetVfHardwareAddr and SetVfVlan to link
2016-02-15 14:31:32 -08:00
Vish Ishaya
1281ba6af5
Merge pull request #82 from drzaeus77/nlmsghdr
...
Add syscall.NlMsghdr to LinkUpdate
2016-01-11 15:58:21 -08:00
Takashi Okamoto
06ac83f14a
Support VXLAN udpcsum to enable UDP checksum in outer UDP header.
2016-01-09 11:11:08 +09:00
Brenden Blanco
5b0e1a0383
Add syscall.NlMsghdr to LinkUpdate
...
Some header fields are needed in order to use LinkSubscribe, for
instance it is useful to distinguish RTM_ADDLINK from RTM_DELLINK.
2015-12-22 21:19:51 -05:00
Manohar Castelino
3e9cd37dc3
Added support for setting all gretap parameters
2015-12-10 10:57:59 -08:00
Manohar Castelino
4dbdaec42d
Merge remote-tracking branch 'krhubert_netlink/fixBond'
2015-12-10 09:44:36 -08:00
Manohar Castelino
40ccc37ce5
Resolved upstream merge conflicts
2015-12-10 09:36:26 -08:00
Hubert Krauze
0d84fd3936
Use NewLinkAttrs
2015-12-10 10:36:47 +01:00
Hubert Krauze
0fade0d7ec
Fix build error
2015-12-10 10:34:34 +01:00
Vish Ishaya
8c46a90072
Merge pull request #78 from marek-polewski/bond
...
add bond interface support
2015-12-09 21:21:57 -08:00
Vish Ishaya
3b59128e69
Merge pull request #77 from krhubert/fixLinkAdd
...
Add link.Attrs().Flags during creating link
2015-12-09 21:19:43 -08:00
marek-polewski
656c395788
add bond interface support
2015-12-09 13:33:45 +01:00
Hubert Krauze
9f8d5e7e60
Add link.Attrs().Flags during creating link
2015-12-09 12:47:37 +01:00
Hubert Krauze
a88e39d806
Check if master Bridge exists when LinkSetMaster
2015-12-09 12:25:52 +01:00
Hubert Krauze
2f58676854
Create LinkSetNoMaster function
2015-12-09 12:25:42 +01:00
Manohar Castelino
f8776950ce
Added support for creating gretap.
...
Equivalent to ip link add <name> type gretap local <localIP> remote <remoteIP> key <key>
2015-12-08 16:37:03 -08:00
Manohar Castelino
4c5782b0e9
Add support for alias set and retrieve interface by alias
2015-11-30 11:57:00 -08:00
Dimitri John Ledkov
11eac9d2ec
gofmt fixes
...
Signed-off-by: Dimitri John Ledkov <dimitri.j.ledkov@intel.com >
2015-10-01 10:09:22 +01:00
Dimitri John Ledkov
de4cc349a5
Add basic support for TUN/TAP link type and creation.
2015-09-25 10:28:19 +01:00
Vish Ishaya
ecf47fd573
Merge pull request #46 from bboreham/subscribe
...
Async updates on links and routes
2015-09-15 10:05:05 -07:00
Bryan Boreham
69942a0c81
Subscribe for async updates on links and routes
2015-08-19 15:42:33 +01:00
Vishvananda Ishaya
687e6f0b07
add link ifb and fix macvtap
2015-08-18 14:06:35 -07:00
Vishvananda Ishaya
6d78150380
rename Generic to GenericLink and add missing macvtap
2015-08-18 03:16:06 -07:00
Vishvananda Ishaya
01bbbda86c
set macvtap properly on parse
2015-08-15 10:16:04 -07:00
Vish Ishaya
4b5dce31de
Merge pull request #43 from tgraf/master
...
Support for IFLA_VXLAN_GBP flag
2015-08-14 17:19:24 -07:00
Jana Radhakrishnan
5dd6b277e6
Do not set nlmsghdr data values in ifinfomsg fields
...
Currently the netlink link_linux.go sets all sorts of nlmsghdr
values like RTM_NETLINK/RTM_SETLINK, NLM_F_REQUEST and IFLA_*
values ifinfomsg.if_type, ifinfomsg.if_flags and ifinfomsg.if_change.
This is totally incorrect since they are meant to send through to
the kernel interface specific information and not generic netlink
data. Because of this the kernel is treating them for their
expected meaning and more than likely causing a lot of unintentional
consequences.
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com >
2015-08-14 16:07:03 -07:00
Thomas Graf
c24b290c8f
Support for IFLA_VXLAN_GBP flag
...
Signed-off-by: Thomas Graf <tgraf@suug.ch >
2015-07-31 13:48:03 +02:00
Alexander Morozov
607cdbafd6
Fix LinkSetDown comment
...
Signed-off-by: Alexander Morozov <lk4d4@docker.com >
2015-06-19 13:53:18 -07:00