-
Notifications
You must be signed in to change notification settings - Fork 8.4k
doc: net: Enhance network packet filtering documentation #100724
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| Currently, two such rule lists exist: ``npf_send_rules`` for outgoing packets, | ||
| and ``npf_recv_rules`` for incoming packets. | ||
|
|
||
| There are different set of rules for different layers in the network stack. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| There are different set of rules for different layers in the network stack. | |
| There are different sets of rules for different layers in the network stack. |
| :c:macro:`NPF_RULE()` and :c:macro:`NPF_PRIORITY()` to create a rule instance | ||
| with an immediate outcome or a priority change. | ||
|
|
||
| See also :zephyr:code-sample:`net-pkt-filter` sample for an example how to create and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| See also :zephyr:code-sample:`net-pkt-filter` sample for an example how to create and | |
| See also :zephyr:code-sample:`net-pkt-filter` sample for an example of how to create and |
Add more information to network packet filter documentation to make it more useful to end users. Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
a1f9b81 to
ff7c01f
Compare
|
|
|
This adds much-needed information. Can we also add to one or more examples a call to create/add an L3 or L4 rule? Currently the examples only contain L2 rules. |
I added a link to the pkt_filter sample which contains examples of L3 rules and handling. The problem with inline examples is that they bit rot easily because they are not compile tested. The sample should stay up to date if things around in net stack changes. Would the code examples in the sample be enough for the end user, WDYT? |
Does it? It only calls I think we need to show that the other rule lists exists, and how to use them. And perhaps especially how to use them in combination, which is what I'm struggling with right now. (Such as: "Allow IPv6 from address X::1 and IPv4 from interface Y, but drop everything else.") |
I will check and add something related to this then. But as a general note, would you as a end user be ok with this (pointing to the sample) or would you prefer to see examples in inline documentation? |
|
Samples are generally good enough for me as end-user. |



Add more information to network packet filter documentation to make it more useful to end users.
Fixes #100464