Skip to content

Commit

Permalink
feature: Add wireguard link type
Browse files Browse the repository at this point in the history
Added type "Wireguard" which implements link type "wireguard".

See also https://www.wireguard.com/

Signed-off-by: Dmitrii Okunev <xaionaro@fb.com>
  • Loading branch information
xaionaro committed Jun 3, 2020
1 parent 5a869a7 commit 8ccf511
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions link.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,19 @@ func (veth *Veth) Type() string {
return "veth"
}

// Wireguard represent links of type "wireguard", see https://www.wireguard.com/
type Wireguard struct {
LinkAttrs
}

func (wg *Wireguard) Attrs() *LinkAttrs {
return &wg.LinkAttrs
}

func (wg *Wireguard) Type() string {
return "wireguard"
}

// GenericLink links represent types that are not currently understood
// by this netlink library.
type GenericLink struct {
Expand Down

0 comments on commit 8ccf511

Please sign in to comment.