Modify assembler to take in packet timestamps.

Folks were having trouble reading pcap files and reassembling streams, since
timestamps coming from packets were not real-time times, they were stored
timestamps read out via CaptureInfo.  This fixes the assembly API to make it
possible to pass in CaptureInfo.Timestamp times, so FlushOlderThan works
correctly and Reassembly.Seen times are accurate.
Merge branch 'master' of https://code.google.com/p/gopacket
Add some flags to statsassembly example.

Adds the ability to modify behavior of statsassembly example with numerous
interesting flags.
BENCH Pull down most recent generated data for ports/macs.

----------------------------------------------------------
BENCHMARK_MARKER_DO_NOT_CHANGE
----------------------------------------------------------

Go version go version go1.2 linux/amd64

TEST BENCHMARKS
PASS
BenchmarkTypeAssertion	500000000	         4.15 ns/op
BenchmarkMapLookup	500000000	         4.24 ns/op
BenchmarkNilMapLookup	500000000	         3.69 ns/op
BenchmarkNilMapLookupWithNilCheck	2000000000	         0.83 ns/op
BenchmarkArrayLookup	2000000000	         0.55 ns/op
BenchmarkTypeToInterface1	2000000000	         0.85 ns/op
BenchmarkTypeToInterface2	2000000000	         0.55 ns/op
BenchmarkPassDecodeOptionsByValue	2000000000	         0.27 ns/op
BenchmarkPassDecodeOptionsByPointer	2000000000	         0.28 ns/op
BenchmarkLockOSThread	500000000	         4.31 ns/op
BenchmarkUnlockOSThread	500000000	         4.88 ns/op
BenchmarkLockUnlockOSThread	200000000	         9.61 ns/op
BenchmarkLockDeferUnlockOSThread	50000000	        61.2 ns/op
BenchmarkUnbufferedChannel	10000000	       264 ns/op
BenchmarkSmallBufferedChannel	 5000000	       306 ns/op
BenchmarkLargeBufferedChannel	 5000000	       304 ns/op
BenchmarkEndpointFastHashShort	100000000	        15.8 ns/op
BenchmarkEndpointFastHashLong	50000000	        34.8 ns/op
BenchmarkFlowFastHashShort	100000000	        22.4 ns/op
BenchmarkFlowFastHashLong	50000000	        59.6 ns/op
ok  	code.google.com/p/gopacket	41.057s
PASS
BenchmarkLayerClassSliceContains	2000000000	         1.08 ns/op
BenchmarkLayerClassMapContains	500000000	         3.94 ns/op
BenchmarkLazyNoCopyEthLayer	 2000000	       888 ns/op
BenchmarkLazyNoCopyIPLayer	 1000000	      1380 ns/op
BenchmarkLazyNoCopyTCPLayer	 1000000	      2217 ns/op
BenchmarkLazyNoCopyAllLayers	 1000000	      2386 ns/op
BenchmarkDefault	 1000000	      2825 ns/op
BenchmarkSerializeTcpNoOptions	10000000	       236 ns/op
BenchmarkSerializeTcpFixLengths	10000000	       249 ns/op
BenchmarkSerializeTcpComputeChecksums	 5000000	       575 ns/op
BenchmarkSerializeTcpFixLengthsComputeChecksums	 5000000	       586 ns/op
BenchmarkLazy	 1000000	      1167 ns/op
BenchmarkNoCopy	 1000000	      2115 ns/op
BenchmarkLazyNoCopy	 5000000	       507 ns/op
BenchmarkKnownStack	10000000	       177 ns/op
BenchmarkDecodingLayerParserIgnorePanic	10000000	       240 ns/op
BenchmarkDecodingLayerParserHandlePanic	 5000000	       305 ns/op
BenchmarkAlloc	50000000	        32.2 ns/op
BenchmarkFlow	50000000	        41.1 ns/op
BenchmarkEndpoints	50000000	        50.4 ns/op
BenchmarkTCPLayerFromDecodedPacket	100000000	        11.7 ns/op
BenchmarkTCPLayerClassFromDecodedPacket	50000000	        35.7 ns/op
BenchmarkTCPTransportLayerFromDecodedPacket	500000000	         3.14 ns/op
BenchmarkDecodeFuncCallOverheadDirectCall	2000000000	         1.13 ns/op
BenchmarkDecodeFuncCallOverheadDecoderCall	500000000	         6.12 ns/op
BenchmarkDecodeFuncCallOverheadArrayCall	200000000	        10.1 ns/op
BenchmarkFmtVerboseString	   10000	    177466 ns/op
BenchmarkPacketString	   50000	     58101 ns/op
BenchmarkPacketDumpString	   50000	     65632 ns/op
BenchmarkDecodeICMP	 1000000	      1692 ns/op
BenchmarkDecodeICMP6	 1000000	      2006 ns/op
BenchmarkDecodeMPLS	 1000000	      1873 ns/op
BenchmarkDecodePPPoE_ICMPv6	 1000000	      2378 ns/op
BenchmarkDecodePacketIPSecESP	 1000000	      1413 ns/op
ok  	code.google.com/p/gopacket/layers	83.261s

PCAP BENCHMARK
Local pcap file /tmp/gopacket_benchmark.pcap doesn't exist, reading from http://www.ll.mit.edu/mission/communications/cyber/CSTcorpora/ideval/data/1999/training/week1/tuesday/inside.tcpdump.gz
Successfully read 341401548 bytes from url, unzipped to local storage
Reading file once through to hopefully cache most of it
Read in file /tmp/gopacket_benchmark.pcap , total of 341401548 bytes
Opening file "/tmp/gopacket_benchmark.pcap" for read
Reading all packets into memory with BufferPacketSource.
Reading packet data into memory: 1237119 packets in 963.131682ms, 778ns per packet
Time to read packet data into memory from file: 963.161539ms
Benchmarking decode 1/10
	Read in 1237119 packets in 1.88714507s, 1.525us per packet
Benchmarking decode 2/10
	Read in 1237119 packets in 1.57602487s, 1.273us per packet
Benchmarking decode 3/10
	Read in 1237119 packets in 1.553588024s, 1.255us per packet
Benchmarking decode 4/10
	Read in 1237119 packets in 1.560645717s, 1.261us per packet
Benchmarking decode 5/10
	Read in 1237119 packets in 1.572628212s, 1.271us per packet
Benchmarking decode 6/10
	Read in 1237119 packets in 1.577386833s, 1.275us per packet
Benchmarking decode 7/10
	Read in 1237119 packets in 1.607753063s, 1.299us per packet
Benchmarking decode 8/10
	Read in 1237119 packets in 1.591877161s, 1.286us per packet
Benchmarking decode 9/10
	Read in 1237119 packets in 1.570962967s, 1.269us per packet
Benchmarking decode 10/10
	Read in 1237119 packets in 1.569812453s, 1.268us per packet
