A collection of fundamental matchers for network objects.
STRUCTS
Address
Defined in fuchsia.net.matchers/matchers.fidl
A matcher for IP addresses.
Field | Type | Description | Default |
---|---|---|---|
matcher |
AddressMatcherType
|
No default | |
invert |
bool
|
Whether to check for an "inverse" or "negative" match (in which case, if the matcher criteria do not apply, it is considered a match, and vice versa). |
No default |
AddressRange
Defined in fuchsia.net.matchers/matchers.fidl
Field | Type | Description | Default |
---|---|---|---|
start |
fuchsia.net/IpAddress
|
The inclusive start of the address range. |
No default |
end |
fuchsia.net/IpAddress
|
The inclusive end of the address range. |
No default |
Between
Defined in fuchsia.net.matchers/matchers.fidl
Field | Type | Description | Default |
---|---|---|---|
start |
uint32
|
Start of the range, inclusive. |
No default |
end |
uint32
|
End of the range, inclusive. |
No default |
Empty
Defined in fuchsia.net.matchers/matchers.fidl
An empty type for use in unions.
<EMPTY>
Marked
Defined in fuchsia.net.matchers/matchers.fidl
Field | Type | Description | Default |
---|---|---|---|
mask |
uint32
|
Mask to apply before comparing to the range in |
No default |
between |
Between
|
The mark is between the given range. |
No default |
invert |
bool
|
Whether to check for an "inverse" or "negative" match. The mask is applied as normal, but the value is checked for inequality. |
No default |
Port
Defined in fuchsia.net.matchers/matchers.fidl
A matcher for transport-layer port numbers.
start
must <= end
.
Field | Type | Description | Default |
---|---|---|---|
start |
uint16
|
The inclusive start of the port range. |
No default |
end |
uint16
|
The inclusive end of the port range. |
No default |
invert |
bool
|
Whether to check for an "inverse" or "negative" match. |
No default |
SocketCookie
Defined in fuchsia.net.matchers/matchers.fidl
A matcher for a socket's cookie.
Field | Type | Description | Default |
---|---|---|---|
cookie |
uint64
|
The cookie value to compare for equality. |
No default |
invert |
bool
|
Whether to check for an "inverse" or "negative" match. |
No default |
Unbound
Defined in fuchsia.net.matchers/matchers.fidl
<EMPTY>
Unmarked
Defined in fuchsia.net.matchers/matchers.fidl
<EMPTY>
TABLES
IcmpPacket
Defined in fuchsia.net.matchers/matchers.fidl
A matcher for ICMPv4 packets.
Ordinal | Field | Type | Description |
---|
Icmpv6Packet
Defined in fuchsia.net.matchers/matchers.fidl
A matcher for ICMPv6 packets.
Ordinal | Field | Type | Description |
---|
TcpPacket
Defined in fuchsia.net.matchers/matchers.fidl
A matcher for TCP packets.
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
src_port |
Port
|
Matcher for the TCP source port. |
2 |
dst_port |
Port
|
Matcher for the TCP destination port. |
UdpPacket
Defined in fuchsia.net.matchers/matchers.fidl
A matcher for UDP packets.
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
src_port |
Port
|
Matcher for the UDP source port. |
2 |
dst_port |
Port
|
Matcher for the UDP destination port. |
UNIONS
AddressMatcherType flexible
Defined in fuchsia.net.matchers/matchers.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
subnet |
fuchsia.net/Subnet
|
The subnet that must contain the IP address in the packet header in order for it to match. |
2 |
range |
AddressRange
|
The range of addresses that must include the IP address in the packet header in order for it to match. The endpoints of the range must be in the same address family, and
|
BoundInterface flexible
Defined in fuchsia.net.matchers/matchers.fidl
A matcher for network interfaces where it might be unbound (BindToDevice
has not been called).
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
device_name |
fuchsia.net.interfaces/Name
|
Matches the device iff the names match. The name is not a pattern or regex, it needs to be an exact match for the rule to be chosen. |
2 |
unbound |
Unbound
|
Matches iff the outgoing traffic is not bound to a device. |
Interface flexible
Defined in fuchsia.net.matchers/matchers.fidl
A matcher for network interfaces.
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
id |
fuchsia.net/InterfaceId
|
The ID of the interface as assigned by the netstack. |
2 |
name |
fuchsia.net.interfaces/Name
|
The name of the interface. |
3 |
port_class |
fuchsia.net.interfaces/PortClass
|
The port class of the interface. |
Mark flexible
Defined in fuchsia.net.matchers/matchers.fidl
Matches the mark value of a packet or socket.
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
unmarked |
Unmarked
|
This mark domain does not have a mark. |
2 |
marked |
Marked
|
PacketTransportProtocol flexible
Defined in fuchsia.net.matchers/matchers.fidl
A matcher for transport-layer information in packets.
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
tcp |
TcpPacket
|
|
2 |
udp |
UdpPacket
|
|
3 |
icmp |
IcmpPacket
|
|
4 |
icmpv6 |
Icmpv6Packet
|
SocketTransportProtocol flexible
Defined in fuchsia.net.matchers/matchers.fidl
A matcher for transport-layer fields of a socket.
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
tcp |
TcpSocket
|
Matches against TCP fields. |
2 |
udp |
UdpSocket
|
Matches against UDP fields. |
TcpSocket flexible
Defined in fuchsia.net.matchers/matchers.fidl
A matcher for TCP sockets.
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
empty |
Empty
|
Only matches against the transport protocol and nothing else. |
2 |
src_port |
Port
|
Match against the source port of TCP sockets. |
3 |
dst_port |
Port
|
Match against the destination port of TCP sockets. |
4 |
states |
TcpState
|
The TCP socket's state must be contained in the set of states. If unset, matches all states, just as if it was fully set. The constants are structured to correspond to the enum values of fuchsia.net.tcp.States. |
UdpSocket flexible
Defined in fuchsia.net.matchers/matchers.fidl
A matcher for UDP sockets.
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
empty |
Empty
|
Only matches against the transport protocol and nothing else. |
2 |
src_port |
Port
|
Match against the source port of UDP sockets. |
3 |
dst_port |
Port
|
Match against the destination port of UDP sockets. |
4 |
states |
UdpState
|
The UDP socket's state must be contained in the set of states. If unset, matches all states, just as if it was fully set. |
BITS
TcpState strict
Type: uint32
Defined in fuchsia.net.matchers/matchers.fidl
Name | Value | Description |
---|---|---|
ESTABLISHED |
1 | |
SYN_SENT |
2 | |
SYN_RECV |
4 | |
FIN_WAIT1 |
8 | |
FIN_WAIT2 |
16 | |
TIME_WAIT |
32 | |
CLOSE |
64 | |
CLOSE_WAIT |
128 | |
LAST_ACK |
256 | |
LISTEN |
512 | |
CLOSING |
1024 |
UdpState strict
Type: uint32
Defined in fuchsia.net.matchers/matchers.fidl
Name | Value | Description |
---|---|---|
BOUND |
1 | The UDP socket is bound but not connected. |
CONNECTED |
2 | The UDP socket is explicitly connected. |