#!/usr/bin/env p2sh if len(argv) < 2 { println("Usage: {} ", argv[0]); exit(1); } let f = pcap_open(argv[1]); if is_error(f) { puts(f); exit(1); } let p = null; let i = 1; while p = pcap_read_next(f) { println("[{}] {}", i, p); i = i + 1; }