----------------------------------------------------------
BENCHMARKING AGAINST COMMIT 94474fda2852e447a2a131f66df4750a96024148
----------------------------------------------------------

OLD TEST BENCHMARKS
PASS
BenchmarkTypeAssertion	500000000	         3.63 ns/op
BenchmarkMapLookup	500000000	         3.66 ns/op
BenchmarkNilMapLookup	500000000	         3.20 ns/op
BenchmarkNilMapLookupWithNilCheck	2000000000	         0.80 ns/op
BenchmarkArrayLookup	2000000000	         0.54 ns/op
BenchmarkTypeToInterface1	2000000000	         0.80 ns/op
BenchmarkTypeToInterface2	2000000000	         0.53 ns/op
BenchmarkPassDecodeOptionsByValue	2000000000	         0.27 ns/op
BenchmarkPassDecodeOptionsByPointer	2000000000	         0.29 ns/op
BenchmarkLockOSThread	500000000	         4.15 ns/op
BenchmarkUnlockOSThread	500000000	         4.60 ns/op
BenchmarkLockUnlockOSThread	200000000	         9.49 ns/op
BenchmarkLockDeferUnlockOSThread	50000000	        60.2 ns/op
BenchmarkUnbufferedChannel	10000000	       254 ns/op
BenchmarkSmallBufferedChannel	 5000000	       314 ns/op
BenchmarkLargeBufferedChannel	 5000000	       308 ns/op
BenchmarkEndpointFastHashShort	100000000	        15.9 ns/op
BenchmarkEndpointFastHashLong	50000000	        36.9 ns/op
BenchmarkFlowFastHashShort	100000000	        23.1 ns/op
BenchmarkFlowFastHashLong	50000000	        59.5 ns/op
ok  	code.google.com/p/gopacket	39.832s
PASS
BenchmarkLayerClassSliceContains	2000000000	         1.09 ns/op
BenchmarkLayerClassMapContains	500000000	         3.97 ns/op
BenchmarkLazyNoCopyEthLayer	 2000000	       909 ns/op
BenchmarkLazyNoCopyIPLayer	 1000000	      1381 ns/op
BenchmarkLazyNoCopyTCPLayer	 1000000	      2173 ns/op
BenchmarkLazyNoCopyAllLayers	 1000000	      2340 ns/op
BenchmarkDefault	 1000000	      2724 ns/op
BenchmarkSerializeTcpNoOptions	10000000	       236 ns/op
BenchmarkSerializeTcpFixLengths	10000000	       243 ns/op
BenchmarkSerializeTcpComputeChecksums	 5000000	       580 ns/op
BenchmarkSerializeTcpFixLengthsComputeChecksums	 5000000	       582 ns/op
BenchmarkLazy	 1000000	      1134 ns/op
BenchmarkNoCopy	 1000000	      2082 ns/op
BenchmarkLazyNoCopy	 5000000	       474 ns/op
BenchmarkKnownStack	10000000	       175 ns/op
BenchmarkDecodingLayerParserIgnorePanic	10000000	       243 ns/op
BenchmarkDecodingLayerParserHandlePanic	10000000	       302 ns/op
BenchmarkAlloc	50000000	        32.0 ns/op
BenchmarkFlow	50000000	        40.0 ns/op
BenchmarkEndpoints	50000000	        50.3 ns/op
BenchmarkTCPLayerFromDecodedPacket	100000000	        11.7 ns/op
BenchmarkTCPLayerClassFromDecodedPacket	50000000	        35.7 ns/op
BenchmarkTCPTransportLayerFromDecodedPacket	1000000000	         2.91 ns/op
BenchmarkDecodeFuncCallOverheadDirectCall	2000000000	         1.10 ns/op
BenchmarkDecodeFuncCallOverheadDecoderCall	500000000	         6.05 ns/op
BenchmarkDecodeFuncCallOverheadArrayCall	200000000	         9.63 ns/op
BenchmarkFmtVerboseString	   10000	    169634 ns/op
BenchmarkPacketString	   50000	     57977 ns/op
BenchmarkPacketDumpString	   50000	     58121 ns/op
BenchmarkDecodeICMP	 1000000	      1643 ns/op
BenchmarkDecodeICMP6	 1000000	      1888 ns/op
BenchmarkDecodeMPLS	 1000000	      1855 ns/op
BenchmarkDecodePPPoE_ICMPv6	 1000000	      2404 ns/op
BenchmarkDecodePacketIPSecESP	 1000000	      1437 ns/op
ok  	code.google.com/p/gopacket/layers	84.695s

OLD PCAP BENCHMARK
Reading file once through to hopefully cache most of it
Read in file /tmp/gopacket_benchmark.pcap , total of 341401548 bytes
Opening file "/tmp/gopacket_benchmark.pcap" for read
Reading all packets into memory with BufferPacketSource.
Reading packet data into memory: 1237119 packets in 997.980242ms, 806ns per packet
Time to read packet data into memory from file: 998.009848ms
Benchmarking decode 1/10
	Read in 1237119 packets in 1.910500851s, 1.544us per packet
Benchmarking decode 2/10
	Read in 1237119 packets in 1.778323064s, 1.437us per packet
Benchmarking decode 3/10
	Read in 1237119 packets in 1.813530895s, 1.465us per packet
Benchmarking decode 4/10
	Read in 1237119 packets in 1.578306418s, 1.275us per packet
Benchmarking decode 5/10
	Read in 1237119 packets in 1.571400176s, 1.27us per packet
Benchmarking decode 6/10
	Read in 1237119 packets in 1.572453s, 1.271us per packet
Benchmarking decode 7/10
	Read in 1237119 packets in 1.570522558s, 1.269us per packet
Benchmarking decode 8/10
	Read in 1237119 packets in 1.582784681s, 1.279us per packet
Benchmarking decode 9/10
	Read in 1237119 packets in 1.598131386s, 1.291us per packet
Benchmarking decode 10/10
	Read in 1237119 packets in 1.585144307s, 1.281us per packet
BENCH PCAP: set packet timestamp source.

Add the ability to specify a timestamp source for PCAP handles pulling live
traffic.

----------------------------------------------------------
BENCHMARK_MARKER_DO_NOT_CHANGE
----------------------------------------------------------

Go version go version go1.2 linux/amd64

