Socket
Book a DemoInstallSign in
Socket

ether-frame

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ether-frame

Manipulate ethernet frame headers

latest
npmnpm
Version
0.2.0
Version published
Weekly downloads
157
35.34%
Maintainers
1
Weekly downloads
 
Created
Source

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();

Keywords

ethernet

FAQs

Package last updated on 20 Feb 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts