cloudflare / goflow

The high-scalability sFlow/NetFlow/IPFIX collector used internally at Cloudflare.
BSD 3-Clause "New" or "Revised" License
859 stars 172 forks source link

Add PPP decoding #58

Closed lspgn closed 4 years ago

lspgn commented 4 years ago

Decodes the packets inside a PPP layer. Example:

{
  "Type": "SFLOW_5",
  "TimeReceived": 0,
  "SequenceNum": 0,
  "SamplingRate": 1,
  "TimeFlowStart": 0,
  "TimeFlowEnd": 0,
  "Bytes": 10,
  "Packets": 1,
  "SrcAddr": "20.0.0.2",
  "DstAddr": "20.0.0.1",
  "Etype": 2048,
  "Proto": 47,
  "SrcPort": 0,
  "DstPort": 0,
  "SrcIf": 0,
  "DstIf": 0,
  "HasEncap": true,
  "SrcAddrEncap": "17.1.1.122",
  "DstAddrEncap": "40.0.0.2",
  "ProtoEncap": 1,
  "EtypeEncap": 2048,
  "IPTosEncap": 0,
  "IPTTLEncap": 64,
  "IPv6FlowLabelEncap": 0,
  "FragmentIdEncap": 4353,
  "FragmentOffsetEncap": 0,
  "HasMPLS": false,
  "HasPPP": true,
  "PPPAddressControl": 65283
}

cc @tamihiro