TEST BENCHMARKS
PASS
BenchmarkTypeAssertion	500000000	         3.44 ns/op
BenchmarkMapLookup	500000000	         3.55 ns/op
BenchmarkNilMapLookup	500000000	         3.17 ns/op
BenchmarkNilMapLookupWithNilCheck	2000000000	         0.79 ns/op
BenchmarkArrayLookup	2000000000	         0.53 ns/op
BenchmarkTypeToInterface1	2000000000	         0.79 ns/op
BenchmarkTypeToInterface2	2000000000	         0.53 ns/op
BenchmarkPassDecodeOptionsByValue	2000000000	         0.26 ns/op
BenchmarkPassDecodeOptionsByPointer	2000000000	         0.26 ns/op
BenchmarkLockOSThread	500000000	         3.99 ns/op
BenchmarkUnlockOSThread	500000000	         4.49 ns/op
BenchmarkLockUnlockOSThread	200000000	         9.26 ns/op
BenchmarkLockDeferUnlockOSThread	50000000	        58.6 ns/op
BenchmarkUnbufferedChannel	10000000	       250 ns/op
BenchmarkSmallBufferedChannel	 5000000	       304 ns/op
BenchmarkLargeBufferedChannel	 5000000	       306 ns/op
BenchmarkEndpointFastHashShort	100000000	        15.8 ns/op
BenchmarkEndpointFastHashLong	50000000	        34.4 ns/op
BenchmarkFlowFastHashShort	100000000	        22.2 ns/op
BenchmarkFlowFastHashLong	50000000	        59.0 ns/op
ok  	code.google.com/p/gopacket	38.794s
PASS
BenchmarkLayerClassSliceContains	2000000000	         1.06 ns/op
BenchmarkLayerClassMapContains	500000000	         3.92 ns/op
BenchmarkLazyNoCopyEthLayer	 2000000	       907 ns/op
BenchmarkLazyNoCopyIPLayer	 1000000	      1403 ns/op
BenchmarkLazyNoCopyTCPLayer	 1000000	      2284 ns/op
BenchmarkLazyNoCopyAllLayers	 1000000	      2453 ns/op
BenchmarkDefault	 1000000	      2893 ns/op
BenchmarkSerializeTcpNoOptions	10000000	       234 ns/op
BenchmarkSerializeTcpFixLengths	10000000	       245 ns/op
BenchmarkSerializeTcpComputeChecksums	 5000000	       575 ns/op
BenchmarkSerializeTcpFixLengthsComputeChecksums	 5000000	       578 ns/op
BenchmarkLazy	 1000000	      1152 ns/op
BenchmarkNoCopy	 1000000	      2117 ns/op
BenchmarkLazyNoCopy	 5000000	       491 ns/op
BenchmarkKnownStack	10000000	       175 ns/op
BenchmarkDecodingLayerParserIgnorePanic	10000000	       237 ns/op
BenchmarkDecodingLayerParserHandlePanic	 5000000	       299 ns/op
BenchmarkAlloc	50000000	        31.7 ns/op
BenchmarkFlow	50000000	        39.7 ns/op
BenchmarkEndpoints	50000000	        48.9 ns/op
BenchmarkTCPLayerFromDecodedPacket	100000000	        11.6 ns/op
BenchmarkTCPLayerClassFromDecodedPacket	50000000	        35.1 ns/op
BenchmarkTCPTransportLayerFromDecodedPacket	1000000000	         2.87 ns/op
BenchmarkDecodeFuncCallOverheadDirectCall	2000000000	         1.06 ns/op
BenchmarkDecodeFuncCallOverheadDecoderCall	500000000	         6.10 ns/op
BenchmarkDecodeFuncCallOverheadArrayCall	200000000	         9.54 ns/op
BenchmarkFmtVerboseString	   10000	    168515 ns/op
BenchmarkPacketString	   50000	     57416 ns/op
BenchmarkPacketDumpString	   50000	     57340 ns/op
BenchmarkDecodeICMP	 1000000	      1654 ns/op
BenchmarkDecodeICMP6	 1000000	      1892 ns/op
BenchmarkDecodeMPLS	 1000000	      1855 ns/op
BenchmarkDecodePPPoE_ICMPv6	 1000000	      2378 ns/op
BenchmarkDecodePacketIPSecESP	 1000000	      1424 ns/op
ok  	code.google.com/p/gopacket/layers	83.212s

PCAP BENCHMARK
Local pcap file /tmp/gopacket_benchmark.pcap doesn't exist, reading from http://www.ll.mit.edu/mission/communications/cyber/CSTcorpora/ideval/data/1999/training/week1/tuesday/inside.tcpdump.gz
Successfully read 341401548 bytes from url, unzipped to local storage
Reading file once through to hopefully cache most of it
Read in file /tmp/gopacket_benchmark.pcap , total of 341401548 bytes
Opening file "/tmp/gopacket_benchmark.pcap" for read
Reading all packets into memory with BufferPacketSource.
Reading packet data into memory: 1237119 packets in 890.461754ms, 719ns per packet
Time to read packet data into memory from file: 890.487143ms
Benchmarking decode 1/10
	Read in 1237119 packets in 1.569173023s, 1.268us per packet
Benchmarking decode 2/10
	Read in 1237119 packets in 1.522993314s, 1.231us per packet
Benchmarking decode 3/10
	Read in 1237119 packets in 1.554004907s, 1.256us per packet
Benchmarking decode 4/10
	Read in 1237119 packets in 1.567200224s, 1.266us per packet
Benchmarking decode 5/10
	Read in 1237119 packets in 1.574095788s, 1.272us per packet
Benchmarking decode 6/10
	Read in 1237119 packets in 1.588142265s, 1.283us per packet
Benchmarking decode 7/10
	Read in 1237119 packets in 1.588310232s, 1.283us per packet
Benchmarking decode 8/10
	Read in 1237119 packets in 1.581589607s, 1.278us per packet
Benchmarking decode 9/10
	Read in 1237119 packets in 1.5818236s, 1.278us per packet
Benchmarking decode 10/10
	Read in 1237119 packets in 1.582320805s, 1.279us per packet
----------------------------------------------------------
BENCHMARKING AGAINST COMMIT ee0baca11af6dc90d587d0e6fa89936a03ecf352
----------------------------------------------------------

