From 35944fc5d7ef2f1a4a2745c94020596fad6f52a0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Genevi=C3=A8ve=20Bastien?= Date: Fri, 22 Jul 2016 17:23:34 -0400 Subject: [PATCH] linux.core: Add network events and fields to the kernel layout MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Event matching definitions can then make use of those events and fields Change-Id: I0a71de243f74519241ebd2eebbb8ea5a7313bd35 Signed-off-by: Geneviève Bastien Reviewed-on: https://git.eclipse.org/r/77799 Reviewed-by: Hudson CI Reviewed-by: Matthew Khouzam Tested-by: Matthew Khouzam Reviewed-by: Alexandre Montplaisir --- .../trace/IKernelAnalysisEventLayout.java | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/trace/IKernelAnalysisEventLayout.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/trace/IKernelAnalysisEventLayout.java index 2b58f29686..39875900d0 100644 --- a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/trace/IKernelAnalysisEventLayout.java +++ b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/trace/IKernelAnalysisEventLayout.java @@ -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 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$ + } } -- 2.34.1