linux.core: Add network events and fields to the kernel layout
authorGeneviève Bastien <gbastien+lttng@versatic.net>
Fri, 22 Jul 2016 21:23:34 +0000 (17:23 -0400)
committerGenevieve Bastien <gbastien+lttng@versatic.net>
Tue, 26 Jul 2016 00:06:04 +0000 (20:06 -0400)
Event matching definitions can then make use of those events and fields

Change-Id: I0a71de243f74519241ebd2eebbb8ea5a7313bd35
Signed-off-by: Geneviève Bastien <gbastien+lttng@versatic.net>
Reviewed-on: https://git.eclipse.org/r/77799
Reviewed-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-by: Alexandre Montplaisir <alexmonthy@efficios.com>
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/trace/IKernelAnalysisEventLayout.java

index 2b58f29686ceaf57c2c89b1361dd2dcbb9e69c67..39875900d07cbcdc0c5a66f21eff856dd69342f7 100644 (file)
@@ -758,4 +758,62 @@ public interface IKernelAnalysisEventLayout {
         return "vector"; //$NON-NLS-1$
     }
 
+    // ------------------------------------------------------------------------
+    // Network events and fields
+    // ------------------------------------------------------------------------
+
+    /**
+     * An event indicating that a packet is sent on the network
+     *
+     * @return The name of the packet send event
+     * @since 2.1
+     */
+    default String eventNetworkSend() {
+        return "net_dev_queue"; //$NON-NLS-1$
+    }
+
+    /**
+     * Get the list of events indicating that a packet is received from the
+     * network
+     *
+     * @return The collection of names of the packet receive event
+     * @since 2.1
+     */
+    default Collection<String> eventNetworkReceive() {
+        return Collections.singleton("netif_receive_skb"); //$NON-NLS-1$
+    }
+
+    /**
+     * The path of the field corresponding to the sequence number field of a TCP
+     * header
+     *
+     * @return The path of the sequence number field in the TCP header of a
+     *         network packet
+     * @since 2.1
+     */
+    default String[] fieldPathTcpSeq() {
+        return new String[] { "seq" }; //$NON-NLS-1$
+    }
+
+    /**
+     * The path of the field corresponding to the acknowledgment number field of
+     * a TCP header
+     *
+     * @return The name of the acknowledgment number field in the TCP header of
+     *         a network packet
+     * @since 2.1
+     */
+    default String[] fieldPathTcpAckSeq() {
+        return new String[] { "ack_seq" }; //$NON-NLS-1$
+    }
+
+    /**
+     * The path of the field corresponding to the flags field of a TCP header
+     *
+     * @return The path of the flags field in the TCP header of a network packet
+     * @since 2.1
+     */
+    default String[] fieldPathTcpFlags() {
+        return new String[] { "flags" }; //$NON-NLS-1$
+    }
 }
This page took 0.02725 seconds and 5 git commands to generate.