Documentation ¶
Index ¶
- Constants
- Variables
- func ExtractTag(name, original string, tag reflect.StructTag) string
- func FormatMessageReflectCustom(msg interface{}, ext, quotes, sep, sign string, null bool) string
- func FormatMessageReflectJSON(msg interface{}, ext string) string
- func FormatMessageReflectText(msg interface{}, ext string) string
- func HashFlag()
- func HashProto(fields []string, msg interface{}) string
- func HashProtoLocal(msg interface{}) string
- func IcmpCodeType(proto, icmpCode, icmpType uint32) string
- func ManualHashInit() error
- func ManualSelectorInit() error
- func RenderExtraFetchNumbers(msg interface{}, fields []string) []uint64
- func RenderExtraFunctionEtypeName(msg interface{}) string
- func RenderExtraFunctionIcmpName(msg interface{}) string
- func RenderExtraFunctionProtoName(msg interface{}) string
- func RenderIP(addr []byte) string
- func SelectorFlag()
- type RenderExtraFunction
Constants ¶
View Source
const ( FORMAT_TYPE_UNKNOWN = iota FORMAT_TYPE_STRING_FUNC FORMAT_TYPE_STRING FORMAT_TYPE_INTEGER FORMAT_TYPE_IP FORMAT_TYPE_MAC FORMAT_TYPE_BYTES )
Variables ¶
View Source
var ( EtypeName = map[uint32]string{ 0x806: "ARP", 0x800: "IPv4", 0x86dd: "IPv6", } ProtoName = map[uint32]string{ 1: "ICMP", 6: "TCP", 17: "UDP", 58: "ICMPv6", 132: "SCTP", } IcmpTypeName = map[uint32]string{ 0: "EchoReply", 3: "DestinationUnreachable", 8: "Echo", 9: "RouterAdvertisement", 10: "RouterSolicitation", 11: "TimeExceeded", } Icmp6TypeName = map[uint32]string{ 1: "DestinationUnreachable", 2: "PacketTooBig", 3: "TimeExceeded", 128: "EchoRequest", 129: "EchoReply", 133: "RouterSolicitation", 134: "RouterAdvertisement", } TextFields = map[string]int{ "Type": FORMAT_TYPE_STRING_FUNC, "SamplerAddress": FORMAT_TYPE_IP, "SrcAddr": FORMAT_TYPE_IP, "DstAddr": FORMAT_TYPE_IP, "SrcMac": FORMAT_TYPE_MAC, "DstMac": FORMAT_TYPE_MAC, "NextHop": FORMAT_TYPE_IP, "MPLSLabelIP": FORMAT_TYPE_IP, } RenderExtras = map[string]RenderExtraFunction{ "EtypeName": RenderExtraFunctionEtypeName, "ProtoName": RenderExtraFunctionProtoName, "IcmpName": RenderExtraFunctionIcmpName, } )
Functions ¶
func ExtractTag ¶ added in v1.2.0
func HashProtoLocal ¶
func HashProtoLocal(msg interface{}) string
func IcmpCodeType ¶
func ManualHashInit ¶
func ManualHashInit() error
func ManualSelectorInit ¶
func ManualSelectorInit() error
func RenderExtraFetchNumbers ¶
func RenderExtraFunctionEtypeName ¶
func RenderExtraFunctionEtypeName(msg interface{}) string
func RenderExtraFunctionIcmpName ¶
func RenderExtraFunctionIcmpName(msg interface{}) string
func RenderExtraFunctionProtoName ¶
func RenderExtraFunctionProtoName(msg interface{}) string
func SelectorFlag ¶
func SelectorFlag()
Types ¶
type RenderExtraFunction ¶
type RenderExtraFunction func(interface{}) string
Click to show internal directories.
Click to hide internal directories.