mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-03 23:57:32 -04:00
unix: move ICMP{,V6}_FILTER* const definitions
The C headers defining these constants pull in <netinet/in.h> which leads to definition conflicts between kernel and glibc headers when running mkerrors.sh for Linux kernel 5.13. Avoid these by moving this const definitions to linux/types.go. For golang/go#47057 Change-Id: I09a2391dfe4c6bb38b7069e952748070c10824e6 Reviewed-on: https://go-review.googlesource.com/c/sys/+/332929 Trust: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
committed by
Tobias Klauser
parent
30e4713e60
commit
b1c119fd70
@@ -98,6 +98,7 @@ struct termios2 {
|
|||||||
#include <linux/genetlink.h>
|
#include <linux/genetlink.h>
|
||||||
#include <linux/hdreg.h>
|
#include <linux/hdreg.h>
|
||||||
#include <linux/hidraw.h>
|
#include <linux/hidraw.h>
|
||||||
|
#include <linux/icmp.h>
|
||||||
#include <linux/icmpv6.h>
|
#include <linux/icmpv6.h>
|
||||||
#include <linux/if_alg.h>
|
#include <linux/if_alg.h>
|
||||||
#include <linux/if_bridge.h>
|
#include <linux/if_bridge.h>
|
||||||
@@ -804,6 +805,18 @@ type NdUseroptmsg C.struct_nduseroptmsg
|
|||||||
|
|
||||||
type NdMsg C.struct_ndmsg
|
type NdMsg C.struct_ndmsg
|
||||||
|
|
||||||
|
// ICMP socket options
|
||||||
|
|
||||||
|
const (
|
||||||
|
ICMP_FILTER = C.ICMP_FILTER
|
||||||
|
|
||||||
|
ICMPV6_FILTER = C.ICMPV6_FILTER
|
||||||
|
ICMPV6_FILTER_BLOCK = C.ICMPV6_FILTER_BLOCK
|
||||||
|
ICMPV6_FILTER_BLOCKOTHERS = C.ICMPV6_FILTER_BLOCKOTHERS
|
||||||
|
ICMPV6_FILTER_PASS = C.ICMPV6_FILTER_PASS
|
||||||
|
ICMPV6_FILTER_PASSONLY = C.ICMPV6_FILTER_PASSONLY
|
||||||
|
)
|
||||||
|
|
||||||
// Linux socket filter
|
// Linux socket filter
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -217,8 +217,6 @@ struct ltchars {
|
|||||||
#include <linux/genetlink.h>
|
#include <linux/genetlink.h>
|
||||||
#include <linux/hdreg.h>
|
#include <linux/hdreg.h>
|
||||||
#include <linux/hidraw.h>
|
#include <linux/hidraw.h>
|
||||||
#include <linux/icmp.h>
|
|
||||||
#include <linux/icmpv6.h>
|
|
||||||
#include <linux/if.h>
|
#include <linux/if.h>
|
||||||
#include <linux/if_addr.h>
|
#include <linux/if_addr.h>
|
||||||
#include <linux/if_alg.h>
|
#include <linux/if_alg.h>
|
||||||
|
|||||||
@@ -981,12 +981,6 @@ const (
|
|||||||
HPFS_SUPER_MAGIC = 0xf995e849
|
HPFS_SUPER_MAGIC = 0xf995e849
|
||||||
HUGETLBFS_MAGIC = 0x958458f6
|
HUGETLBFS_MAGIC = 0x958458f6
|
||||||
IBSHIFT = 0x10
|
IBSHIFT = 0x10
|
||||||
ICMPV6_FILTER = 0x1
|
|
||||||
ICMPV6_FILTER_BLOCK = 0x1
|
|
||||||
ICMPV6_FILTER_BLOCKOTHERS = 0x3
|
|
||||||
ICMPV6_FILTER_PASS = 0x2
|
|
||||||
ICMPV6_FILTER_PASSONLY = 0x4
|
|
||||||
ICMP_FILTER = 0x1
|
|
||||||
ICRNL = 0x100
|
ICRNL = 0x100
|
||||||
IFA_F_DADFAILED = 0x8
|
IFA_F_DADFAILED = 0x8
|
||||||
IFA_F_DEPRECATED = 0x20
|
IFA_F_DEPRECATED = 0x20
|
||||||
|
|||||||
@@ -681,6 +681,16 @@ type NdMsg struct {
|
|||||||
Type uint8
|
Type uint8
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
ICMP_FILTER = 0x1
|
||||||
|
|
||||||
|
ICMPV6_FILTER = 0x1
|
||||||
|
ICMPV6_FILTER_BLOCK = 0x1
|
||||||
|
ICMPV6_FILTER_BLOCKOTHERS = 0x3
|
||||||
|
ICMPV6_FILTER_PASS = 0x2
|
||||||
|
ICMPV6_FILTER_PASSONLY = 0x4
|
||||||
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
SizeofSockFilter = 0x8
|
SizeofSockFilter = 0x8
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user