Skip to content

Commit 52685fb

Browse files
committed
link: add accessor for netkit specific link info
Signed-off-by: Robin Gögge <[email protected]>
1 parent ca4668a commit 52685fb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

link/link.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,14 @@ func (r Info) Netfilter() *NetfilterInfo {
220220
return e
221221
}
222222

223+
// Netkit returns netkit type-specific link info.
224+
//
225+
// Returns nil if the type-specific link info isn't available.
226+
func (r Info) Netkit() *NetkitInfo {
227+
e, _ := r.extra.(*NetkitInfo)
228+
return e
229+
}
230+
223231
// RawLink is the low-level API to bpf_link.
224232
//
225233
// You should consider using the higher level interfaces in this

0 commit comments

Comments
 (0)