ethernet
Decodes Ethernet headers
Supports:
- Plain Ethernet (
destination
,source
,ethertype
,payload
) - 802.1Q tag (above properties, plus
tag
) - 802.1ad and QinQ double tag (
stag
andctag
)
Usage
Install:
npm install --save ethernet
Use (ES6 or TypeScript):
; let rawData = ;let headers = ; console; // { // destination: '010203040506',// source: '0a0b0c0d0e0f',// tag: { tpid: 33024, tci: { pcp: 0, dei: 0, vid: 16 } }// ethertype: 2048,// payload: ...,// }
Notes
Bugs? Please, file an issue, or submit a pull request!
License: PDDL-1.0