diff options
author | Justin Hibbits <jhibbits@FreeBSD.org> | 2023-01-13 16:30:58 +0000 |
---|---|---|
committer | Justin Hibbits <jhibbits@FreeBSD.org> | 2023-01-24 20:03:35 +0000 |
commit | 053a24d12cc7bc4fee4340f2e2b11f8d167909ed (patch) | |
tree | 8cacbcf4d0cc760b764a4718977200a5d1fbb8d7 /sys/net/if.c | |
parent | 2c2b37ad251d25fb81d6254e29130684fed774ab (diff) | |
download | src-053a24d12cc7bc4fee4340f2e2b11f8d167909ed.tar.gz src-053a24d12cc7bc4fee4340f2e2b11f8d167909ed.zip |
debugnet: Add ifnet accessor to set debugnet methods
As part of the effort to hide the internals of the ifnet struct, convert
the DEBUGNET_SET() macro to use an accessor instead of directly touching
the methods member.
Reviewed by: glebius (older version)
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D38105
Diffstat (limited to 'sys/net/if.c')
-rw-r--r-- | sys/net/if.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index a18e4f1d8f56..ff505e1a1fe8 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -4803,6 +4803,12 @@ if_setgetcounterfn(if_t ifp, if_get_counter_t fn) ifp->if_get_counter = fn; } +void +if_setdebugnet_methods(if_t ifp, struct debugnet_methods *m) +{ + ifp->if_debugnet_methods = m; +} + #ifdef DDB static void if_show_ifnet(struct ifnet *ifp) |