OLD TEST BENCHMARKS
PASS
BenchmarkTypeAssertion	500000000	         3.45 ns/op
BenchmarkMapLookup	500000000	         3.56 ns/op
BenchmarkNilMapLookup	500000000	         3.17 ns/op
BenchmarkNilMapLookupWithNilCheck	2000000000	         0.80 ns/op
BenchmarkArrayLookup	2000000000	         0.53 ns/op
BenchmarkTypeToInterface1	2000000000	         0.79 ns/op
BenchmarkTypeToInterface2	2000000000	         0.53 ns/op
BenchmarkPassDecodeOptionsByValue	2000000000	         0.26 ns/op
BenchmarkPassDecodeOptionsByPointer	2000000000	         0.26 ns/op
BenchmarkLockOSThread	500000000	         3.98 ns/op
BenchmarkUnlockOSThread	500000000	         4.50 ns/op
BenchmarkLockUnlockOSThread	200000000	         9.26 ns/op
BenchmarkLockDeferUnlockOSThread	50000000	        58.3 ns/op
BenchmarkUnbufferedChannel	10000000	       251 ns/op
BenchmarkSmallBufferedChannel	 5000000	       307 ns/op
BenchmarkLargeBufferedChannel	 5000000	       306 ns/op
BenchmarkEndpointFastHashShort	100000000	        15.7 ns/op
BenchmarkEndpointFastHashLong	50000000	        34.5 ns/op
BenchmarkFlowFastHashShort	100000000	        22.4 ns/op
BenchmarkFlowFastHashLong	50000000	        59.0 ns/op
ok  	code.google.com/p/gopacket	38.855s
PASS
BenchmarkLayerClassSliceContains	2000000000	         1.06 ns/op
BenchmarkLayerClassMapContains	500000000	         3.90 ns/op
BenchmarkLazyNoCopyEthLayer	 2000000	       907 ns/op
BenchmarkLazyNoCopyIPLayer	 1000000	      1402 ns/op
BenchmarkLazyNoCopyTCPLayer	 1000000	      2197 ns/op
BenchmarkLazyNoCopyAllLayers	 1000000	      2372 ns/op
BenchmarkDefault	 1000000	      2799 ns/op
BenchmarkSerializeTcpNoOptions	10000000	       232 ns/op
BenchmarkSerializeTcpFixLengths	10000000	       239 ns/op
BenchmarkSerializeTcpComputeChecksums	 5000000	       570 ns/op
BenchmarkSerializeTcpFixLengthsComputeChecksums	 5000000	       572 ns/op
BenchmarkLazy	 1000000	      1165 ns/op
BenchmarkNoCopy	 1000000	      2147 ns/op
BenchmarkLazyNoCopy	 5000000	       496 ns/op
BenchmarkKnownStack	10000000	       176 ns/op
BenchmarkDecodingLayerParserIgnorePanic	10000000	       237 ns/op
BenchmarkDecodingLayerParserHandlePanic	10000000	       297 ns/op
BenchmarkAlloc	50000000	        31.7 ns/op
BenchmarkFlow	50000000	        39.7 ns/op
BenchmarkEndpoints	50000000	        48.9 ns/op
BenchmarkTCPLayerFromDecodedPacket	100000000	        11.6 ns/op
BenchmarkTCPLayerClassFromDecodedPacket	50000000	        35.1 ns/op
BenchmarkTCPTransportLayerFromDecodedPacket	1000000000	         2.87 ns/op
BenchmarkDecodeFuncCallOverheadDirectCall	2000000000	         1.06 ns/op
BenchmarkDecodeFuncCallOverheadDecoderCall	500000000	         6.10 ns/op
BenchmarkDecodeFuncCallOverheadArrayCall	200000000	         9.54 ns/op
BenchmarkFmtVerboseString	   10000	    168389 ns/op
BenchmarkPacketString	   50000	     57383 ns/op
BenchmarkPacketDumpString	   50000	     57324 ns/op
BenchmarkDecodeICMP	 1000000	      1652 ns/op
BenchmarkDecodeICMP6	 1000000	      1905 ns/op
BenchmarkDecodeMPLS	 1000000	      1855 ns/op
BenchmarkDecodePPPoE_ICMPv6	 1000000	      2373 ns/op
BenchmarkDecodePacketIPSecESP	 1000000	      1423 ns/op
ok  	code.google.com/p/gopacket/layers	84.342s

OLD PCAP BENCHMARK
Reading file once through to hopefully cache most of it
Read in file /tmp/gopacket_benchmark.pcap , total of 341401548 bytes
Opening file "/tmp/gopacket_benchmark.pcap" for read
Reading all packets into memory with BufferPacketSource.
Reading packet data into memory: 1237119 packets in 814.464902ms, 658ns per packet
Time to read packet data into memory from file: 814.492122ms
Benchmarking decode 1/10
	Read in 1237119 packets in 1.589288933s, 1.284us per packet
Benchmarking decode 2/10
	Read in 1237119 packets in 1.525617561s, 1.233us per packet
Benchmarking decode 3/10
	Read in 1237119 packets in 1.557489589s, 1.258us per packet
Benchmarking decode 4/10
	Read in 1237119 packets in 1.573925009s, 1.272us per packet
Benchmarking decode 5/10
	Read in 1237119 packets in 1.580358283s, 1.277us per packet
Benchmarking decode 6/10
	Read in 1237119 packets in 1.582076713s, 1.278us per packet
Benchmarking decode 7/10
	Read in 1237119 packets in 1.583285942s, 1.279us per packet
Benchmarking decode 8/10
	Read in 1237119 packets in 1.582542394s, 1.279us per packet
Benchmarking decode 9/10
	Read in 1237119 packets in 1.583204198s, 1.279us per packet
Benchmarking decode 10/10
	Read in 1237119 packets in 1.583540421s, 1.28us per packet
Use AssembleWithTimestamp in examples.
BENCH Add benchmarks for decodinglayerparser and tcpassembler.

----------------------------------------------------------
BENCHMARK_MARKER_DO_NOT_CHANGE
----------------------------------------------------------

Go version go version go1.2 linux/amd64

