Bug 251833 - relative_offset is not documented in ng_patch man page
Summary: relative_offset is not documented in ng_patch man page
Status: Open
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2020-12-14 09:56 UTC by Nick Hibma
Modified: 2021-10-02 03:54 UTC (History)
4 users (show)

See Also:


Attachments
ng_patch(4) patch (1.20 KB, patch)
2021-10-02 03:53 UTC, Felix Johnson
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Hibma 2020-12-14 09:56:00 UTC
In r309408 (FreeBSD 11-CURRENT) julian added code in /usr/src/sys/netgraph/ng_patch.c to use a 'relative offset': "Changes to allow the patching of packets with an offset (and other changes.. see man page)
".

It is mentioned in the struct in the man page, but there is no explanation of what the relative offset flag does and how it can be set.

	- from PR #206185: "Add setdlt for relative offset (support DLT_EN10MB and DLT_RAW)"

	- changes offset to a relative offset as it pulls up / de-encapsulates ether payloads?

	- relative offset seems to be a boolean (unlike offset for the command which is a byte count).

It would be nice to have this documented.


(julian as well as dmitry (from the PR) have been contacted but no reply)
Comment 1 Felix Johnson 2021-10-02 03:53:30 UTC
Created attachment 228344 [details]
ng_patch(4) patch

Relative offset is used in two ways:
- Enable/disable relative offset feature in ng_patch
- When enabled, recalculate location of field based on operation offset,
  plus the length of data-link specific headers.