Documentation ¶
Overview ¶
Package hash contains utility functions for hashing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Hash3Words ¶
Hash3Words calculates the Jenkins hash of 3 32-bit words. This is adapted from linux.
func IPv4FragmentHash ¶
IPv4FragmentHash computes the hash of the IPv4 fragment as suggested in RFC 791. 根据id,源ip,目的ip和协议类型得到hash值
func IPv6FragmentHash ¶
func IPv6FragmentHash(h header.IPv6, f header.IPv6Fragment) uint32
IPv6FragmentHash computes the hash of the ipv6 fragment. Unlike IPv4, the protocol is not used to compute the hash. RFC 2640 (sec 4.5) is not very sharp on this aspect. As a reference, also Linux ignores the protocol to compute the hash (inet6_hash_frag).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.