TEST BENCHMARKS
PASS
BenchmarkTypeAssertion	500000000	         3.53 ns/op
BenchmarkMapLookup	500000000	         3.68 ns/op
BenchmarkNilMapLookup	500000000	         3.30 ns/op
BenchmarkNilMapLookupWithNilCheck	2000000000	         0.80 ns/op
BenchmarkArrayLookup	2000000000	         0.55 ns/op
BenchmarkTypeToInterface1	2000000000	         0.85 ns/op
BenchmarkTypeToInterface2	2000000000	         0.54 ns/op
BenchmarkPassDecodeOptionsByValue	2000000000	         0.28 ns/op
BenchmarkPassDecodeOptionsByPointer	2000000000	         0.27 ns/op
BenchmarkLockOSThread	500000000	         4.05 ns/op
BenchmarkUnlockOSThread	500000000	         4.75 ns/op
BenchmarkLockUnlockOSThread	200000000	         9.33 ns/op
BenchmarkLockDeferUnlockOSThread	50000000	        58.7 ns/op
BenchmarkUnbufferedChannel	10000000	       253 ns/op
BenchmarkSmallBufferedChannel	 5000000	       305 ns/op
BenchmarkLargeBufferedChannel	 5000000	       304 ns/op
BenchmarkEndpointFastHashShort	100000000	        15.6 ns/op
BenchmarkEndpointFastHashLong	50000000	        34.7 ns/op
BenchmarkFlowFastHashShort	100000000	        22.7 ns/op
BenchmarkFlowFastHashLong	50000000	        59.8 ns/op
ok  	code.google.com/p/gopacket	39.558s
PASS
BenchmarkLayerClassSliceContains	2000000000	         1.18 ns/op
BenchmarkLayerClassMapContains	500000000	         4.01 ns/op
BenchmarkLazyNoCopyEthLayer	 2000000	       888 ns/op
BenchmarkLazyNoCopyIPLayer	 1000000	      1427 ns/op
BenchmarkLazyNoCopyTCPLayer	 1000000	      2209 ns/op
BenchmarkLazyNoCopyAllLayers	 1000000	      2384 ns/op
BenchmarkDefault	 1000000	      2763 ns/op
BenchmarkSerializeTcpNoOptions	10000000	       235 ns/op
BenchmarkSerializeTcpFixLengths	10000000	       250 ns/op
BenchmarkSerializeTcpComputeChecksums	 5000000	       575 ns/op
BenchmarkSerializeTcpFixLengthsComputeChecksums	 5000000	       590 ns/op
BenchmarkLazy	 1000000	      1132 ns/op
BenchmarkNoCopy	 1000000	      2122 ns/op
BenchmarkLazyNoCopy	 5000000	       483 ns/op
BenchmarkKnownStack	10000000	       181 ns/op
BenchmarkDecodingLayerParserIgnorePanic	10000000	       247 ns/op
BenchmarkDecodingLayerParserHandlePanic	 5000000	       321 ns/op
BenchmarkAlloc	50000000	        33.0 ns/op
BenchmarkFlow	50000000	        40.3 ns/op
BenchmarkEndpoints	50000000	        50.7 ns/op
BenchmarkTCPLayerFromDecodedPacket	100000000	        12.0 ns/op
BenchmarkTCPLayerClassFromDecodedPacket	50000000	        35.6 ns/op
BenchmarkTCPTransportLayerFromDecodedPacket	1000000000	         2.93 ns/op
BenchmarkDecodeFuncCallOverheadDirectCall	2000000000	         1.10 ns/op
BenchmarkDecodeFuncCallOverheadDecoderCall	500000000	         6.15 ns/op
BenchmarkDecodeFuncCallOverheadArrayCall	200000000	         9.63 ns/op
BenchmarkFmtVerboseString	   10000	    170625 ns/op
BenchmarkPacketString	   50000	     58343 ns/op
BenchmarkPacketDumpString	   50000	     58221 ns/op
BenchmarkDecodeICMP	 1000000	      1663 ns/op
BenchmarkDecodeICMP6	 1000000	      1883 ns/op
BenchmarkDecodeMPLS	 1000000	      1887 ns/op
BenchmarkDecodePPPoE_ICMPv6	 1000000	      2378 ns/op
BenchmarkDecodePacketIPSecESP	 1000000	      1417 ns/op
ok  	code.google.com/p/gopacket/layers	84.129s

PCAP BENCHMARK
Reading file once through to hopefully cache most of it
Read in file /tmp/gopacket_benchmark.pcap , total of 341401548 bytes
Opening file "/tmp/gopacket_benchmark.pcap" for read
Reading all packets into memory with BufferPacketSource.
Reading packet data into memory: 1237119 packets in 963.138426ms, 778ns per packet
Time to read packet data into memory from file: 963.169512ms

Benchmarking decode 1/5
	Read in 1237119 packets in 1.768187759s, 1.429us per packet
Benchmarking decode 2/5
	Read in 1237119 packets in 1.512962272s, 1.222us per packet
Benchmarking decode 3/5
	Read in 1237119 packets in 1.5518557s, 1.254us per packet
Benchmarking decode 4/5
	Read in 1237119 packets in 1.59746741s, 1.291us per packet
Benchmarking decode 5/5
	Read in 1237119 packets in 1.58125595s, 1.278us per packet

Benchmarking decoding layer parser 1/5
	Read in 1237120 packets in 355.383173ms, decoded 4330909 layers, assembled 0 packets: 287ns per packet
Benchmarking decoding layer parser 2/5
	Read in 1237120 packets in 350.965721ms, decoded 4330909 layers, assembled 0 packets: 283ns per packet
Benchmarking decoding layer parser 3/5
	Read in 1237120 packets in 351.072954ms, decoded 4330909 layers, assembled 0 packets: 283ns per packet
Benchmarking decoding layer parser 4/5
	Read in 1237120 packets in 352.086981ms, decoded 4330909 layers, assembled 0 packets: 284ns per packet
Benchmarking decoding layer parser 5/5
	Read in 1237120 packets in 351.726342ms, decoded 4330909 layers, assembled 0 packets: 284ns per packet

Benchmarking decoding layer parser with assembly 1/5
	Read in 1237120 packets in 652.869262ms, decoded 4330909 layers, assembled 1153247 packets: 527ns per packet
Benchmarking decoding layer parser with assembly 2/5
	Read in 1237120 packets in 660.441592ms, decoded 4330909 layers, assembled 1153247 packets: 533ns per packet
Benchmarking decoding layer parser with assembly 3/5
	Read in 1237120 packets in 676.384596ms, decoded 4330909 layers, assembled 1153247 packets: 546ns per packet
Benchmarking decoding layer parser with assembly 4/5
	Read in 1237120 packets in 658.25211ms, decoded 4330909 layers, assembled 1153247 packets: 532ns per packet
Benchmarking decoding layer parser with assembly 5/5
	Read in 1237120 packets in 659.623158ms, decoded 4330909 layers, assembled 1153247 packets: 533ns per packet
----------------------------------------------------------
BENCHMARKING AGAINST COMMIT 1c4d022c0e9149bbc706a13da0a84660bbb9de8d
----------------------------------------------------------

