From ed38ca2d414bb2d894e2622d358503d9eec7e29a Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Fri, 31 Oct 2025 11:05:08 +0100 Subject: [PATCH] unix: add SizeofNhmsg and SizeofNexthopGrp These were missed in CL 227357. For golang/go#38249 Change-Id: Iab75145ae77a027e11bc4cad75300af0a510a537 Reviewed-on: https://go-review.googlesource.com/c/sys/+/716780 Auto-Submit: Tobias Klauser Reviewed-by: Michael Knyszek Reviewed-by: Michael Pratt LUCI-TryBot-Result: Go LUCI Reviewed-by: Florian Lehner --- unix/linux/types.go | 4 ++++ unix/ztypes_linux.go | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/unix/linux/types.go b/unix/linux/types.go index 7cb495f0..f8ad099a 100644 --- a/unix/linux/types.go +++ b/unix/linux/types.go @@ -3600,8 +3600,12 @@ type FsverityEnableArg C.struct_fsverity_enable_arg type Nhmsg C.struct_nhmsg +const SizeofNhmsg = C.sizeof_struct_nhmsg + type NexthopGrp C.struct_nexthop_grp +const SizeofNexthopGrp = C.sizeof_struct_nexthop_grp + const ( NHA_UNSPEC = C.NHA_UNSPEC NHA_ID = C.NHA_ID diff --git a/unix/ztypes_linux.go b/unix/ztypes_linux.go index 23cea755..c1a46701 100644 --- a/unix/ztypes_linux.go +++ b/unix/ztypes_linux.go @@ -3590,6 +3590,8 @@ type Nhmsg struct { Flags uint32 } +const SizeofNhmsg = 0x8 + type NexthopGrp struct { Id uint32 Weight uint8 @@ -3597,6 +3599,8 @@ type NexthopGrp struct { Resvd2 uint16 } +const SizeofNexthopGrp = 0x8 + const ( NHA_UNSPEC = 0x0 NHA_ID = 0x1