public inbox for dtrace@lists.linux.dev
 help / color / mirror / Atom feed
From: eugene.loh@oracle.com
To: dtrace@lists.linux.dev, dtrace-devel@oss.oracle.com
Subject: [PATCH v2 19/20] doc: Add UDP provider documentation
Date: Tue, 21 Oct 2025 23:22:49 -0400	[thread overview]
Message-ID: <20251022032251.2010-14-eugene.loh@oracle.com> (raw)
In-Reply-To: <20251022032251.2010-1-eugene.loh@oracle.com>

From: Eugene Loh <eugene.loh@oracle.com>

Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
---
 doc/userguide/index.md                        |  6 ++
 doc/userguide/reference/dtrace_providers.md   |  2 +
 .../reference/dtrace_providers_udp.md         | 76 +++++++++++++++++++
 3 files changed, 84 insertions(+)
 create mode 100644 doc/userguide/reference/dtrace_providers_udp.md

diff --git a/doc/userguide/index.md b/doc/userguide/index.md
index fa9d9d021..f86c8b9e5 100644
--- a/doc/userguide/index.md
+++ b/doc/userguide/index.md
@@ -266,6 +266,12 @@
             -   [tcpsinfo\_t](reference/dtrace_providers_tcp.md#dt_ref_tcptcps_prov)
             -   [tcplsinfo\_t](reference/dtrace_providers_tcp.md#dt_ref_tcptcpls_prov)
         -   [tcp Stability](reference/dtrace_providers_tcp.md#dt_ref_tcpstab_prov)
+    -   [UDP Provider](reference/dtrace_providers_udp.md)
+        -   [udp Probes](reference/dtrace_providers_udp.md#dt_ref_udpprobes_prov)
+        -   [udp Probe Arguments](reference/dtrace_providers_udp.md#dt_ref_udpargs_prov)
+            -   [udpsinfo\_t](reference/dtrace_providers_udp.md#dt_ref_udpudps_prov)
+            -   [udpinfo\_t](reference/dtrace_providers_udp.md#dt_ref_udpudp_prov)
+        -   [udp Stability](reference/dtrace_providers_udp.md#dt_ref_udpstab_prov)
     -   [USDT Provider](reference/dtrace-ref-StaticallyDefinedTracingofUserApplications.md#dt_ref_usdt_prov)
         -   [Defining USDT Providers and Probes](reference/dtrace-ref-StaticallyDefinedTracingofUserApplications.md#dt_ref_usdtprobes_prov)
         -   [Adding USDT Probes to Application Code](reference/dtrace-ref-StaticallyDefinedTracingofUserApplications.md#dt_ref_usdt_probe_add_prov)
diff --git a/doc/userguide/reference/dtrace_providers.md b/doc/userguide/reference/dtrace_providers.md
index 7da634d2a..f11bacb2f 100644
--- a/doc/userguide/reference/dtrace_providers.md
+++ b/doc/userguide/reference/dtrace_providers.md
@@ -31,6 +31,8 @@ The Statically Defined Tracing \(SDT\) provider \(`sdt`\) creates probes at site
 The `syscall` provider makes available a probe at the entry to and return from every system call in the system.
 -   **[TCP Provider](../reference/dtrace_providers_tcp.md)**  
 The `tcp` provider makes available probe at different phases of TCP processing.
+-   **[UDP Provider](../reference/dtrace_providers_udp.md)**  
+The `udp` provider makes available a probe at UDP send and receive operations in the system.
 -   **[USDT Provider](../reference/dtrace-ref-StaticallyDefinedTracingofUserApplications.md)**
 Use the USDT provider, for user space statically defined tracing, to instrument user space code with probes that are meaningful for an application.
 
diff --git a/doc/userguide/reference/dtrace_providers_udp.md b/doc/userguide/reference/dtrace_providers_udp.md
new file mode 100644
index 000000000..455f91e4d
--- /dev/null
+++ b/doc/userguide/reference/dtrace_providers_udp.md
@@ -0,0 +1,76 @@
+# UDP Provider
+
+The `udp` provider makes available a probe at UDP send operations in the system and a probe at receive.
+
+**Parent topic:**[DTrace Provider Reference](../reference/dtrace_providers.md)
+
+## udp Probes <a id="dt_ref_udpprobes_prov">
+
+`udp` provides a probe for UDP sends and one for UDP receives.
+The module name is always `vmlinux` and the function name is empty.
+
+## udp Probe Arguments <a id="dt_ref_udpargs_prov">
+
+The following table lists the argument types for both the `send` and `receive` probes.
+
+| arg       | type           |
+| :---      | :---           |
+| `args[0]` | `pktinfo_t *`  |
+| `args[1]` | `csinfo_t *`   |
+| `args[2]` | `ipinfo_t *`   |
+| `args[3]` | `udpsinfo_t *` |
+| `args[4]` | `udpinfo_t *`  |
+
+The `pktinfo_t`, `csinfo_t`, and `ipinfo_t` structures are described in [IP Provider](dtrace_providers_ip.md).
+
+### udpsinfo\_t <a id="dt_ref_udpudps_prov">
+
+The `udpsinfo_t` structure contains stable UDP details from `udp_t`.
+Detailed information about this data structure can be found in `/usr/lib64/dtrace/*version*/udp.d`.
+The definition of `udpsinfo_t` is as follows:
+
+```nocopybutton
+typedef struct udpsinfo {
+        uintptr_t udps_addr;
+        uint16_t udps_lport;   /* local port */
+        uint16_t udps_rport;   /* remote port */
+        string udps_laddr;     /* local address, as a string */
+        string udps_raddr;     /* remote address, as a string */
+} udpsinfo_t;
+```
+
+**Note:**
+
+DTrace translates the members of `udpsinfo_t` from a `struct udp_sock *`.
+
+### udpinfo\_t <a id="dt_ref_udpudp_prov">
+
+The `udpinfo_t` structure contains the UDP header fields.
+Detailed information about this data structure can be found in `/usr/lib64/dtrace/*version*/udp.d`.
+The definition of `udpinfo_t` is as follows:
+
+```nocopybutton
+typedef struct udpinfo {
+        uint16_t udp_sport;     /* source port */
+        uint16_t udp_dport;     /* destination port */
+        uint16_t udp_length;    /* total length */
+        uint16_t udp_checksum;  /* headers + data checksum */
+        struct udphdr *udp_hdr; /* raw UDP header */
+} udpinfo_t;
+```
+
+**Note:**
+
+DTrace translates the members of `udpinfo_t` from a `struct udphdr *`.
+
+## udp Stability <a id="dt_ref_udpstab_prov">
+
+The `udp` provider uses DTrace's stability mechanism to describe its stabilities. These stability values are listed in the following table.
+
+| Element   | Name Stability | Data Stability | Dependency Class |
+| :---      | :---           | :---           | :---             |
+| Provider  | Evolving       | Evolving       | ISA              |
+| Module    | Private        | Private        | Unknown          |
+| Function  | Private        | Private        | Unknown          |
+| Name      | Evolving       | Evolving       | ISA              |
+| Arguments | Evolving       | Evolving       | ISA              |
-- 
2.47.3


  parent reply	other threads:[~2025-10-22  3:23 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-22  3:22 [PATCH v2 05/20] doc: Replace duplicate id eugene.loh
2025-10-22  3:22 ` [PATCH v2 06/20] doc: Clean up dangling anchor links eugene.loh
2025-10-23 19:53   ` Elena Zannoni
2025-10-22  3:22 ` [PATCH v2 08/20] doc: Fix anchor links for built-in variables eugene.loh
2025-10-23 19:26   ` Elena Zannoni
2025-10-22  3:22 ` [PATCH v2 09/20] doc: Fix anchor links for providers eugene.loh
2025-10-23 19:27   ` [DTrace-devel] " Elena Zannoni
2025-10-22  3:22 ` [PATCH v2 10/20] doc: Fix anchor links for explanation/ eugene.loh
2025-10-23 19:27   ` Elena Zannoni
2025-10-22  3:22 ` [PATCH v2 11/20] doc: Fix anchor links for how-to/ eugene.loh
2025-10-23 19:28   ` [DTrace-devel] " Elena Zannoni
2025-10-22  3:22 ` [PATCH v2 12/20] doc: Fix anchor links for reference/ eugene.loh
2025-10-23 19:28   ` [DTrace-devel] " Elena Zannoni
2025-10-22  3:22 ` [PATCH v2 13/20] doc: Clean up the table for string relational operators eugene.loh
2025-10-23 19:30   ` [DTrace-devel] " Elena Zannoni
2025-10-22  3:22 ` [PATCH v2 14/20] doc: Link to "Character Escape Sequences" table eugene.loh
2025-10-23 19:32   ` [DTrace-devel] " Elena Zannoni
2025-10-22  3:22 ` [PATCH v2 15/20] doc: Clean up profile unit table eugene.loh
2025-10-23 19:33   ` [DTrace-devel] " Elena Zannoni
2025-10-22  3:22 ` [PATCH v2 16/20] doc: Clean up undefined anchor links eugene.loh
2025-10-23 19:34   ` Elena Zannoni
2025-10-22  3:22 ` [PATCH v2 17/20] doc: Add IP provider documentation eugene.loh
2025-10-22  3:22 ` [PATCH v2 18/20] doc: Add TCP " eugene.loh
2025-10-22  3:22 ` eugene.loh [this message]
2025-10-22  3:22 ` [PATCH v2 20/20] doc: Add rawfbt " eugene.loh
2025-10-22  3:22 ` [PATCH 21/20] doc: Add blank line before section head so it is recognized eugene.loh
2025-10-23 19:35   ` [DTrace-devel] " Elena Zannoni
2025-10-23 19:23 ` [PATCH v2 05/20] doc: Replace duplicate id Elena Zannoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251022032251.2010-14-eugene.loh@oracle.com \
    --to=eugene.loh@oracle.com \
    --cc=dtrace-devel@oss.oracle.com \
    --cc=dtrace@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox