ether-frame

0.2.0 • Public • Published

ether-frame

Node module to manipulate ethernet frame headers.

Build Status

Work in progress. Example below is more API planning than actual support at this point. My current target is a simplistic implementation aiming at a simple IP payload without any fanciness like VLAN tagging, etc.

Example

var EtherFrame = require('ether-frame');
 
var ef = EtherFrame.fromBuffer(buf);
ef.src === '12:34:56:78:90:12';     // true
ef.dst === '98:76:54:32:10:98':     // true
ef.type === 'ip';                   // true
ef.typeCode === 0x0800;             // true
ef.length === 14;                   // true
var payload = buf.slice(ef.length);
var buf = ef.toBuffer();

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.0
    483
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.2.0
    483
  • 0.1.1
    3
  • 0.1.0
    4

Package Sidebar

Install

npm i ether-frame

Weekly Downloads

217

Version

0.2.0

License

BSD

Last publish

Collaborators

  • wanderview