OLD TEST BENCHMARKS
PASS
BenchmarkTypeAssertion	500000000	         3.71 ns/op
BenchmarkMapLookup	500000000	         3.58 ns/op
BenchmarkNilMapLookup	500000000	         3.20 ns/op
BenchmarkNilMapLookupWithNilCheck	2000000000	         0.80 ns/op
BenchmarkArrayLookup	2000000000	         0.53 ns/op
BenchmarkTypeToInterface1	2000000000	         0.80 ns/op
BenchmarkTypeToInterface2	2000000000	         0.53 ns/op
BenchmarkPassDecodeOptionsByValue	2000000000	         0.27 ns/op
BenchmarkPassDecodeOptionsByPointer	2000000000	         0.27 ns/op
BenchmarkLockOSThread	500000000	         4.01 ns/op
BenchmarkUnlockOSThread	500000000	         4.69 ns/op
BenchmarkLockUnlockOSThread	200000000	         9.45 ns/op
BenchmarkLockDeferUnlockOSThread	50000000	        60.1 ns/op
BenchmarkUnbufferedChannel	10000000	       255 ns/op
BenchmarkSmallBufferedChannel	 5000000	       305 ns/op
BenchmarkLargeBufferedChannel	 5000000	       305 ns/op
BenchmarkEndpointFastHashShort	100000000	        16.0 ns/op
BenchmarkEndpointFastHashLong	50000000	        35.0 ns/op
BenchmarkFlowFastHashShort	100000000	        22.6 ns/op
BenchmarkFlowFastHashLong	50000000	        59.6 ns/op
ok  	code.google.com/p/gopacket	39.438s
PASS
BenchmarkLayerClassSliceContains	2000000000	         1.10 ns/op
BenchmarkLayerClassMapContains	500000000	         3.94 ns/op
BenchmarkLazyNoCopyEthLayer	 2000000	       913 ns/op
BenchmarkLazyNoCopyIPLayer	 1000000	      1377 ns/op
BenchmarkLazyNoCopyTCPLayer	 1000000	      2165 ns/op
BenchmarkLazyNoCopyAllLayers	 1000000	      2307 ns/op
BenchmarkDefault	 1000000	      2724 ns/op
BenchmarkSerializeTcpNoOptions	10000000	       231 ns/op
BenchmarkSerializeTcpFixLengths	10000000	       244 ns/op
BenchmarkSerializeTcpComputeChecksums	 5000000	       581 ns/op
BenchmarkSerializeTcpFixLengthsComputeChecksums	 5000000	       578 ns/op
BenchmarkLazy	 1000000	      1114 ns/op
BenchmarkNoCopy	 1000000	      2083 ns/op
BenchmarkLazyNoCopy	 5000000	       478 ns/op
BenchmarkKnownStack	10000000	       178 ns/op
BenchmarkDecodingLayerParserIgnorePanic	10000000	       243 ns/op
BenchmarkDecodingLayerParserHandlePanic	 5000000	       305 ns/op
BenchmarkAlloc	50000000	        32.6 ns/op
BenchmarkFlow	50000000	        40.9 ns/op
BenchmarkEndpoints	50000000	        50.2 ns/op
BenchmarkTCPLayerFromDecodedPacket	100000000	        11.9 ns/op
BenchmarkTCPLayerClassFromDecodedPacket	50000000	        36.5 ns/op
BenchmarkTCPTransportLayerFromDecodedPacket	500000000	         2.99 ns/op
BenchmarkDecodeFuncCallOverheadDirectCall	2000000000	         1.12 ns/op
BenchmarkDecodeFuncCallOverheadDecoderCall	500000000	         6.14 ns/op
BenchmarkDecodeFuncCallOverheadArrayCall	200000000	         9.77 ns/op
BenchmarkFmtVerboseString	   10000	    172318 ns/op
BenchmarkPacketString	   50000	     58083 ns/op
BenchmarkPacketDumpString	   50000	     58222 ns/op
BenchmarkDecodeICMP	 1000000	      1655 ns/op
BenchmarkDecodeICMP6	 1000000	      1890 ns/op
BenchmarkDecodeMPLS	 1000000	      1833 ns/op
BenchmarkDecodePPPoE_ICMPv6	 1000000	      2393 ns/op
BenchmarkDecodePacketIPSecESP	 1000000	      1428 ns/op
ok  	code.google.com/p/gopacket/layers	82.062s

OLD PCAP BENCHMARK
Reading file once through to hopefully cache most of it
Read in file /tmp/gopacket_benchmark.pcap , total of 341401548 bytes
Opening file "/tmp/gopacket_benchmark.pcap" for read
Reading all packets into memory with BufferPacketSource.
Reading packet data into memory: 1237119 packets in 960.98239ms, 776ns per packet
Time to read packet data into memory from file: 961.011014ms
Benchmarking decode 1/10
	Read in 1237119 packets in 1.868541734s, 1.51us per packet
Benchmarking decode 2/10
	Read in 1237119 packets in 1.757988693s, 1.421us per packet
Benchmarking decode 3/10
	Read in 1237119 packets in 1.79457954s, 1.45us per packet
Benchmarking decode 4/10
	Read in 1237119 packets in 1.812995173s, 1.465us per packet
Benchmarking decode 5/10
	Read in 1237119 packets in 1.756123679s, 1.419us per packet
Benchmarking decode 6/10
	Read in 1237119 packets in 1.687998151s, 1.364us per packet
Benchmarking decode 7/10
	Read in 1237119 packets in 1.608803911s, 1.3us per packet
Benchmarking decode 8/10
	Read in 1237119 packets in 1.555526365s, 1.257us per packet
Benchmarking decode 9/10
	Read in 1237119 packets in 1.558551018s, 1.259us per packet
Benchmarking decode 10/10
	Read in 1237119 packets in 1.552195915s, 1.254us per packet
Fix BPF setting to activate the pcap filter after activation.
Fix issue #7 and make routing build (but not work) on a Mac
Fix stripEmpty behavior, issue #6.
Add simple PCAP file writing in new pcaputil package.
Rename pcaputil to pcapgo, so we can expand with other Go-native PCAP
code.
Add tests to pcapgo's PCAP file writer.
Add race detection, fit printf.
Fix writer to use format that older libpcap can read (microsecond
timestamp) and write test to make sure it works.
BENCH Capture pcap_activate errors, regen ports/prefixes.

----------------------------------------------------------
BENCHMARK_MARKER_DO_NOT_CHANGE
----------------------------------------------------------

Go version go version go1.2 darwin/amd64

