function getArpTable (callback) {
  var arp = spawn('arp', ['-a'])
  var arpStr = []

  arp.stdout.setEncoding('utf8')
  arp.stdout.on('data', function (data) {
    arpStr.push(data)
  })
  arp.on('close', function (x) {
    callback(null, parseArpTable(arpStr))
    // arp.kill();
  })
}
function getArpTable (callback) {
  var arp = spawn('arp', ['-a'])
  var arpStr = []

  arp.stdout.setEncoding('utf8')
  arp.stdout.on('data', function (data) {
    arpStr.push(data)
  })
  arp.on('close', function (x) {
    callback(null, parseArpTable(arpStr))
    
  })
}
function getArpTable ( callback ) { var arp = spawn ( 'arp' , [ '-a' ] ) var arpStr = [ ] arp . stdout . setEncoding ( 'utf8' ) arp . stdout . on ( 'data' , function ( data ) { arpStr . push ( data ) } ) arp . on ( 'close' , function ( x ) { callback ( null , parseArpTable ( arpStr ) ) // arp.kill(); } ) }
Works on Mac. TODO: Linux - Ubuntu et al.
Works on Mac . TODO : Linux - Ubuntu et al .