include/trace/events/bridge.h

Source file repositories/reference/linux-study-clean/include/trace/events/bridge.h

File Facts

System
Linux kernel
Corpus path
include/trace/events/bridge.h
Extension
.h
Size
4698 bytes
Lines
188
Domain
Repository Root And Misc
Bucket
include
Inferred role
Repository Root And Misc: implementation source
Status
source implementation candidate

Why This File Exists

Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.

Dependency Surface

Detected Declarations

Annotated Snippet

if (!group->proto) {
			__entry->af = 0;

			memset(__entry->src, 0, sizeof(__entry->src));
			memset(__entry->grp, 0, sizeof(__entry->grp));
			memcpy(__entry->grpmac, group->dst.mac_addr, ETH_ALEN);
		} else if (group->proto == htons(ETH_P_IP)) {
			__entry->af = AF_INET;

			in6 = (struct in6_addr *)__entry->src;
			ipv6_addr_set_v4mapped(group->src.ip4, in6);

			in6 = (struct in6_addr *)__entry->grp;
			ipv6_addr_set_v4mapped(group->dst.ip4, in6);

			memset(__entry->grpmac, 0, ETH_ALEN);

#if IS_ENABLED(CONFIG_IPV6)
		} else {
			__entry->af = AF_INET6;

			in6 = (struct in6_addr *)__entry->src;
			*in6 = group->src.ip6;

			in6 = (struct in6_addr *)__entry->grp;
			*in6 = group->dst.ip6;

			memset(__entry->grpmac, 0, ETH_ALEN);
#endif
		}
	),

	TP_printk("dev %s af %u src %pI6c grp %pI6c/%pM vid %u",
		  __get_str(dev), __entry->af, __entry->src, __entry->grp,
		  __entry->grpmac, __entry->vid)
);

#endif /* _TRACE_BRIDGE_H */

/* This part must be outside protection */
#include <trace/define_trace.h>

Annotation

Implementation Notes