fuchsia.net.matchers

A collection of fundamental matchers for network objects.

Added: HEAD

STRUCTS

Address

Defined in fuchsia.net.matchers/matchers.fidl

A matcher for IP addresses.

FieldTypeDescriptionDefault
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

FieldTypeDescriptionDefault
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

FieldTypeDescriptionDefault
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

FieldTypeDescriptionDefault
mask uint32

Mask to apply before comparing to the range in between.

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.

FieldTypeDescriptionDefault
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.

FieldTypeDescriptionDefault
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.

OrdinalFieldTypeDescription

Icmpv6Packet

Defined in fuchsia.net.matchers/matchers.fidl

A matcher for ICMPv6 packets.

OrdinalFieldTypeDescription

TcpPacket

Defined in fuchsia.net.matchers/matchers.fidl

A matcher for TCP packets.

OrdinalFieldTypeDescription
src_port Port

Matcher for the TCP source port.

dst_port Port

Matcher for the TCP destination port.

UdpPacket

Defined in fuchsia.net.matchers/matchers.fidl

A matcher for UDP packets.

OrdinalFieldTypeDescription
src_port Port

Matcher for the UDP source port.

dst_port Port

Matcher for the UDP destination port.

UNIONS

AddressMatcherType flexible

Defined in fuchsia.net.matchers/matchers.fidl

OrdinalVariantTypeDescription
subnet fuchsia.net/Subnet

The subnet that must contain the IP address in the packet header in order for it to match.

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 start must <= end. (Comparisons are performed on the numerical big-endian representation of the IP address.)

BoundInterface flexible

Defined in fuchsia.net.matchers/matchers.fidl

A matcher for network interfaces where it might be unbound (BindToDevice has not been called).

OrdinalVariantTypeDescription
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.

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.

OrdinalVariantTypeDescription
id fuchsia.net/InterfaceId

The ID of the interface as assigned by the netstack.

name fuchsia.net.interfaces/Name

The name of the interface.

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.

OrdinalVariantTypeDescription
unmarked Unmarked

This mark domain does not have a mark.

marked Marked

PacketTransportProtocol flexible

Defined in fuchsia.net.matchers/matchers.fidl

A matcher for transport-layer information in packets.

OrdinalVariantTypeDescription
tcp TcpPacket
udp UdpPacket
icmp IcmpPacket
icmpv6 Icmpv6Packet

SocketTransportProtocol flexible

Defined in fuchsia.net.matchers/matchers.fidl

A matcher for transport-layer fields of a socket.

OrdinalVariantTypeDescription
tcp TcpSocket

Matches against TCP fields.

udp UdpSocket

Matches against UDP fields.

TcpSocket flexible

Defined in fuchsia.net.matchers/matchers.fidl

A matcher for TCP sockets.

OrdinalVariantTypeDescription
empty Empty

Only matches against the transport protocol and nothing else.

src_port Port

Match against the source port of TCP sockets.

dst_port Port

Match against the destination port of TCP sockets.

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.

OrdinalVariantTypeDescription
empty Empty

Only matches against the transport protocol and nothing else.

src_port Port

Match against the source port of UDP sockets.

dst_port Port

Match against the destination port of UDP sockets.

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

NameValueDescription
1
2
4
8
16
32
64
128
256
512
1024

UdpState strict

Type: uint32

Defined in fuchsia.net.matchers/matchers.fidl

NameValueDescription
1

The UDP socket is bound but not connected.

2

The UDP socket is explicitly connected.