Commit Graph

30 Commits

Author SHA1 Message Date
Lincoln Stoll
a1f8555521 Add ipvlan l3s mode
Commit 4fbae7d83c98c30efcf0a2a2ac55fbb75ef5a1a5 added l3s mode
support to the kernel, add the value here.
2016-11-03 19:53:15 -07: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
Vish Ishaya
0bc457d244 fix darwin build by moving code (#138)
Fixes issue #135
2016-06-15 08:44:14 -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
Vishvananda Ishaya
adb0f53af6 Cleanup from golint and go vet 2016-03-19 17:12:26 -07:00
Takashi Okamoto
06ac83f14a Support VXLAN udpcsum to enable UDP checksum in outer UDP header. 2016-01-09 11:11:08 +09:00
Manohar Castelino
3e9cd37dc3 Added support for setting all gretap parameters 2015-12-10 10:57:59 -08:00
Manohar Castelino
40ccc37ce5 Resolved upstream merge conflicts 2015-12-10 09:36:26 -08:00
marek-polewski
656c395788 add bond interface support 2015-12-09 13:33:45 +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
de4cc349a5 Add basic support for TUN/TAP link type and creation. 2015-09-25 10:28:19 +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
Vish Ishaya
cee28b0a8d Merge pull request #42 from ppalucki/master
macvtap support
2015-08-15 10:13:37 -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
Pawel Palucki
828e2240d3 macvtap support 2015-07-27 17:48:59 +02:00
Alexander Morozov
72a1f403a3 Add LinkAttrs constructor NewLinkAttrs
It looks little awkward, but should be enough for people who care about
defaults from kernel.

Fix #26

Also fixed bug with setting TxQLen for main device. It was never set
before.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-06-13 20:49:51 -07:00
Eugene Yakubovich
ae3e7dba57 added support for MACVLAN mode 2015-02-26 13:21:26 -08:00
Eugene Yakubovich
1fd3169564 Added ability to specify net ns at link creation
Creating a link in one namespace and then moving can
be problematic since there could be a iface name conflict.
However, it is not always possible to switch into the target
namespace either -- e.g. creating a macvlan interface must
be done in the namespace of the parent interface.
2015-02-24 15:06:07 -08:00
Alexander Morozov
8bde0c8190 Use more accustomed way to define enums
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-02-12 11:16:19 -08:00
Alexander Morozov
d710fe886a IPVlan support
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-02-11 14:18:57 -08:00
Alexander Morozov
f7f54f4512 Add TxQLen support
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2014-12-04 18:25:10 -08: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
Vishvananda Ishaya
8dab8b7462 Initial commit of netlink package 2014-08-31 20:34:46 -07:00