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

TOMOYO Linux Cross Reference
Linux/include/trace/events/fib6.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 fib6
  4 
  5 #if !defined(_TRACE_FIB6_H) || defined(TRACE_HEADER_MULTI_READ)
  6 #define _TRACE_FIB6_H
  7 
  8 #include <linux/in6.h>
  9 #include <net/flow.h>
 10 #include <net/ip6_fib.h>
 11 #include <linux/tracepoint.h>
 12 
 13 TRACE_EVENT(fib6_table_lookup,
 14 
 15         TP_PROTO(const struct net *net, const struct fib6_result *res,
 16                  struct fib6_table *table, const struct flowi6 *flp),
 17 
 18         TP_ARGS(net, res, table, flp),
 19 
 20         TP_STRUCT__entry(
 21                 __field(        u32,    tb_id           )
 22                 __field(        int,    err             )
 23                 __field(        int,    oif             )
 24                 __field(        int,    iif             )
 25                 __field(        __u8,   tos             )
 26                 __field(        __u8,   scope           )
 27                 __field(        __u8,   flags           )
 28                 __array(        __u8,   src,    16      )
 29                 __array(        __u8,   dst,    16      )
 30                 __field(        u16,    sport           )
 31                 __field(        u16,    dport           )
 32                 __field(        u8,     proto           )
 33                 __field(        u8,     rt_type         )
 34                 __array(                char,   name,   IFNAMSIZ )
 35                 __array(                __u8,   gw,     16       )
 36         ),
 37 
 38         TP_fast_assign(
 39                 struct in6_addr *in6;
 40 
 41                 __entry->tb_id = table->tb6_id;
 42                 __entry->err = ip6_rt_type_to_error(res->fib6_type);
 43                 __entry->oif = flp->flowi6_oif;
 44                 __entry->iif = flp->flowi6_iif;
 45                 __entry->tos = ip6_tclass(flp->flowlabel);
 46                 __entry->scope = flp->flowi6_scope;
 47                 __entry->flags = flp->flowi6_flags;
 48 
 49                 in6 = (struct in6_addr *)__entry->src;
 50                 *in6 = flp->saddr;
 51 
 52                 in6 = (struct in6_addr *)__entry->dst;
 53                 *in6 = flp->daddr;
 54 
 55                 __entry->proto = flp->flowi6_proto;
 56                 if (__entry->proto == IPPROTO_TCP ||
 57                     __entry->proto == IPPROTO_UDP) {
 58                         __entry->sport = ntohs(flp->fl6_sport);
 59                         __entry->dport = ntohs(flp->fl6_dport);
 60                 } else {
 61                         __entry->sport = 0;
 62                         __entry->dport = 0;
 63                 }
 64 
 65                 if (res->nh && res->nh->fib_nh_dev) {
 66                         strscpy(__entry->name, res->nh->fib_nh_dev->name, IFNAMSIZ);
 67                 } else {
 68                         strcpy(__entry->name, "-");
 69                 }
 70                 if (res->f6i == net->ipv6.fib6_null_entry) {
 71                         in6 = (struct in6_addr *)__entry->gw;
 72                         *in6 = in6addr_any;
 73                 } else if (res->nh) {
 74                         in6 = (struct in6_addr *)__entry->gw;
 75                         *in6 = res->nh->fib_nh_gw6;
 76                 }
 77         ),
 78 
 79         TP_printk("table %3u oif %d iif %d proto %u %pI6c/%u -> %pI6c/%u tos %d scope %d flags %x ==> dev %s gw %pI6c err %d",
 80                   __entry->tb_id, __entry->oif, __entry->iif, __entry->proto,
 81                   __entry->src, __entry->sport, __entry->dst, __entry->dport,
 82                   __entry->tos, __entry->scope, __entry->flags,
 83                   __entry->name, __entry->gw, __entry->err)
 84 );
 85 
 86 #endif /* _TRACE_FIB6_H */
 87 
 88 /* This part must be outside protection */
 89 #include <trace/define_trace.h>
 90 

~ [ 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