Page MenuHomeFreeBSD

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

Authored by enweiwu on Jan 7 2023, 8:37 AM.
Referenced Files
F72594263: D37973.diff
Sun, Dec 10, 7:45 PM
Unknown Object (File)
Mon, Nov 27, 1:40 PM
Unknown Object (File)
Mon, Nov 27, 1:40 PM
Unknown Object (File)
Mon, Nov 27, 1:40 PM
Unknown Object (File)
Sun, Nov 26, 7:03 PM
Unknown Object (File)
Sun, Nov 26, 5:09 PM
Unknown Object (File)
Wed, Nov 15, 6:31 PM
Unknown Object (File)
Nov 8 2023, 8:54 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
56

No list to close here.

67

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

71

No list here either.

100
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