Skip to content

Commit e3b113b

Browse files
committed
unix: add nexthop types and consts
Fixes golang/go#38249 Change-Id: Ie8149ac16d09e76d6c5aa4d47edd947a647c381f Reviewed-on: https://go-review.googlesource.com/c/sys/+/227357 Run-TryBot: Tobias Klauser <[email protected]> Reviewed-by: Matt Layher <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent c6e801f commit e3b113b

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

unix/linux/types.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ struct termios2 {
106106
#include <linux/netfilter/nfnetlink.h>
107107
#include <linux/netfilter.h>
108108
#include <linux/netlink.h>
109+
#include <linux/nexthop.h>
109110
#include <linux/openat2.h>
110111
#include <linux/perf_event.h>
111112
#include <linux/random.h>
@@ -2303,3 +2304,23 @@ const (
23032304
type FsverityDigest C.struct_fsverity_digest
23042305

23052306
type FsverityEnableArg C.struct_fsverity_enable_arg
2307+
2308+
// nexthop
2309+
2310+
type Nhmsg C.struct_nhmsg
2311+
2312+
type NexthopGrp C.struct_nexthop_grp
2313+
2314+
const (
2315+
NHA_UNSPEC = C.NHA_UNSPEC
2316+
NHA_ID = C.NHA_ID
2317+
NHA_GROUP = C.NHA_GROUP
2318+
NHA_GROUP_TYPE = C.NHA_GROUP_TYPE
2319+
NHA_BLACKHOLE = C.NHA_BLACKHOLE
2320+
NHA_OIF = C.NHA_OIF
2321+
NHA_GATEWAY = C.NHA_GATEWAY
2322+
NHA_ENCAP_TYPE = C.NHA_ENCAP_TYPE
2323+
NHA_ENCAP = C.NHA_ENCAP
2324+
NHA_GROUPS = C.NHA_GROUPS
2325+
NHA_MASTER = C.NHA_MASTER
2326+
)

unix/ztypes_linux.go

Lines changed: 29 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)