1 // Copyright 2014 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 *icmpFilter) accept(typ ICMPType) {
8 f.Data &^= 1 << (uint32(typ) & 31)
11 func (f *icmpFilter) block(typ ICMPType) {
12 f.Data |= 1 << (uint32(typ) & 31)
15 func (f *icmpFilter) setAll(block bool) {
23 func (f *icmpFilter) willBlock(typ ICMPType) bool {
24 return f.Data&(1<<(uint32(typ)&31)) != 0