Skip to content

theojepsen/tcptracejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TcpTrace JS

A Node.js wrapper for tcptrace.

Synopsis

var tt = new TcpTrace('./in.cap');

var first_time, last_time = 0;
tt.on('connection', function (err, con) {
  console.log(con.hosts[0].ip, 'talked with', con.hosts[1].ip);

  if (!first_time) first_time = con.first_packet;
  if (con.last_packet > last_time) last_time = con.last_packet;

});

tt.on('done', function (err) {
  console.log('elapsed time', last_time - first_time);
};

About

Node.js wrapper for tcptrace

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published