Page MenuHomeFreeBSD

wtapctl(8): Introduce new tool for wtap(4)
AcceptedPublic

Authored by enweiwu on Jan 7 2023, 8:37 AM.
Referenced Files
Unknown Object (File)
Sep 24 2024, 8:31 PM
Unknown Object (File)
Sep 24 2024, 6:26 PM
Unknown Object (File)
Sep 22 2024, 12:13 AM
Unknown Object (File)
Sep 19 2024, 2:07 PM
Unknown Object (File)
Sep 7 2024, 11:15 PM
Unknown Object (File)
Sep 1 2024, 1:19 AM
Unknown Object (File)
Sep 1 2024, 1:19 AM
Unknown Object (File)
Sep 1 2024, 1:19 AM

Details

Summary

Below is the planned commit message:

Wtap(4) originally worked with two user-space scripts: device creation/deletion with
src/tools/tools/wtap/wtap.c, and visibility control with src/tools/tools/wtap/vis_map.c.
Since the two tools are necessary for wtap(4), it's not reasonable to locate them in
src/tools.

Wtapctl(8) not only combines the two scripts but also adds some convenient features,
Some of these features needs the modification of wtap(4) and the others are done by
adding some of the ioctl(2) command in wtap(4).
- Device creation without id (automate the device creation in wtap(4))
- Device list
- Show the link in the visibility plugin

Also, wtap(4) can only support 64 nodes (by checking the size of mac_pool in
wtap_hal/hal.c and the #define MAX_NBR_WTAP (64)), but the size for
struct vis_map in plugins/visibility.h is unreasonably large (for 1024 nodes).
I fixed the bug by changing the size and doing some conditional checks in wtap(4).

Signed-off-by: EnWeiWu <enweiwu@FreeBSD.org>

This diff depends on D35841.

Test Plan

See wtapctl.8.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

pauamma_gundo.com added inline comments.
usr.sbin/wtapctl/wtapctl.8
55

No list to close here.

66

Audience check: will most people reading this know what a wtap vap is?

70

No list here either.

99
This revision now requires changes to proceed.Jan 19 2023, 12:07 AM

Remove unnecessary .El and the term "vap" in wtapctl.8.

This revision is now accepted and ready to land.Jan 19 2023, 8:24 PM

@lwhsu I'll just pick the first review given they all live in a window here; last time I checked and asked if they were ready for review I was told to hold off for further changes? Have they been addressed, as in, is the stack of wtap changes ready for review?

In D37973#1003520, @bz wrote:

@lwhsu I'll just pick the first review given they all live in a window here; last time I checked and asked if they were ready for review I was told to hold off for further changes? Have they been addressed, as in, is the stack of wtap changes ready for review?

I guess we might have a misunderstanding (or I may forget something important), the current plan is putting wtapctl(8) to /usr/tests first, along with other net82011 test, and when its interface is stable, move to /usr/sbin. (And I'm finding time to work on this.) The parts other than this path change is good for review.

I added @cc as a reviewer as we're talking about using this for recent sta/hostap mode changes call for testing.