TEST BENCHMARKS
PASS
BenchmarkTypeAssertion	500000000	         3.90 ns/op
BenchmarkMapLookup	500000000	         3.86 ns/op
BenchmarkNilMapLookup	500000000	         3.59 ns/op
BenchmarkNilMapLookupWithNilCheck	2000000000	         0.89 ns/op
BenchmarkArrayLookup	2000000000	         0.60 ns/op
BenchmarkTypeToInterface1	2000000000	         0.90 ns/op
BenchmarkTypeToInterface2	2000000000	         0.60 ns/op
BenchmarkPassDecodeOptionsByValue	2000000000	         0.30 ns/op
BenchmarkPassDecodeOptionsByPointer	2000000000	         0.30 ns/op
BenchmarkLockOSThread	500000000	         4.55 ns/op
BenchmarkUnlockOSThread	500000000	         5.05 ns/op
BenchmarkLockUnlockOSThread	100000000	        10.4 ns/op
BenchmarkLockDeferUnlockOSThread	20000000	        76.4 ns/op
BenchmarkUnbufferedChannel	10000000	       278 ns/op
BenchmarkSmallBufferedChannel	 5000000	       335 ns/op
BenchmarkLargeBufferedChannel	 5000000	       331 ns/op
BenchmarkEndpointFastHashShort	100000000	        16.2 ns/op
BenchmarkEndpointFastHashLong	50000000	        34.0 ns/op
BenchmarkFlowFastHashShort	100000000	        21.7 ns/op
BenchmarkFlowFastHashLong	50000000	        57.4 ns/op
ok  	code.google.com/p/gopacket	38.404s
PASS
BenchmarkLayerClassSliceContains	2000000000	         1.20 ns/op
BenchmarkLayerClassMapContains	500000000	         4.00 ns/op
BenchmarkLazyNoCopyEthLayer	 2000000	       933 ns/op
BenchmarkLazyNoCopyIPLayer	 1000000	      1461 ns/op
BenchmarkLazyNoCopyTCPLayer	 1000000	      2281 ns/op
BenchmarkLazyNoCopyAllLayers	 1000000	      2513 ns/op
BenchmarkDefault	 1000000	      2840 ns/op
BenchmarkSerializeTcpNoOptions	10000000	       252 ns/op
BenchmarkSerializeTcpFixLengths	10000000	       258 ns/op
BenchmarkSerializeTcpComputeChecksums	 5000000	       576 ns/op
BenchmarkSerializeTcpFixLengthsComputeChecksums	 5000000	       584 ns/op
BenchmarkLazy	 1000000	      1117 ns/op
BenchmarkNoCopy	 1000000	      2151 ns/op
BenchmarkLazyNoCopy	 5000000	       476 ns/op
BenchmarkKnownStack	10000000	       181 ns/op
BenchmarkDecodingLayerParserIgnorePanic	10000000	       252 ns/op
BenchmarkDecodingLayerParserHandlePanic	 5000000	       332 ns/op
BenchmarkAlloc	50000000	        35.7 ns/op
BenchmarkFlow	50000000	        43.0 ns/op
BenchmarkEndpoints	50000000	        55.3 ns/op
BenchmarkTCPLayerFromDecodedPacket	100000000	        12.5 ns/op
BenchmarkTCPLayerClassFromDecodedPacket	50000000	        50.7 ns/op
BenchmarkTCPTransportLayerFromDecodedPacket	500000000	         3.17 ns/op
BenchmarkDecodeFuncCallOverheadDirectCall	2000000000	         1.19 ns/op
BenchmarkDecodeFuncCallOverheadDecoderCall	500000000	         6.70 ns/op
BenchmarkDecodeFuncCallOverheadArrayCall	100000000	        10.8 ns/op
BenchmarkFmtVerboseString	   10000	    191740 ns/op
BenchmarkPacketString	   50000	     61088 ns/op
BenchmarkPacketDumpString	   50000	     61121 ns/op
BenchmarkDecodeICMP	 1000000	      1727 ns/op
BenchmarkDecodeICMP6	 1000000	      1945 ns/op
BenchmarkDecodeMPLS	 1000000	      1895 ns/op
BenchmarkDecodePPPoE_ICMPv6	 1000000	      2385 ns/op
BenchmarkDecodePacketIPSecESP	 1000000	      1480 ns/op
ok  	code.google.com/p/gopacket/layers	84.545s

PCAP BENCHMARK
Local pcap file /var/folders/00/07mgr000h01000cxqpysvccm000yjz/T//gopacket_benchmark.pcap doesn't exist, reading from http://www.ll.mit.edu/mission/communications/cyber/CSTcorpora/ideval/data/1999/training/week1/tuesday/inside.tcpdump.gz
Successfully read 341401548 bytes from url, unzipped to local storage
Reading file once through to hopefully cache most of it
Read in file /var/folders/00/07mgr000h01000cxqpysvccm000yjz/T//gopacket_benchmark.pcap , total of 341401548 bytes
Opening file "/var/folders/00/07mgr000h01000cxqpysvccm000yjz/T//gopacket_benchmark.pcap" for read
Reading all packets into memory with BufferPacketSource.
Reading packet data into memory: 1237119 packets in 1.165674079s, 942ns per packet
Time to read packet data into memory from file: 1.16570573s

Benchmarking decode 1/5
	Read in 1237119 packets in 1.782413711s, 1.44us per packet
Benchmarking decode 2/5
	Read in 1237119 packets in 1.57956433s, 1.276us per packet
Benchmarking decode 3/5
	Read in 1237119 packets in 1.624183055s, 1.312us per packet
Benchmarking decode 4/5
	Read in 1237119 packets in 1.658876275s, 1.34us per packet
Benchmarking decode 5/5
	Read in 1237119 packets in 1.646003362s, 1.33us per packet

Benchmarking decoding layer parser 1/5
	Read in 1237120 packets in 397.893264ms, decoded 4330909 layers, assembled 0 packets: 321ns per packet
Benchmarking decoding layer parser 2/5
	Read in 1237120 packets in 399.336627ms, decoded 4330909 layers, assembled 0 packets: 322ns per packet
Benchmarking decoding layer parser 3/5
	Read in 1237120 packets in 402.378176ms, decoded 4330909 layers, assembled 0 packets: 325ns per packet
Benchmarking decoding layer parser 4/5
	Read in 1237120 packets in 398.963177ms, decoded 4330909 layers, assembled 0 packets: 322ns per packet
Benchmarking decoding layer parser 5/5
	Read in 1237120 packets in 399.818023ms, decoded 4330909 layers, assembled 0 packets: 323ns per packet

Benchmarking decoding layer parser with assembly 1/5
	Read in 1237120 packets in 716.477067ms, decoded 4330909 layers, assembled 1153247 packets: 579ns per packet
Benchmarking decoding layer parser with assembly 2/5
	Read in 1237120 packets in 713.966645ms, decoded 4330909 layers, assembled 1153247 packets: 577ns per packet
Benchmarking decoding layer parser with assembly 3/5
	Read in 1237120 packets in 714.703714ms, decoded 4330909 layers, assembled 1153247 packets: 577ns per packet
Benchmarking decoding layer parser with assembly 4/5
	Read in 1237120 packets in 717.088317ms, decoded 4330909 layers, assembled 1153247 packets: 579ns per packet
Benchmarking decoding layer parser with assembly 5/5
	Read in 1237120 packets in 713.728779ms, decoded 4330909 layers, assembled 1153247 packets: 576ns per packet
----------------------------------------------------------
BENCHMARKING AGAINST COMMIT bbaeda7e98b6fcbb5d49eee8ad941023b6a6e178
----------------------------------------------------------

