diff --git a/decoders/sflow/sflow.go b/decoders/sflow/sflow.go index e5995b09..5eeceb1d 100644 --- a/decoders/sflow/sflow.go +++ b/decoders/sflow/sflow.go @@ -185,6 +185,20 @@ func DecodeFlowRecord(header *RecordHeader, payload *bytes.Buffer) (FlowRecord, } sampledHeader.HeaderData = payload.Bytes() flowRecord.Data = sampledHeader + case FLOW_TYPE_ETH: + sampledEth := SampledEthernet{ + SrcMac: make([]byte, 6), + DstMac: make([]byte, 6), + } + if err := utils.BinaryDecoder(payload, + &sampledEth.Length, + sampledEth.SrcMac, + sampledEth.DstMac, + &sampledEth.EthType, + ); err != nil { + return flowRecord, &RecordError{header.DataFormat, err} + } + flowRecord.Data = sampledEth case FLOW_TYPE_IPV4: sampledIP := SampledIPv4{ SampledIPBase: SampledIPBase{