<br />

A collection of fundamental matchers for network objects.
Added: HEAD

## **STRUCTS**

### Address

*Defined in [fuchsia.net.matchers/matchers.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.matchers/matchers.fidl;l=37)*

A matcher for IP addresses.

<br />

| Field | Type | Description | Default |
|---|---|---|---|
| `matcher` | `https://fuchsia.dev/reference/fidl/fuchsia.net.matchers#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](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.matchers/matchers.fidl;l=48)*

| Field | Type | Description | Default |
|---|---|---|---|
| `start` | `https://fuchsia.dev/reference/fuchsia.net//https://fuchsia.dev/reference/fuchsia.net#IpAddress` | The inclusive start of the address range. | No default |
| `end` | `https://fuchsia.dev/reference/fuchsia.net//https://fuchsia.dev/reference/fuchsia.net#IpAddress` | The inclusive end of the address range. | No default |

### Between

*Defined in [fuchsia.net.matchers/matchers.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.matchers/matchers.fidl;l=120)*

| 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](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.matchers/matchers.fidl;l=151)*

An empty type for use in unions.

<br />

\<EMPTY\>

### MarkInDomain

*Defined in [fuchsia.net.matchers/matchers.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.matchers/matchers.fidl;l=135)*

Matches the mark in a specific domain.

<br />

| Field | Type | Description | Default |
|---|---|---|---|
| `domain` | `https://fuchsia.dev/reference/fuchsia.net//https://fuchsia.dev/reference/fuchsia.net#MarkDomain` | The mark's domain. | No default |
| `mark` | `https://fuchsia.dev/reference/fidl/fuchsia.net.matchers#Mark` | The mark matcher to apply to the mark in the specified domain. | No default |

### Marked

*Defined in [fuchsia.net.matchers/matchers.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.matchers/matchers.fidl;l=116)*

| Field | Type | Description | Default |
|---|---|---|---|
| `mask` | `uint32` | Mask to apply before comparing to the range in `between`. | No default |
| `between` | `https://fuchsia.dev/reference/fidl/fuchsia.net.matchers#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](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.matchers/matchers.fidl;l=64)*

A matcher for transport-layer port numbers.

`start` must \<= `end`.

<br />

| 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](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.matchers/matchers.fidl;l=143)*

A matcher for a socket's cookie.

<br />

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

### Unmarked

*Defined in [fuchsia.net.matchers/matchers.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.matchers/matchers.fidl;l=115)*

\<EMPTY\>

## **TABLES**

### IcmpPacket

*Defined in [fuchsia.net.matchers/matchers.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.matchers/matchers.fidl;l=99)*

A matcher for ICMPv4 packets.

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|

### Icmpv6Packet

*Defined in [fuchsia.net.matchers/matchers.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.matchers/matchers.fidl;l=102)*

A matcher for ICMPv6 packets.

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|

### TcpPacket

*Defined in [fuchsia.net.matchers/matchers.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.matchers/matchers.fidl;l=83)*

A matcher for TCP packets.

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `src_port` | `https://fuchsia.dev/reference/fidl/fuchsia.net.matchers#Port` | Matcher for the TCP source port. |
| ### 2 | `dst_port` | `https://fuchsia.dev/reference/fidl/fuchsia.net.matchers#Port` | Matcher for the TCP destination port. |

### UdpPacket

*Defined in [fuchsia.net.matchers/matchers.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.matchers/matchers.fidl;l=91)*

A matcher for UDP packets.

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `src_port` | `https://fuchsia.dev/reference/fidl/fuchsia.net.matchers#Port` | Matcher for the UDP source port. |
| ### 2 | `dst_port` | `https://fuchsia.dev/reference/fidl/fuchsia.net.matchers#Port` | Matcher for the UDP destination port. |

## **UNIONS**

### AddressMatcherType [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.net.matchers/matchers.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.matchers/matchers.fidl;l=38)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `subnet` | `https://fuchsia.dev/reference/fuchsia.net//https://fuchsia.dev/reference/fuchsia.net#Subnet` | The subnet that must contain the IP address in the packet header in order for it to match. |
| ### 2 | `range` | `https://fuchsia.dev/reference/fidl/fuchsia.net.matchers#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.) |

<br />

### BoundAddress [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.net.matchers/matchers.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.matchers/matchers.fidl;l=154)*

