1 // Copyright 2013 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
7 func (f *icmpv6Filter) accept(typ ICMPType) {
8 f.Data[typ>>5] &^= 1 << (uint32(typ) & 31)
11 func (f *icmpv6Filter) block(typ ICMPType) {
12 f.Data[typ>>5] |= 1 << (uint32(typ) & 31)
15 func (f *icmpv6Filter) setAll(block bool) {
16 for i := range f.Data {
25 func (f *icmpv6Filter) willBlock(typ ICMPType) bool {
26 return f.Data[typ>>5]&(1<<(uint32(typ)&31)) != 0