include/trace/events/neigh.h
Source file repositories/reference/linux-study-clean/include/trace/events/neigh.h
File Facts
- System
- Linux kernel
- Corpus path
include/trace/events/neigh.h- Extension
.h- Size
- 7021 bytes
- Lines
- 256
- 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.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/skbuff.hlinux/netdevice.hlinux/tracepoint.hnet/neighbour.htrace/define_trace.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
if (tbl->family == AF_INET6) {
struct in6_addr *pin6;
pin6 = (struct in6_addr *)__entry->primary_key6;
*pin6 = *(struct in6_addr *)pkey;
}
#endif
),
TP_printk("family %d dev %s entries %d primary_key4 %pI4 primary_key6 %pI6c created %d gc_exempt %d",
__entry->family, __get_str(dev), __entry->entries,
__entry->primary_key4, __entry->primary_key6,
__entry->created, __entry->gc_exempt)
);
TRACE_EVENT(neigh_update,
TP_PROTO(struct neighbour *n, const u8 *lladdr, u8 new,
u32 flags, u32 nlmsg_pid),
TP_ARGS(n, lladdr, new, flags, nlmsg_pid),
TP_STRUCT__entry(
__field(u32, family)
__string(dev, (n->dev ? n->dev->name : "NULL"))
__array(u8, lladdr, MAX_ADDR_LEN)
__field(u8, lladdr_len)
__field(u8, flags)
__field(u8, nud_state)
__field(u8, type)
__field(u8, dead)
__field(int, refcnt)
__array(__u8, primary_key4, 4)
__array(__u8, primary_key6, 16)
__field(unsigned long, confirmed)
__field(unsigned long, updated)
__field(unsigned long, used)
__array(u8, new_lladdr, MAX_ADDR_LEN)
__field(u8, new_state)
__field(u32, update_flags)
__field(u32, pid)
),
TP_fast_assign(
int lladdr_len = (n->dev ? n->dev->addr_len : MAX_ADDR_LEN);
struct in6_addr *pin6;
__be32 *p32;
__entry->family = n->tbl->family;
__assign_str(dev);
__entry->lladdr_len = lladdr_len;
memcpy(__entry->lladdr, n->ha, lladdr_len);
__entry->flags = n->flags;
__entry->nud_state = n->nud_state;
__entry->type = n->type;
__entry->dead = n->dead;
__entry->refcnt = refcount_read(&n->refcnt);
pin6 = (struct in6_addr *)__entry->primary_key6;
p32 = (__be32 *)__entry->primary_key4;
if (n->tbl->family == AF_INET)
*p32 = *(__be32 *)n->primary_key;
else
*p32 = 0;
#if IS_ENABLED(CONFIG_IPV6)
if (n->tbl->family == AF_INET6) {
pin6 = (struct in6_addr *)__entry->primary_key6;
*pin6 = *(struct in6_addr *)n->primary_key;
} else
#endif
{
ipv6_addr_set_v4mapped(*p32, pin6);
}
__entry->confirmed = n->confirmed;
__entry->updated = n->updated;
__entry->used = n->used;
if (lladdr)
memcpy(__entry->new_lladdr, lladdr, lladdr_len);
__entry->new_state = new;
__entry->update_flags = flags;
__entry->pid = nlmsg_pid;
),
TP_printk("family %d dev %s lladdr %s flags %02x nud_state %s type %02x "
"dead %d refcnt %d primary_key4 %pI4 primary_key6 %pI6c "
"confirmed %lu updated %lu used %lu new_lladdr %s "
"new_state %s update_flags %02x pid %d",
__entry->family, __get_str(dev),
__print_hex_str(__entry->lladdr, __entry->lladdr_len),
Annotation
- Immediate include surface: `linux/skbuff.h`, `linux/netdevice.h`, `linux/tracepoint.h`, `net/neighbour.h`, `trace/define_trace.h`.
- Atlas domain: Repository Root And Misc / include.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.