Coder Social home page Coder Social logo

layer2's People

Contributors

mtth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

huge818 aug2uag

layer2's Issues

Is `dat` dir packed on a purpose?

Disclaimer: I do not use the package, this was found during automated npm packages downloading.

Your current package size is 20 MiB packed, 479 MiB unpacked. 475 MiB of that are inside the dat dir and that space is taken mostly by *.pcap files. I suspect that this probably got packed to the release by mistake.

If you don't want to pack that directory, add it to the .gitignore and/or .npmingore.

Error: socket: Operation not permitted

I executed the installation instructions from the README and opted for the "npm run install-all" option. Everything installed correctly but, when I execute


var layer2 = require('layer2');

layer2.createInterfaceSniffer('eth0')
.on('pdu', function (pdu) {
var frame = pdu.frame.Ethernet2;
var src = frame.srcAddr;
var dst = frame.dstAddr;
console.log(src + ' -> ' + dst + ' [' + pdu.size + ']');
});

I receive the following error:

/export/home/cam/node_projects/mjpeg/node_modules/layer2/lib/sniffers.js:143
var wrapper = new utils.Wrapper().fromInterface(
^
Error: socket: Operation not permitted
at Error (native)
at Object.createInterfaceSniffer (/export/home/cam/node_projects/mjpeg/node_modules/layer2/lib/sniffers.js:143:37)
at Object. (/export/home/cam/node_projects/mjpeg/server.js:4:8)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:394:7)


I looked through the code briefly but, nothing stood out to me. Any ideas ?

libavrocpp.so.1.8.2.0: cannot open shared object file: No such file or directory

DId everything according to the instructions, twice.

After installing, I get this error when attempting to require('layer2'):

  return process.dlopen(module, path._makeLong(filename));
                 ^

Error: libavrocpp.so.1.8.2.0: cannot open shared object file: No such file or di
    at Object.Module._extensions..node (module.js:681:18)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at /root/node_modules/layer2/lib/utils.js:26:10
    at Object.<anonymous> (/root/node_modules/layer2/lib/utils.js:27:3)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)

I'm running nodejs v8.11.3 on Debian 8.10.

Compilation error

In trying to install this package, I got the following error:

../src/cpp/pcap_wrapper.h:50:54: error: ‘Arguments’ in namespace ‘v8’ does not name a type
   static v8::Handle<v8::Value> to_savefile(const v8::Arguments& args);

Sorry I couldn't check out the cause of this myself.

Capturing does not work

Hello,

at first i might want to thank you for your work.

I was trying to live-capture some ethernet frames from the ethernet adapter attached to my MBP and log them, but i got nothing. Here is the code i've used:

var layer2 = require('layer2');

var capture = new layer2.capture.Live('en4');
var decoder = new layer2.Decoder({linkType: 'EN10MB'});

capture           // Stream of buffers (frames' raw bytes).
    .pipe(decoder)  // Stream of objects (decoded frames).
    .on('data', function (frame) { console.log(JSON.stringify(frame)); });

What did i do wrong?

Greets and thanks in advance,
Christian

tcpdump-style filtering

Hi,

i have another question.
For the project i'm working on, i need tcpdump-style packet filtering. Here is the tcpdump-call what does the job:

$ tcpdump -i en4 ether proto 0x22f0

I something like this possible with the layer2 module?

I saw there is some filter related code in src/js/capture.js. When i naive tried to pass the filter as an option in the capture.Live constructor like this:

var capture = new layer2.capture.Live('en4', {filter: 'ether proto 0x22f0'});

all i got was an error:

> Error: link-layer multicast filters supported only on ethernet/FDDI/token ring/ARCNET/802.11/ATM LANE/Fibre Channel

Greets and thanks in advance,
Christian

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.