~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/net/dccp/trace.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #undef TRACE_SYSTEM
  3 #define TRACE_SYSTEM dccp
  4 
  5 #if !defined(_TRACE_DCCP_H) || defined(TRACE_HEADER_MULTI_READ)
  6 #define _TRACE_DCCP_H
  7 
  8 #include <net/sock.h>
  9 #include "dccp.h"
 10 #include "ccids/ccid3.h"
 11 #include <linux/tracepoint.h>
 12 #include <trace/events/net_probe_common.h>
 13 
 14 TRACE_EVENT(dccp_probe,
 15 
 16         TP_PROTO(struct sock *sk, size_t size),
 17 
 18         TP_ARGS(sk, size),
 19 
 20         TP_STRUCT__entry(
 21                 /* sockaddr_in6 is always bigger than sockaddr_in */
 22                 __array(__u8, saddr, sizeof(struct sockaddr_in6))
 23                 __array(__u8, daddr, sizeof(struct sockaddr_in6))
 24                 __field(__u16, sport)
 25                 __field(__u16, dport)
 26                 __field(__u16, size)
 27                 __field(__u16, tx_s)
 28                 __field(__u32, tx_rtt)
 29                 __field(__u32, tx_p)
 30                 __field(__u32, tx_x_calc)
 31                 __field(__u64, tx_x_recv)
 32                 __field(__u64, tx_x)
 33                 __field(__u32, tx_t_ipi)
 34         ),
 35 
 36         TP_fast_assign(
 37                 const struct inet_sock *inet = inet_sk(sk);
 38                 struct ccid3_hc_tx_sock *hc = NULL;
 39 
 40                 if (ccid_get_current_tx_ccid(dccp_sk(sk)) == DCCPC_CCID3)
 41                         hc = ccid3_hc_tx_sk(sk);
 42 
 43                 memset(__entry->saddr, 0, sizeof(struct sockaddr_in6));
 44                 memset(__entry->daddr, 0, sizeof(struct sockaddr_in6));
 45 
 46                 TP_STORE_ADDR_PORTS(__entry, inet, sk);
 47 
 48                 /* For filtering use */
 49                 __entry->sport = ntohs(inet->inet_sport);
 50                 __entry->dport = ntohs(inet->inet_dport);
 51 
 52                 __entry->size = size;
 53                 if (hc) {
 54                         __entry->tx_s = hc->tx_s;
 55                         __entry->tx_rtt = hc->tx_rtt;
 56                         __entry->tx_p = hc->tx_p;
 57                         __entry->tx_x_calc = hc->tx_x_calc;
 58                         __entry->tx_x_recv = hc->tx_x_recv >> 6;
 59                         __entry->tx_x = hc->tx_x >> 6;
 60                         __entry->tx_t_ipi = hc->tx_t_ipi;
 61                 } else {
 62                         __entry->tx_s = 0;
 63                         memset_startat(__entry, 0, tx_rtt);
 64                 }
 65         ),
 66 
 67         TP_printk("src=%pISpc dest=%pISpc size=%d tx_s=%d tx_rtt=%d "
 68                   "tx_p=%d tx_x_calc=%u tx_x_recv=%llu tx_x=%llu tx_t_ipi=%d",
 69                   __entry->saddr, __entry->daddr, __entry->size,
 70                   __entry->tx_s, __entry->tx_rtt, __entry->tx_p,
 71                   __entry->tx_x_calc, __entry->tx_x_recv, __entry->tx_x,
 72                   __entry->tx_t_ipi)
 73 );
 74 
 75 #endif /* _TRACE_TCP_H */
 76 
 77 /* This part must be outside protection */
 78 #undef TRACE_INCLUDE_PATH
 79 #define TRACE_INCLUDE_PATH .
 80 #undef TRACE_INCLUDE_FILE
 81 #define TRACE_INCLUDE_FILE trace
 82 #include <trace/define_trace.h>
 83 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php