sample code to emit pcap and ascii trace