DESCRIPTION

tmf: Initial commit of Pcap Parser

This commit is the first step toward adding pcap-reading abilities to
TMF. It only adds the parser, and as such it is completely
independent from TMF. The parser supports four protocols (Ethernet,
IPv4, TCP, UDP) and both microsecond and nanosecond pcap files.

Change-Id: I334571c06a44cec99f9e37011fbfaa27b6a414e3
Signed-off-by: Itzel Singleton xxx@xxx.xxx


COMMENTS

author: Itzel Singleton
date: 2014-07-11 16:50:40.000000000

Uploaded patch set 8.

-------------------------------------
author: Brenden Conley
date: 2014-07-11 16:50:46.000000000

Patch Set 8:

Build Started https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/7722/

-------------------------------------
author: Ivy Mitchell
date: 2014-07-11 16:51:31.000000000

Patch Set 8: Code-Review+1

alex, go!

-------------------------------------
author: Brenden Conley
date: 2014-07-11 17:28:05.000000000

Patch Set 8: Verified+1

Build Successful 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/7722/ : SUCCESS

-------------------------------------
author: Braxton Mccarthy
date: 2014-07-11 20:36:29.000000000

Patch Set 8:

(5 comments)

Line:101, lttng/org.eclipse.linuxtools.pcap.core/src/org/eclipse/linuxtools/pcap/core/util/LinkTypeHelper.java -> Why do you need this? If your linktypes above are defined as int, only int values should be passed. Let whatever caller do this conversion, and have them call the toString() variant above.

Line:79, lttng/org.eclipse.linuxtools.pcap.core/src/org/eclipse/linuxtools/pcap/core/endpoint/ProtocolEndpoint.java -> no no no, you cannot do this (abstract hashCode + final equals()). Those two methods have to go together. They could both be abstract here, or both have an implementation.

If you go with the second option, it's a bit harsh to make them final. Sub-classes should be able to do what they want with this (as long as they always override *both*, not just one of them).

Line:23, lttng/org.eclipse.linuxtools.pcap.core/src/org/eclipse/linuxtools/pcap/core/util/PortHelper.java -> I'd remove this entirely, only add it when used/needed. It's too easy to add stubs, and then forget them forever ;)

Line:95, lttng/org.eclipse.linuxtools.pcap.core/src/org/eclipse/linuxtools/pcap/core/stream/PacketStreamBuilder.java -> Why a List here? Does the notion of "getStreams().get(10);" make any sense?

Probably not, since you use HashMap's, and those do not keep the insertion order the same as the iteration order anyway.

In this case I'd recommend to use Iterable<> or at worst Collection<> for the return value. It's ok to do a copy internally though, since the map is mutable, you do not want to return it (or its .values()) directly. I'd suggest using LinkedList instead though, since you won't be accessing it by indexes.

Line:164, lttng/org.eclipse.linuxtools.pcap.core/src/org/eclipse/linuxtools/pcap/core/protocol/ethernet2/EthernetIIPacket.java -> NON-NLS is not something that should be mindlessly clicked to make the warning go away ;)  Every time you type/click NON-NLS, you should ask yourself: is this string meant to be shown in the UI, or not? If yes, they it should NOT be NON-NLS'ed, and should be correctly externalized. Which is the case with the strings here.

-------------------------------------
