diff options
author | Christopher Speller <crspeller@gmail.com> | 2017-06-21 19:06:17 -0700 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2017-06-21 19:06:17 -0700 |
commit | 42f28ab8e374137fe3f5d25424489d879d4724f8 (patch) | |
tree | 20353f2446b506d32e6d353b72a57bf48f070389 /vendor/golang.org/x/net/bpf | |
parent | 6b39c308d882a0aeac533f8ab1d90b48a2ae4b5a (diff) | |
download | chat-42f28ab8e374137fe3f5d25424489d879d4724f8.tar.gz chat-42f28ab8e374137fe3f5d25424489d879d4724f8.tar.bz2 chat-42f28ab8e374137fe3f5d25424489d879d4724f8.zip |
Updating server dependancies (#6712)
Diffstat (limited to 'vendor/golang.org/x/net/bpf')
-rw-r--r-- | vendor/golang.org/x/net/bpf/constants.go | 30 | ||||
-rw-r--r-- | vendor/golang.org/x/net/bpf/setter.go | 10 | ||||
-rw-r--r-- | vendor/golang.org/x/net/bpf/vm_bpf_test.go | 3 |
3 files changed, 25 insertions, 18 deletions
diff --git a/vendor/golang.org/x/net/bpf/constants.go b/vendor/golang.org/x/net/bpf/constants.go index ccf6adafb..b89ca3523 100644 --- a/vendor/golang.org/x/net/bpf/constants.go +++ b/vendor/golang.org/x/net/bpf/constants.go @@ -76,54 +76,54 @@ const ( // ExtLen returns the length of the packet. ExtLen Extension = 1 // ExtProto returns the packet's L3 protocol type. - ExtProto = 0 + ExtProto Extension = 0 // ExtType returns the packet's type (skb->pkt_type in the kernel) // // TODO: better documentation. How nice an API do we want to // provide for these esoteric extensions? - ExtType = 4 + ExtType Extension = 4 // ExtPayloadOffset returns the offset of the packet payload, or // the first protocol header that the kernel does not know how to // parse. - ExtPayloadOffset = 52 + ExtPayloadOffset Extension = 52 // ExtInterfaceIndex returns the index of the interface on which // the packet was received. - ExtInterfaceIndex = 8 + ExtInterfaceIndex Extension = 8 // ExtNetlinkAttr returns the netlink attribute of type X at // offset A. - ExtNetlinkAttr = 12 + ExtNetlinkAttr Extension = 12 // ExtNetlinkAttrNested returns the nested netlink attribute of // type X at offset A. - ExtNetlinkAttrNested = 16 + ExtNetlinkAttrNested Extension = 16 // ExtMark returns the packet's mark value. - ExtMark = 20 + ExtMark Extension = 20 // ExtQueue returns the packet's assigned hardware queue. - ExtQueue = 24 + ExtQueue Extension = 24 // ExtLinkLayerType returns the packet's hardware address type // (e.g. Ethernet, Infiniband). - ExtLinkLayerType = 28 + ExtLinkLayerType Extension = 28 // ExtRXHash returns the packets receive hash. // // TODO: figure out what this rxhash actually is. - ExtRXHash = 32 + ExtRXHash Extension = 32 // ExtCPUID returns the ID of the CPU processing the current // packet. - ExtCPUID = 36 + ExtCPUID Extension = 36 // ExtVLANTag returns the packet's VLAN tag. - ExtVLANTag = 44 + ExtVLANTag Extension = 44 // ExtVLANTagPresent returns non-zero if the packet has a VLAN // tag. // // TODO: I think this might be a lie: it reads bit 0x1000 of the // VLAN header, which changed meaning in recent revisions of the // spec - this extension may now return meaningless information. - ExtVLANTagPresent = 48 + ExtVLANTagPresent Extension = 48 // ExtVLANProto returns 0x8100 if the frame has a VLAN header, // 0x88a8 if the frame has a "Q-in-Q" double VLAN header, or some // other value if no VLAN information is present. - ExtVLANProto = 60 + ExtVLANProto Extension = 60 // ExtRand returns a uniformly random uint32. - ExtRand = 56 + ExtRand Extension = 56 ) // The following gives names to various bit patterns used in opcode construction. diff --git a/vendor/golang.org/x/net/bpf/setter.go b/vendor/golang.org/x/net/bpf/setter.go new file mode 100644 index 000000000..43e35f0ac --- /dev/null +++ b/vendor/golang.org/x/net/bpf/setter.go @@ -0,0 +1,10 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package bpf + +// A Setter is a type which can attach a compiled BPF filter to itself. +type Setter interface { + SetBPF(filter []RawInstruction) error +} diff --git a/vendor/golang.org/x/net/bpf/vm_bpf_test.go b/vendor/golang.org/x/net/bpf/vm_bpf_test.go index 76dd970e6..77fa8fe4a 100644 --- a/vendor/golang.org/x/net/bpf/vm_bpf_test.go +++ b/vendor/golang.org/x/net/bpf/vm_bpf_test.go @@ -149,9 +149,6 @@ func testOSVM(t *testing.T, filter []bpf.Instruction) (virtualMachine, func()) { p := ipv4.NewPacketConn(l) if err = p.SetBPF(prog); err != nil { - if err.Error() == "operation not supported" { // TODO: gross. remove once 19051 fixed. - t.Skip("Skipping until Issue 19051 is fixed.") - } t.Fatalf("failed to attach BPF program to listener: %v", err) } |