Documentation ¶
Index ¶
- Constants
- Variables
- func AddTextField(name string, jtype int)
- func FormatMessageReflectCustom(msg proto.Message, ext, quotes, sep, sign string, null bool) string
- func FormatMessageReflectJSON(msg proto.Message, ext string) string
- func FormatMessageReflectText(msg proto.Message, 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 proto.Message, fields []string) []uint64
- func RenderExtraFunctionEtypeName(msg proto.Message) string
- func RenderExtraFunctionIcmpName(msg proto.Message) string
- func RenderExtraFunctionProtoName(msg proto.Message) 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 = []string{ "Type", "TimeReceived", "SequenceNum", "SamplingRate", "SamplerAddress", "TimeFlowStart", "TimeFlowEnd", "Bytes", "Packets", "SrcAddr", "DstAddr", "Etype", "Proto", "SrcPort", "DstPort", "InIf", "OutIf", "SrcMac", "DstMac", "SrcVlan", "DstVlan", "VlanId", "IngressVrfID", "EgressVrfID", "IPTos", "ForwardingStatus", "IPTTL", "TCPFlags", "IcmpType", "IcmpCode", "IPv6FlowLabel", "FragmentId", "FragmentOffset", "BiFlowDirection", "SrcAS", "DstAS", "NextHop", "NextHopAS", "SrcNet", "DstNet", } TextFieldsTypes = []int{ FORMAT_TYPE_STRING_FUNC, FORMAT_TYPE_INTEGER, FORMAT_TYPE_INTEGER, FORMAT_TYPE_INTEGER, FORMAT_TYPE_IP, FORMAT_TYPE_INTEGER, FORMAT_TYPE_INTEGER, FORMAT_TYPE_INTEGER, FORMAT_TYPE_INTEGER, FORMAT_TYPE_IP, FORMAT_TYPE_IP, FORMAT_TYPE_INTEGER, FORMAT_TYPE_INTEGER, FORMAT_TYPE_INTEGER, FORMAT_TYPE_INTEGER, FORMAT_TYPE_INTEGER, FORMAT_TYPE_INTEGER, FORMAT_TYPE_MAC, FORMAT_TYPE_MAC, FORMAT_TYPE_INTEGER, FORMAT_TYPE_INTEGER, FORMAT_TYPE_INTEGER, FORMAT_TYPE_INTEGER, FORMAT_TYPE_INTEGER, FORMAT_TYPE_INTEGER, FORMAT_TYPE_INTEGER, FORMAT_TYPE_INTEGER, FORMAT_TYPE_INTEGER, FORMAT_TYPE_INTEGER, FORMAT_TYPE_INTEGER, FORMAT_TYPE_INTEGER, FORMAT_TYPE_INTEGER, FORMAT_TYPE_INTEGER, FORMAT_TYPE_INTEGER, FORMAT_TYPE_INTEGER, FORMAT_TYPE_INTEGER, FORMAT_TYPE_IP, FORMAT_TYPE_INTEGER, FORMAT_TYPE_INTEGER, FORMAT_TYPE_INTEGER, } RenderExtras = []string{ "EtypeName", "ProtoName", "IcmpName", } RenderExtraCall = []RenderExtraFunction{ RenderExtraFunctionEtypeName, RenderExtraFunctionProtoName, RenderExtraFunctionIcmpName, } )
Functions ¶
func AddTextField ¶
func HashProtoLocal ¶
func HashProtoLocal(msg interface{}) string
func IcmpCodeType ¶
func ManualHashInit ¶
func ManualHashInit() error
func ManualSelectorInit ¶
func ManualSelectorInit() error
func RenderExtraFetchNumbers ¶
func SelectorFlag ¶
func SelectorFlag()
Types ¶
type RenderExtraFunction ¶
Click to show internal directories.
Click to hide internal directories.