diff --git a/pb/flow.pb.go b/pb/flow.pb.go index 874ed38..9c1a286 100644 --- a/pb/flow.pb.go +++ b/pb/flow.pb.go @@ -5,9 +5,8 @@ package flowprotob import ( fmt "fmt" - math "math" - proto "github.com/golang/protobuf/proto" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. @@ -125,16 +124,19 @@ type FlowMessage struct { FragmentIdEncap uint32 `protobuf:"varint,51,opt,name=FragmentIdEncap,proto3" json:"FragmentIdEncap,omitempty"` FragmentOffsetEncap uint32 `protobuf:"varint,52,opt,name=FragmentOffsetEncap,proto3" json:"FragmentOffsetEncap,omitempty"` // MPLS information - HasMPLS bool `protobuf:"varint,53,opt,name=HasMPLS,proto3" json:"HasMPLS,omitempty"` - MPLSCount uint32 `protobuf:"varint,54,opt,name=MPLSCount,proto3" json:"MPLSCount,omitempty"` - MPLS1TTL uint32 `protobuf:"varint,55,opt,name=MPLS1TTL,proto3" json:"MPLS1TTL,omitempty"` - MPLS1Label uint32 `protobuf:"varint,56,opt,name=MPLS1Label,proto3" json:"MPLS1Label,omitempty"` - MPLS2TTL uint32 `protobuf:"varint,57,opt,name=MPLS2TTL,proto3" json:"MPLS2TTL,omitempty"` - MPLS2Label uint32 `protobuf:"varint,58,opt,name=MPLS2Label,proto3" json:"MPLS2Label,omitempty"` - MPLS3TTL uint32 `protobuf:"varint,59,opt,name=MPLS3TTL,proto3" json:"MPLS3TTL,omitempty"` - MPLS3Label uint32 `protobuf:"varint,60,opt,name=MPLS3Label,proto3" json:"MPLS3Label,omitempty"` - MPLSLastTTL uint32 `protobuf:"varint,61,opt,name=MPLSLastTTL,proto3" json:"MPLSLastTTL,omitempty"` - MPLSLastLabel uint32 `protobuf:"varint,62,opt,name=MPLSLastLabel,proto3" json:"MPLSLastLabel,omitempty"` + HasMPLS bool `protobuf:"varint,53,opt,name=HasMPLS,proto3" json:"HasMPLS,omitempty"` + MPLSCount uint32 `protobuf:"varint,54,opt,name=MPLSCount,proto3" json:"MPLSCount,omitempty"` + MPLS1TTL uint32 `protobuf:"varint,55,opt,name=MPLS1TTL,proto3" json:"MPLS1TTL,omitempty"` + MPLS1Label uint32 `protobuf:"varint,56,opt,name=MPLS1Label,proto3" json:"MPLS1Label,omitempty"` + MPLS2TTL uint32 `protobuf:"varint,57,opt,name=MPLS2TTL,proto3" json:"MPLS2TTL,omitempty"` + MPLS2Label uint32 `protobuf:"varint,58,opt,name=MPLS2Label,proto3" json:"MPLS2Label,omitempty"` + MPLS3TTL uint32 `protobuf:"varint,59,opt,name=MPLS3TTL,proto3" json:"MPLS3TTL,omitempty"` + MPLS3Label uint32 `protobuf:"varint,60,opt,name=MPLS3Label,proto3" json:"MPLS3Label,omitempty"` + MPLSLastTTL uint32 `protobuf:"varint,61,opt,name=MPLSLastTTL,proto3" json:"MPLSLastTTL,omitempty"` + MPLSLastLabel uint32 `protobuf:"varint,62,opt,name=MPLSLastLabel,proto3" json:"MPLSLastLabel,omitempty"` + // PPP information + HasPPP bool `protobuf:"varint,63,opt,name=HasPPP,proto3" json:"HasPPP,omitempty"` + PPPAddressControl uint32 `protobuf:"varint,64,opt,name=PPPAddressControl,proto3" json:"PPPAddressControl,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -592,6 +594,20 @@ func (m *FlowMessage) GetMPLSLastLabel() uint32 { return 0 } +func (m *FlowMessage) GetHasPPP() bool { + if m != nil { + return m.HasPPP + } + return false +} + +func (m *FlowMessage) GetPPPAddressControl() uint32 { + if m != nil { + return m.PPPAddressControl + } + return 0 +} + func init() { proto.RegisterEnum("flowprotob.FlowMessage_FlowType", FlowMessage_FlowType_name, FlowMessage_FlowType_value) proto.RegisterType((*FlowMessage)(nil), "flowprotob.FlowMessage") @@ -600,62 +616,64 @@ func init() { func init() { proto.RegisterFile("pb/flow.proto", fileDescriptor_0beab9b6746e934c) } var fileDescriptor_0beab9b6746e934c = []byte{ - // 909 bytes of a gzipped FileDescriptor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 0xac, 0xec, 0x6a, 0xae, - 0x22, 0x15, 0xc3, 0x17, 0xeb, 0xd5, 0xa0, 0xb4, 0xab, 0x21, 0xe7, 0x68, 0xbd, 0x1a, 0x72, 0x0e, - 0xc4, 0x06, 0xfe, 0x3a, 0x01, 0x7c, 0x46, 0x86, 0x55, 0x38, 0x23, 0x4e, 0x1c, 0x62, 0xf3, 0xae, - 0xd2, 0x99, 0x73, 0x06, 0x5f, 0x93, 0x5b, 0x61, 0xd8, 0xaf, 0x7e, 0x29, 0xa4, 0xcd, 0x93, 0x56, - 0x42, 0xb8, 0x2f, 0x67, 0xec, 0x25, 0x19, 0x7c, 0xcc, 0xfb, 0x22, 0x21, 0x1f, 0x8b, 0xe6, 0x20, - 0x49, 0xaf, 0x55, 0x1a, 0xcc, 0xe3, 0xd0, 0x35, 0xca, 0xac, 0x32, 0x00, 0x0a, 0xf8, 0x1f, 0xb7, - 0x15, 0xbc, 0x21, 0x7c, 0xb2, 0xae, 0xe0, 0x0d, 0xe5, 0xa1, 0xd8, 0xf2, 0x4e, 0xc7, 0x83, 0x48, - 0x85, 0x19, 0x1c, 0x92, 0xb1, 0xd6, 0xe8, 0x39, 0xfe, 0x62, 0x49, 0xb7, 0xeb, 0x73, 0xf6, 0x72, - 0x9d, 0x7b, 0xa7, 0x49, 0xa0, 0xa1, 0x55, 0x78, 0xa8, 0x71, 0x46, 0x9d, 0xf1, 0xdb, 0x97, 0x38, - 0x6a, 0x43, 0x35, 0xd5, 0x11, 0x7c, 0xc5, 0x13, 0x5f, 0x81, 0xf2, 0x81, 0x10, 0x83, 0x54, 0x85, - 0x0b, 0x1d, 0x1b, 0x27, 0x80, 0x2f, 0x29, 0xa4, 0x44, 0xf0, 0x46, 0xe4, 0xea, 0x72, 0x36, 0xcb, - 0xb4, 0x81, 0x87, 0x14, 0x73, 0x83, 0xca, 0xb6, 0xd8, 0x3f, 0x99, 0x57, 0x6f, 0xd8, 0x37, 0x14, - 0x78, 0x13, 0xe3, 0x09, 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ped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x96, 0x6f, 0x73, 0xda, 0xc6, + 0x13, 0xc7, 0x7f, 0x24, 0xc4, 0x7f, 0x0e, 0x63, 0x93, 0x4b, 0x7e, 0xee, 0xd6, 0x4d, 0x53, 0xea, + 0xa6, 0x29, 0x4d, 0x52, 0x92, 0x40, 0x9c, 0x36, 0xfd, 0x1f, 0xdb, 0x30, 0xd6, 0x14, 0x63, 0x0d, + 0xa2, 0x4e, 0x9f, 0x75, 0x0e, 0xe9, 0x60, 0x98, 0x0a, 0x89, 0x4a, 0x47, 0xdc, 0xbc, 0x85, 0xbe, + 0xea, 0xce, 0xee, 0x9e, 0x90, 0xe4, 0xe4, 0x11, 0xfa, 0x7e, 0xbe, 0xbb, 0xcb, 0xdd, 0xed, 0x9e, + 0x40, 0xd4, 0x97, 0x93, 0xa7, 0xd3, 0x30, 0xbe, 0x6a, 0x2f, 0x93, 0xd8, 0xc4, 0x52, 0xe0, 0x33, + 0x3d, 0x4e, 0x0e, 0xff, 0x6d, 0x88, 0x5a, 0x3f, 0x8c, 0xaf, 0xce, 0x75, 0x9a, 0xaa, 0x99, 0x96, + 0x2f, 0x44, 0x75, 0xfc, 0x6e, 0xa9, 0xa1, 0xd2, 0xac, 0xb4, 0x76, 0x3b, 0xcd, 0x76, 0x1e, 0xda, + 0x2e, 0x84, 0xd1, 0x33, 0xc6, 0x8d, 0x28, 0x5a, 0x1e, 0x8a, 0x9d, 0xf1, 0x7c, 0xa1, 0x47, 0xda, + 0xd7, 0xf3, 0xb7, 0x3a, 0x80, 0x1b, 0xcd, 0x4a, 0xab, 0x3a, 0x2a, 0x31, 0xd9, 0x14, 0x35, 0x4f, + 0xff, 0xbd, 0xd2, 0x91, 0xaf, 0x87, 0xab, 0x05, 0x54, 0x9b, 0x95, 0x56, 0x7d, 0x54, 0x44, 0x58, + 0xc5, 0x53, 0x8b, 0x65, 0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x0d, + 0xfd, 0x05, 0x50, 0xb3, 0xd9, 0x71, 0xbd, 0xf0, 0x07, 0xc0, 0x9d, 0x4c, 0x36, 0xe8, 0x6f, 0x41, + 0xf7, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xaa, 0x12, 0x2f, 0x89, 0x5d, 0x08, 0x00, 0x00, } diff --git a/pb/flow.proto b/pb/flow.proto index 5b4d441..54fc75c 100644 --- a/pb/flow.proto +++ b/pb/flow.proto @@ -113,6 +113,10 @@ message FlowMessage { uint32 MPLSLastTTL = 61; // Last TTL uint32 MPLSLastLabel = 62; // Last Label + // PPP information + bool HasPPP = 63; + uint32 PPPAddressControl = 64; + // Custom fields: start after ID 1000: // uint32 MyCustomField = 1000; diff --git a/producer/producer_sf.go b/producer/producer_sf.go index 12e5212..1bb4153 100644 --- a/producer/producer_sf.go +++ b/producer/producer_sf.go @@ -39,6 +39,8 @@ func ParseSampledHeaderConfig(flowMessage *flowmessage.FlowMessage, sampledHeade data := (*sampledHeader).HeaderData switch (*sampledHeader).Protocol { case 1: // Ethernet + var hasPPP bool + var pppAddressControl uint16 var hasMPLS bool var countMpls uint32 var firstLabelMpls uint32 @@ -188,12 +190,28 @@ func ParseSampledHeaderConfig(flowMessage *flowmessage.FlowMessage, sampledHeade // GRE if len(data) >= offset+4 && nextHeader == 47 { etherTypeEncap = data[offset+2 : offset+4] + offset += 4 if (etherTypeEncap[0] == 0x8 && etherTypeEncap[1] == 0x0) || (etherTypeEncap[0] == 0x86 && etherTypeEncap[1] == 0xdd) { encap = true hasEncap = true } - offset += 4 + if etherTypeEncap[0] == 0x88 && etherTypeEncap[1] == 0x0b && len(data) >= offset+12 { + offset += 8 + encap = true + hasPPP = true + pppAddressControl = binary.BigEndian.Uint16(data[offset : offset+2]) + pppEtherType := data[offset+2 : offset+4] + if pppEtherType[0] == 0x0 && pppEtherType[1] == 0x21 { + etherTypeEncap = []byte{0x8, 0x00} + hasEncap = true + } else if pppEtherType[0] == 0x0 && pppEtherType[1] == 0x57 { + etherTypeEncap = []byte{0x86, 0xdd} + hasEncap = true + } + offset += 4 + + } if hasEncap { srcIPEncap = srcIP @@ -249,6 +267,9 @@ func ParseSampledHeaderConfig(flowMessage *flowmessage.FlowMessage, sampledHeade flowLabel = flowLabelTmp } + (*flowMessage).HasPPP = hasPPP + (*flowMessage).PPPAddressControl = uint32(pppAddressControl) + (*flowMessage).HasMPLS = hasMPLS (*flowMessage).MPLSCount = countMpls (*flowMessage).MPLS1Label = firstLabelMpls diff --git a/utils/utils.go b/utils/utils.go index 3c297fd..5be2592 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -98,7 +98,8 @@ func FlowMessageToString(fmsg *flowmessage.FlowMessage) string { "FragmentId:%v FragmentOffset:%v BiFlowDirection:%v SrcAS:%v DstAS:%v NextHop:%v NextHopAS:%v SrcNet:%v DstNet:%v "+ "HasEncap:%v SrcAddrEncap:%v DstAddrEncap:%v ProtoEncap:%v EtypeEncap:%v "+ "IPTosEncap:%v IPTTLEncap:%v IPv6FlowLabelEncap:%v FragmentIdEncap:%v FragmentOffsetEncap:%v "+ - "HasMPLS:%v MPLSCount:%v MPLS1TTL:%v MPLS1Label:%v MPLS2TTL:%v, MPLS2Label: %v, MPLS3TTL:%v MPLS3Label:%v MPLSLastTTL:%v MPLSLastLabel:%v", + "HasMPLS:%v MPLSCount:%v MPLS1TTL:%v MPLS1Label:%v MPLS2TTL:%v, MPLS2Label: %v, MPLS3TTL:%v MPLS3Label:%v MPLSLastTTL:%v MPLSLastLabel:%v "+ + "HasPPP:%v PPPAddressControl:%v", fmsg.Type, fmsg.TimeReceived, fmsg.SequenceNum, fmsg.SamplingRate, net.IP(fmsg.SamplerAddress), fmsg.TimeFlowStart, fmsg.TimeFlowEnd, fmsg.Bytes, fmsg.Packets, net.IP(fmsg.SrcAddr), net.IP(fmsg.DstAddr), fmsg.Etype, fmsg.Proto, fmsg.SrcPort, fmsg.DstPort, fmsg.InIf, fmsg.OutIf, net.HardwareAddr(srcmac), @@ -108,7 +109,8 @@ func FlowMessageToString(fmsg *flowmessage.FlowMessage) string { net.IP(fmsg.NextHop), fmsg.NextHopAS, fmsg.SrcNet, fmsg.DstNet, fmsg.HasEncap, net.IP(fmsg.SrcAddrEncap), net.IP(fmsg.DstAddrEncap), fmsg.ProtoEncap, fmsg.EtypeEncap, fmsg.IPTosEncap, fmsg.IPTTLEncap, fmsg.IPv6FlowLabelEncap, fmsg.FragmentIdEncap, fmsg.FragmentOffsetEncap, - fmsg.HasMPLS, fmsg.MPLSCount, fmsg.MPLS1TTL, fmsg.MPLS1Label, fmsg.MPLS2TTL, fmsg.MPLS2Label, fmsg.MPLS3TTL, fmsg.MPLS3Label, fmsg.MPLSLastTTL, fmsg.MPLSLastLabel) + fmsg.HasMPLS, fmsg.MPLSCount, fmsg.MPLS1TTL, fmsg.MPLS1Label, fmsg.MPLS2TTL, fmsg.MPLS2Label, fmsg.MPLS3TTL, fmsg.MPLS3Label, fmsg.MPLSLastTTL, fmsg.MPLSLastLabel, + fmsg.HasPPP, fmsg.PPPAddressControl) return s } @@ -128,7 +130,8 @@ func FlowMessageToJSON(fmsg *flowmessage.FlowMessage) string { "\"FragmentId\":%v,\"FragmentOffset\":%v,\"BiFlowDirection\":%v,\"SrcAS\":%v,\"DstAS\":%v,\"NextHop\":\"%v\",\"NextHopAS\":%v,\"SrcNet\":%v,\"DstNet\":%v,"+ "\"HasEncap\":%v,\"SrcAddrEncap\":\"%v\",\"DstAddrEncap\":\"%v\",\"ProtoEncap\":%v,\"EtypeEncap\":%v,"+ "\"IPTosEncap\":%v,\"IPTTLEncap\":%v,\"IPv6FlowLabelEncap\":%v,\"FragmentIdEncap\":%v,\"FragmentOffsetEncap\":%v,"+ - "\"HasMPLS\":%v,\"MPLSCount\":%v,\"MPLS1TTL\":%v,\"MPLS1Label\":%v,\"MPLS2TTL\":%v,\"MPLS2Label\":%v,\"MPLS3TTL\":%v,\"MPLS3Label\":%v,\"MPLSLastTTL\":%v,\"MPLSLastLabel\":%v}", + "\"HasMPLS\":%v,\"MPLSCount\":%v,\"MPLS1TTL\":%v,\"MPLS1Label\":%v,\"MPLS2TTL\":%v,\"MPLS2Label\":%v,\"MPLS3TTL\":%v,\"MPLS3Label\":%v,\"MPLSLastTTL\":%v,\"MPLSLastLabel\":%v,"+ + "\"HasPPP\":%v,\"PPPAddressControl\":%v}", fmsg.Type, fmsg.TimeReceived, fmsg.SequenceNum, fmsg.SamplingRate, net.IP(fmsg.SamplerAddress), fmsg.TimeFlowStart, fmsg.TimeFlowEnd, fmsg.Bytes, fmsg.Packets, net.IP(fmsg.SrcAddr), net.IP(fmsg.DstAddr), fmsg.Etype, fmsg.Proto, fmsg.SrcPort, fmsg.DstPort, fmsg.InIf, fmsg.OutIf, net.HardwareAddr(srcmac), @@ -138,7 +141,8 @@ func FlowMessageToJSON(fmsg *flowmessage.FlowMessage) string { net.IP(fmsg.NextHop), fmsg.NextHopAS, fmsg.SrcNet, fmsg.DstNet, fmsg.HasEncap, net.IP(fmsg.SrcAddrEncap), net.IP(fmsg.DstAddrEncap), fmsg.ProtoEncap, fmsg.EtypeEncap, fmsg.IPTosEncap, fmsg.IPTTLEncap, fmsg.IPv6FlowLabelEncap, fmsg.FragmentIdEncap, fmsg.FragmentOffsetEncap, - fmsg.HasMPLS, fmsg.MPLSCount, fmsg.MPLS1TTL, fmsg.MPLS1Label, fmsg.MPLS2TTL, fmsg.MPLS2Label, fmsg.MPLS3TTL, fmsg.MPLS3Label, fmsg.MPLSLastTTL, fmsg.MPLSLastLabel) + fmsg.HasMPLS, fmsg.MPLSCount, fmsg.MPLS1TTL, fmsg.MPLS1Label, fmsg.MPLS2TTL, fmsg.MPLS2Label, fmsg.MPLS3TTL, fmsg.MPLS3Label, fmsg.MPLSLastTTL, fmsg.MPLSLastLabel, + fmsg.HasPPP, fmsg.PPPAddressControl) return s }