⬢ DragonFlyBSD Kernel Audit
DF-3427 / wna_shim.h
← back to finding ↓ download raw
/* DF-3426 rig shim: provide a pointer-sized WNA slot for struct ifnet.
 *
 * This DragonFly tree's struct ifnet has no pointer-sized spare member
 * (only int if_unused2/if_unused4), which is why the stock netmap KLD
 * does not compile ('struct ifnet' has no member named 'if_unused7',
 * netmap_kern.h:747).  The rig keeps a small side table keyed by ifp.
 * This is pure infrastructure for storing NA(ifp) -- it does NOT alter
 * any of the TX-pool lifetime logic under audit.
 */
#ifndef DF3426_WNA_SHIM_H
#define DF3426_WNA_SHIM_H

struct ifnet;
struct netmap_adapter;

struct netmap_adapter **netmap_wna_slot(struct ifnet *ifp);

#define WNA(_ifp)	(*netmap_wna_slot(_ifp))

#endif /* DF3426_WNA_SHIM_H */