It looks like wtap did not build, missing a header file.
On a side note, this project also is missing a man page.
On a sider note, this is almost exactly the same project I am working on here. Darn.
https://github.com/khanzf/i3e_driver
Differential D50264
wtap build error - missing header file farhan_farhan.codes on May 9 2025, 3:51 AM. Authored by Tags Referenced Files
Details It looks like wtap did not build, missing a header file. On a side note, this project also is missing a man page. On a sider note, this is almost exactly the same project I am working on here. Darn. Try building without my modification: make -C /usr/src/sys/modules/wtap Then apply my patch and build and load
Diff Detail
Event Timeline
Comment Actions I'm not sure why this was never connected to the build, I would have fixed it during my IfAPI work if it were connected then. You can use the script tools/ifnet/convert_ifapi.sh to assist in converting the driver to IfAPI.
Comment Actions Did you attach something in your comment? Hi, I ran that script and it seemed to modify the make_dev line, specifically regarding the interface name. I updated it as follows, which is in the spirit of what the script produces: avp->av_dev = make_dev(&wtap_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "%s", (const char *)vap->iv_ifp->if_xname); Regarding not including if_private.h directly, not including it results in missing structs. Also, other code imports it directly. If there is another way, what exact patterns of includes are you suggesting? Comment Actions I guess this is what we want: diff --git a/sys/dev/wtap/if_wtap.c b/sys/dev/wtap/if_wtap.c index 3aa3831e72c2..2b098bcc3dda 100644 --- a/sys/dev/wtap/if_wtap.c +++ b/sys/dev/wtap/if_wtap.c @@ -33,7 +33,7 @@ */ #include "if_wtapvar.h" #include <sys/uio.h> /* uio struct */ -#include <sys/jail.h> +#include <net/if.h> #include <net/if_var.h> #include <net/vnet.h> @@ -395,7 +395,7 @@ wtap_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], ieee80211_vap_attach(vap, ieee80211_media_change, ieee80211_media_status, mac); avp->av_dev = make_dev(&wtap_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, - "%s", (const char *)vap->iv_ifp->if_xname); + "%s", if_name(vap->iv_ifp)); avp->av_dev->si_drv1 = sc; callout_init(&avp->av_swba, 0); |