A matcher for IP addresses that might be unbound.

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `bound` | `https://fuchsia.dev/reference/fidl/fuchsia.net.matchers#Address` | Matches iff the address is bound to a matching address (see [Address](https://fuchsia.dev/reference/fidl/fuchsia.net.matchers#Address) for matching criteria. |
| ### 2 | `unbound` | `https://fuchsia.dev/reference/fidl/fuchsia.net.matchers#Empty` | Matches iff the address is unbound. |

<br />

### BoundInterface [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.net.matchers/matchers.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.matchers/matchers.fidl;l=28)*

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

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `bound` | `https://fuchsia.dev/reference/fidl/fuchsia.net.matchers#Interface` | Matches iff the socket is bound to a matching interface (see [Interface](https://fuchsia.dev/reference/fidl/fuchsia.net.matchers#Interface) for matching criteria). |
| ### 2 | `unbound` | `https://fuchsia.dev/reference/fidl/fuchsia.net.matchers#Empty` | Matches iff the outgoing traffic is not bound to a device. |

<br />

### BoundPort [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.net.matchers/matchers.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.matchers/matchers.fidl;l=74)*

A matcher for transport-layer port numbers that might be unbound.

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `bound` | `https://fuchsia.dev/reference/fidl/fuchsia.net.matchers#Port` | Matches iff the port is bound and matches (see [Port](https://fuchsia.dev/reference/fidl/fuchsia.net.matchers#Port) for matching criteria). |
| ### 2 | `unbound` | `https://fuchsia.dev/reference/fidl/fuchsia.net.matchers#Empty` | Matches iff the port is unbound. |

<br />

### Interface [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.net.matchers/matchers.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.matchers/matchers.fidl;l=13)*

A matcher for network interfaces.

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `id` | `https://fuchsia.dev/reference/fuchsia.net//https://fuchsia.dev/reference/fuchsia.net#InterfaceId` | The ID of the interface as assigned by the netstack. |
| ### 2 | `name` | `https://fuchsia.dev/reference/fuchsia.net.interfaces//https://fuchsia.dev/reference/fuchsia.net.interfaces#Name` | The name of the interface. |
| ### 3 | `port_class` | `https://fuchsia.dev/reference/fuchsia.net.interfaces//https://fuchsia.dev/reference/fuchsia.net.interfaces#PortClass` | The port class of the interface. |

<br />

### Mark [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.net.matchers/matchers.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.matchers/matchers.fidl;l=113)*

Matches the mark value of a packet or socket.

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `unmarked` | `https://fuchsia.dev/reference/fidl/fuchsia.net.matchers#Unmarked` | This mark domain does not have a mark. |
| ### 2 | `marked` | `https://fuchsia.dev/reference/fidl/fuchsia.net.matchers#Marked` |   |

<br />

### PacketTransportProtocol [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.net.matchers/matchers.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.matchers/matchers.fidl;l=105)*

A matcher for transport-layer information in packets.

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `tcp` | `https://fuchsia.dev/reference/fidl/fuchsia.net.matchers#TcpPacket` |   |
| ### 2 | `udp` | `https://fuchsia.dev/reference/fidl/fuchsia.net.matchers#UdpPacket` |   |
| ### 3 | `icmp` | `https://fuchsia.dev/reference/fidl/fuchsia.net.matchers#IcmpPacket` |   |
| ### 4 | `icmpv6` | `https://fuchsia.dev/reference/fidl/fuchsia.net.matchers#Icmpv6Packet` |   |

<br />

### SocketTransportProtocol [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.net.matchers/matchers.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.matchers/matchers.fidl;l=211)*

A matcher for transport-layer fields of a socket.

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `tcp` | `https://fuchsia.dev/reference/fidl/fuchsia.net.matchers#TcpSocket` | Matches against TCP fields. |
| ### 2 | `udp` | `https://fuchsia.dev/reference/fidl/fuchsia.net.matchers#UdpSocket` | Matches against UDP fields. |

<br />

### TcpSocket [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.net.matchers/matchers.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.matchers/matchers.fidl;l=163)*

A matcher for TCP sockets.

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `empty` | `https://fuchsia.dev/reference/fidl/fuchsia.net.matchers#Empty` | Only matches against the transport protocol and nothing else. |
| ### 2 | `src_port` | `https://fuchsia.dev/reference/fidl/fuchsia.net.matchers#BoundPort` | Match against the source port of TCP sockets. |
| ### 3 | `dst_port` | `https://fuchsia.dev/reference/fidl/fuchsia.net.matchers#BoundPort` | Match against the destination port of TCP sockets. |
| ### 4 | `states` | `https://fuchsia.dev/reference/fidl/fuchsia.net.matchers#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. |

<br />

### UdpSocket [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.net.matchers/matchers.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.matchers/matchers.fidl;l=191)*

A matcher for UDP sockets.

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `empty` | `https://fuchsia.dev/reference/fidl/fuchsia.net.matchers#Empty` | Only matches against the transport protocol and nothing else. |
| ### 2 | `src_port` | `https://fuchsia.dev/reference/fidl/fuchsia.net.matchers#BoundPort` | Match against the source port of UDP sockets. |
| ### 3 | `dst_port` | `https://fuchsia.dev/reference/fidl/fuchsia.net.matchers#BoundPort` | Match against the destination port of UDP sockets. |
| ### 4 | `states` | `https://fuchsia.dev/reference/fidl/fuchsia.net.matchers#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. |

<br />

## **BITS**

### TcpState [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

Type: `uint32`

*Defined in [fuchsia.net.matchers/matchers.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.matchers/matchers.fidl;l=175)*

| 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](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

Type: `uint32`

*Defined in [fuchsia.net.matchers/matchers.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.net.matchers/matchers.fidl;l=202)*

| Name | Value | Description |
|---|---|---|
| ### BOUND | 1 | The UDP socket is bound but not connected. |
| ### CONNECTED | 2 | The UDP socket is explicitly connected. |