git: 74abe47e3271 - main - ifnet/DrvAPI: Implement if_setoutputfn() accessor

From: Justin Hibbits <jhibbits_at_FreeBSD.org>
Date: Wed, 04 Jan 2023 20:11:23 UTC
The branch main has been updated by jhibbits:

URL: https://cgit.FreeBSD.org/src/commit/?id=74abe47e3271594b8c6b60c9070806bf6ef8641c

commit 74abe47e3271594b8c6b60c9070806bf6ef8641c
Author:     Justin Hibbits <jhibbits@FreeBSD.org>
AuthorDate: 2022-12-21 21:42:42 +0000
Commit:     Justin Hibbits <jhibbits@FreeBSD.org>
CommitDate: 2023-01-04 20:15:10 +0000

    ifnet/DrvAPI: Implement if_setoutputfn() accessor
    
    Fixes:          eb1da3e5258238e1c0555c6a006a341df0821d8e
    Sponsored by:   Juniper Networks, Inc.
---
 sys/net/if.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/sys/net/if.c b/sys/net/if.c
index 2e2fbdd1d8c3..3b2256bd94ff 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -4764,6 +4764,12 @@ if_setioctlfn(if_t ifp, if_ioctl_fn_t ioctl_fn)
 	((struct ifnet *)ifp)->if_ioctl = (void *)ioctl_fn;
 }
 
+void
+if_setoutputfn(if_t ifp, if_output_fn_t output_fn)
+{
+	((struct ifnet *)ifp)->if_output = output_fn;
+}
+
 void
 if_setstartfn(if_t ifp, if_start_fn_t start_fn)
 {