Skip to content

Commit

Permalink
link: add accessor for netkit specific link info
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Gögge <r.goegge@isovalent.com>
  • Loading branch information
rgo3 authored and lmb committed Mar 22, 2024
1 parent 40d4717 commit 6f21619
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions link/link.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,14 @@ func (r Info) Netfilter() *NetfilterInfo {
return e
}

// Netkit returns netkit type-specific link info.
//
// Returns nil if the type-specific link info isn't available.
func (r Info) Netkit() *NetkitInfo {
e, _ := r.extra.(*NetkitInfo)
return e
}

// RawLink is the low-level API to bpf_link.
//
// You should consider using the higher level interfaces in this
Expand Down

0 comments on commit 6f21619

Please sign in to comment.