Documentation ¶
Overview ¶
Copyright 2019 BlueCat Networks (USA) Inc. and its affiliates
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
const ( IPv6MaximumSize = 65535 IPv6MaximumFragmentOffset = 8191 IPv6MaximumFragmentListLen = 8191 )
need to check
Variables ¶
This section is empty.
Functions ¶
func BenchmarkDefrag ¶
func TestDefragBCDNS ¶
func TestDontFragBCDNS ¶
Types ¶
type IPv6Defragmenter ¶
IPv6Defragmenter is a struct which embedded a map of all fragment/packet.
func NewIPv6Defragmenter ¶
func NewIPv6Defragmenter() *IPv6Defragmenter
NewIPv6Defragmenter returns a new IPv6Defragmenter with an initialized map.
func (*IPv6Defragmenter) DefragIPv6 ¶
DefragIPv6 takes in an IPv6 packet with a fragment payload.
func (*IPv6Defragmenter) DefragIPv6WithTimestamp ¶
func (d *IPv6Defragmenter) DefragIPv6WithTimestamp(in *layers.IPv6, t time.Time) (*layers.IPv6, error)
DefragIPv6WithTimestamp provides functionality of DefragIPv6 with an additional timestamp parameter which is used for discarding old fragments instead of time.Now()
This is useful when operating on pcap files instead of live captured data
func (*IPv6Defragmenter) DiscardOlderThan ¶
func (d *IPv6Defragmenter) DiscardOlderThan(t time.Time) int
DiscardOlderThan forgets all packets without any activity since time t. It returns the number of FragmentList aka number of fragment packets it has discarded.