> For the complete documentation index, see [llms.txt](https://connector.interledger4j.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://connector.interledger4j.dev/concepts/packet-switching-fabric.md).

# Packet Switching Fabric

## Overall Design

This implementation relies upon a packet-switching fabric that applies business logic to each packet in order to ensure that packets meet various preconditions and can be properly routed. At a high level, this fabric looks like this:

![Packets enter the switching fabric on an inbound link, are processed, and then forwarded out on an outbound link. Responses traverse the fabric in the opposite direction.](/files/-Llbm2gG_Cf-SCZA44lC)

### Packet Filters

A packet filter applies business logic to a particular ILPv4 Prepare packet. The contract allows the filter to modify an in-flight packet, forward it onward to the next filter, or reject the packet outright. Read more about the contract [here](https://github.com/sappenin/java-ilpv4-connector/blob/aa84b650426817d9db322f9d0889ab80505f3c90/ilpv4-connector-service-api/src/main/java/com/sappenin/interledger/ilpv4/connector/packetswitch/filters/PacketSwitchFilter.java).&#x20;

### Packet Filter Chain

Packet filters are assembled together into a filter chain that is applied to every incoming packet. This implementation has a filter chain that looks like this:

![Each incoming ILPv4 packet is "filtered" according to the business logic of each Packet Filter.](/files/-LlbnPzjU7MCKAoTFNc9)

### Link Filters

A Link Filter is similar to a Packet Filter in that it applies business logic to a particular ILPv4 Prepare packet. However, these filters are only engaged before sending packets into an Outbound Link.

Like Packet Filters, the contract allows the filter to modify an in-flight packet, forward it onward, or reject the packet outright without sending it into the Outbound link. Read more about the contract [here](https://github.com/sappenin/java-ilpv4-connector/blob/aa84b650426817d9db322f9d0889ab80505f3c90/ilpv4-connector-service-api/src/main/java/com/sappenin/interledger/ilpv4/connector/links/filters/LinkFilter.java).&#x20;

### Link Filter Chain

Link filters are assembled together into a filter chain that is applied to every outgoing packet. This implementation has a filter chain that looks like this:

![Each outgoing ILPv4 packet is "filtered" according to the business logic of each Link Filter.](/files/-LlboM4uzV8_dXsIs-kh)