OLD TEST BENCHMARKS
PASS
BenchmarkTypeAssertion	500000000	         3.91 ns/op
BenchmarkMapLookup	500000000	         3.82 ns/op
BenchmarkNilMapLookup	500000000	         3.56 ns/op
BenchmarkNilMapLookupWithNilCheck	2000000000	         0.89 ns/op
BenchmarkArrayLookup	2000000000	         0.59 ns/op
BenchmarkTypeToInterface1	2000000000	         0.89 ns/op
BenchmarkTypeToInterface2	2000000000	         0.59 ns/op
BenchmarkPassDecodeOptionsByValue	2000000000	         0.30 ns/op
BenchmarkPassDecodeOptionsByPointer	2000000000	         0.30 ns/op
BenchmarkLockOSThread	500000000	         4.51 ns/op
BenchmarkUnlockOSThread	500000000	         5.04 ns/op
BenchmarkLockUnlockOSThread	100000000	        10.4 ns/op
BenchmarkLockDeferUnlockOSThread	20000000	        76.1 ns/op
BenchmarkUnbufferedChannel	10000000	       289 ns/op
BenchmarkSmallBufferedChannel	 5000000	       329 ns/op
BenchmarkLargeBufferedChannel	 5000000	       331 ns/op
BenchmarkEndpointFastHashShort	100000000	        16.7 ns/op
BenchmarkEndpointFastHashLong	50000000	        34.1 ns/op
BenchmarkFlowFastHashShort	100000000	        21.6 ns/op
BenchmarkFlowFastHashLong	50000000	        57.0 ns/op
ok  	code.google.com/p/gopacket	38.367s
PASS
BenchmarkLayerClassSliceContains	2000000000	         1.19 ns/op
BenchmarkLayerClassMapContains	500000000	         4.04 ns/op
BenchmarkLazyNoCopyEthLayer	 2000000	       902 ns/op
BenchmarkLazyNoCopyIPLayer	 1000000	      1456 ns/op
BenchmarkLazyNoCopyTCPLayer	 1000000	      2269 ns/op
BenchmarkLazyNoCopyAllLayers	 1000000	      2441 ns/op
BenchmarkDefault	 1000000	      2773 ns/op
BenchmarkSerializeTcpNoOptions	10000000	       250 ns/op
BenchmarkSerializeTcpFixLengths	10000000	       255 ns/op
BenchmarkSerializeTcpComputeChecksums	 5000000	       571 ns/op
BenchmarkSerializeTcpFixLengthsComputeChecksums	 5000000	       577 ns/op
BenchmarkLazy	 1000000	      1122 ns/op
BenchmarkNoCopy	 1000000	      2121 ns/op
BenchmarkLazyNoCopy	 5000000	       471 ns/op
BenchmarkKnownStack	10000000	       181 ns/op
BenchmarkDecodingLayerParserIgnorePanic	10000000	       256 ns/op
BenchmarkDecodingLayerParserHandlePanic	 5000000	       337 ns/op
BenchmarkAlloc	50000000	        35.6 ns/op
BenchmarkFlow	50000000	        43.0 ns/op
BenchmarkEndpoints	50000000	        55.2 ns/op
BenchmarkTCPLayerFromDecodedPacket	100000000	        12.5 ns/op
BenchmarkTCPLayerClassFromDecodedPacket	50000000	        40.2 ns/op
BenchmarkTCPTransportLayerFromDecodedPacket	500000000	         3.22 ns/op
BenchmarkDecodeFuncCallOverheadDirectCall	2000000000	         1.19 ns/op
BenchmarkDecodeFuncCallOverheadDecoderCall	500000000	         6.67 ns/op
BenchmarkDecodeFuncCallOverheadArrayCall	100000000	        10.8 ns/op
BenchmarkFmtVerboseString	   10000	    191703 ns/op
BenchmarkPacketString	   50000	     60965 ns/op
BenchmarkPacketDumpString	   50000	     60962 ns/op
BenchmarkDecodeICMP	 1000000	      1720 ns/op
BenchmarkDecodeICMP6	 1000000	      1915 ns/op
BenchmarkDecodeMPLS	 1000000	      1889 ns/op
BenchmarkDecodePPPoE_ICMPv6	 1000000	      2425 ns/op
BenchmarkDecodePacketIPSecESP	 1000000	      1456 ns/op
ok  	code.google.com/p/gopacket/layers	83.548s

OLD PCAP BENCHMARK
Reading file once through to hopefully cache most of it
Read in file /var/folders/00/07mgr000h01000cxqpysvccm000yjz/T//gopacket_benchmark.pcap , total of 341401548 bytes
Opening file "/var/folders/00/07mgr000h01000cxqpysvccm000yjz/T//gopacket_benchmark.pcap" for read
Reading all packets into memory with BufferPacketSource.
Reading packet data into memory: 1237119 packets in 1.102306453s, 891ns per packet
Time to read packet data into memory from file: 1.102352274s

Benchmarking decode 1/5
	Read in 1237119 packets in 1.758718353s, 1.421us per packet
Benchmarking decode 2/5
	Read in 1237119 packets in 1.580887575s, 1.277us per packet
Benchmarking decode 3/5
	Read in 1237119 packets in 1.618946992s, 1.308us per packet
Benchmarking decode 4/5
	Read in 1237119 packets in 1.696694762s, 1.371us per packet
Benchmarking decode 5/5
	Read in 1237119 packets in 1.751296183s, 1.415us per packet

Benchmarking decoding layer parser 1/5
	Read in 1237120 packets in 429.062095ms, decoded 4330909 layers, assembled 0 packets: 346ns per packet
Benchmarking decoding layer parser 2/5
	Read in 1237120 packets in 428.495618ms, decoded 4330909 layers, assembled 0 packets: 346ns per packet
Benchmarking decoding layer parser 3/5
	Read in 1237120 packets in 426.39996ms, decoded 4330909 layers, assembled 0 packets: 344ns per packet
Benchmarking decoding layer parser 4/5
	Read in 1237120 packets in 425.744012ms, decoded 4330909 layers, assembled 0 packets: 344ns per packet
Benchmarking decoding layer parser 5/5
	Read in 1237120 packets in 427.540916ms, decoded 4330909 layers, assembled 0 packets: 345ns per packet

Benchmarking decoding layer parser with assembly 1/5
	Read in 1237120 packets in 750.800395ms, decoded 4330909 layers, assembled 1153247 packets: 606ns per packet
Benchmarking decoding layer parser with assembly 2/5
	Read in 1237120 packets in 745.20974ms, decoded 4330909 layers, assembled 1153247 packets: 602ns per packet
Benchmarking decoding layer parser with assembly 3/5
	Read in 1237120 packets in 739.565771ms, decoded 4330909 layers, assembled 1153247 packets: 597ns per packet
Benchmarking decoding layer parser with assembly 4/5
	Read in 1237120 packets in 740.975055ms, decoded 4330909 layers, assembled 1153247 packets: 598ns per packet
Benchmarking decoding layer parser with assembly 5/5
	Read in 1237120 packets in 764.387062ms, decoded 4330909 layers, assembled 1153247 packets: 617ns per packet
Add PCAP tests which require root priviledges.
Fix for winpcap, which is missing a function.
PF Log format added.
Add Unactivated to pcap.

PCAP code has for the past few commits had a bunch of extra complexity
(and bugs) added because it needs to keep track of handle activation,
due to the fact that timestamp sources must be set before activation,
but BPF filters must be set afterwards, etc.

This has caused a number of bugs, including:
1) OpenOffline forgot to activate.
2) LinkType wasn't set correctly if handle wasn't activated

To get around this and force the API to always do the right thing, I've
created the "Unactivated" type in pcap.go, which acts like a handle
builder... Create creates a new one, then calling Activate on it returns
an (activated) Handle.  Among other things, this drastically simplifies
OpenLive, which no longer has to approximate the behavior of
pcap_open_live and hope for the best.