|
Zephyr Project API 4.2.1
A Scalable Open Source RTOS
|
Macros | |
| #define | NPF_ETH_SRC_ADDR_MATCH(_name, _addr_array) |
| Statically define a "source address match" packet filter condition. | |
| #define | NPF_ETH_SRC_ADDR_UNMATCH(_name, _addr_array) |
| Statically define a "source address unmatch" packet filter condition. | |
| #define | NPF_ETH_DST_ADDR_MATCH(_name, _addr_array) |
| Statically define a "destination address match" packet filter condition. | |
| #define | NPF_ETH_DST_ADDR_UNMATCH(_name, _addr_array) |
| Statically define a "destination address unmatch" packet filter condition. | |
| #define | NPF_ETH_SRC_ADDR_MASK_MATCH(_name, _addr_array, ...) |
| Statically define a "source address match with mask" packet filter condition. | |
| #define | NPF_ETH_DST_ADDR_MASK_MATCH(_name, _addr_array, ...) |
| Statically define a "destination address match with mask" packet filter condition. | |
| #define | NPF_ETH_TYPE_MATCH(_name, _type) |
| Statically define an "Ethernet type match" packet filter condition. | |
| #define | NPF_ETH_TYPE_UNMATCH(_name, _type) |
| Statically define an "Ethernet type unmatch" packet filter condition. | |
| #define | NPF_ETH_VLAN_TYPE_MATCH(_name, _type) |
| Statically define an "Ethernet VLAN header type match" packet filter condition. | |
| #define | NPF_ETH_VLAN_TYPE_UNMATCH(_name, _type) |
| Statically define an "Ethernet VLAN header type unmatch" packet filter condition. | |
Typedefs | |
| typedef void(* | npf_rule_cb_t) (struct npf_rule *rule, enum npf_rule_type type, void *user_data) |
| Callback used while iterating over network packet filter rules. | |
Enumerations | |
| enum | npf_rule_type { NPF_RULE_TYPE_UNKNOWN = 0 , NPF_RULE_TYPE_SEND , NPF_RULE_TYPE_RECV , NPF_RULE_TYPE_LOCAL_IN_RECV , NPF_RULE_TYPE_IPV4_RECV , NPF_RULE_TYPE_IPV6_RECV } |
| Type of the packet filter rule. More... | |
Functions | |
| void | npf_rules_foreach (npf_rule_cb_t cb, void *user_data) |
| Go through all the network packet filter rules and call callback for each of them. | |
| #define NPF_ETH_DST_ADDR_MASK_MATCH | ( | _name, | |
| _addr_array, | |||
| ... | |||
| ) |
#include <include/zephyr/net/net_pkt_filter.h>
Statically define a "destination address match with mask" packet filter condition.
This tests if the packet destination address matches any of the Ethernet addresses contained in the provided set after applying specified mask.
| _name | Name of the condition |
| _addr_array | Array of struct net_eth_addr items to test against |
| ... | up to 6 mask bytes |
| #define NPF_ETH_DST_ADDR_MATCH | ( | _name, | |
| _addr_array | |||
| ) |
#include <include/zephyr/net/net_pkt_filter.h>
Statically define a "destination address match" packet filter condition.
This tests if the packet destination address matches any of the Ethernet addresses contained in the provided set.
| _name | Name of the condition |
| _addr_array | Array of struct net_eth_addr items to test against |
| #define NPF_ETH_DST_ADDR_UNMATCH | ( | _name, | |
| _addr_array | |||
| ) |
#include <include/zephyr/net/net_pkt_filter.h>
Statically define a "destination address unmatch" packet filter condition.
This tests if the packet destination address matches none of the Ethernet addresses contained in the provided set.
| _name | Name of the condition |
| _addr_array | Array of struct net_eth_addr items to test against |
| #define NPF_ETH_SRC_ADDR_MASK_MATCH | ( | _name, | |
| _addr_array, | |||
| ... | |||
| ) |
#include <include/zephyr/net/net_pkt_filter.h>
Statically define a "source address match with mask" packet filter condition.
This tests if the packet source address matches any of the Ethernet addresses contained in the provided set after applying specified mask.
| _name | Name of the condition |
| _addr_array | Array of struct net_eth_addr items to test against |
| ... | up to 6 mask bytes |
| #define NPF_ETH_SRC_ADDR_MATCH | ( | _name, | |
| _addr_array | |||
| ) |
#include <include/zephyr/net/net_pkt_filter.h>
Statically define a "source address match" packet filter condition.
This tests if the packet source address matches any of the Ethernet addresses contained in the provided set.
| _name | Name of the condition |
| _addr_array | Array of struct net_eth_addr items to test against |
| #define NPF_ETH_SRC_ADDR_UNMATCH | ( | _name, | |
| _addr_array | |||
| ) |
#include <include/zephyr/net/net_pkt_filter.h>
Statically define a "source address unmatch" packet filter condition.
This tests if the packet source address matches none of the Ethernet addresses contained in the provided set.
| _name | Name of the condition |
| _addr_array | Array of struct net_eth_addr items to test against |
| #define NPF_ETH_TYPE_MATCH | ( | _name, | |
| _type | |||
| ) |
#include <include/zephyr/net/net_pkt_filter.h>
Statically define an "Ethernet type match" packet filter condition.
| _name | Name of the condition |
| _type | Ethernet type to match |
| #define NPF_ETH_TYPE_UNMATCH | ( | _name, | |
| _type | |||
| ) |
#include <include/zephyr/net/net_pkt_filter.h>
Statically define an "Ethernet type unmatch" packet filter condition.
| _name | Name of the condition |
| _type | Ethernet type to exclude |
| #define NPF_ETH_VLAN_TYPE_MATCH | ( | _name, | |
| _type | |||
| ) |
#include <include/zephyr/net/net_pkt_filter.h>
Statically define an "Ethernet VLAN header type match" packet filter condition.
| _name | Name of the condition |
| _type | Ethernet VLAN header type to match |
| #define NPF_ETH_VLAN_TYPE_UNMATCH | ( | _name, | |
| _type | |||
| ) |
#include <include/zephyr/net/net_pkt_filter.h>
Statically define an "Ethernet VLAN header type unmatch" packet filter condition.
| _name | Name of the condition |
| _type | Ethernet VLAN header type to exclude |
| npf_rule_cb_t |
#include <include/zephyr/net/net_pkt_filter.h>
Callback used while iterating over network packet filter rules.
| rule | Pointer to current network packet filter rule |
| type | Type of the rule (rx, tx, local_in, IPv4 or IPv6) |
| user_data | A valid pointer to user data or NULL |
| enum npf_rule_type |
#include <include/zephyr/net/net_pkt_filter.h>
Type of the packet filter rule.
| void npf_rules_foreach | ( | npf_rule_cb_t | cb, |
| void * | user_data | ||
| ) |
#include <include/zephyr/net/net_pkt_filter.h>
Go through all the network packet filter rules and call callback for each of them.
| cb | User-supplied callback function to call |
| user_data | User specified data |