Filter Type

Filter Ethernet packets based on EtherType

  • Library:
  • Simulink Real-Time / Ethernet


To filter network buffer packets by their EtherType values, use the Filter Type block. See Filter Type and Filter Address Blocks for cautions on setting the parameters for this block.



expand all

The parameter is a reference to the network buffer.


expand all

One port receives packets with EtherType values within 1–1500.


To activate this port, select parameter Match Length (1-1500).

If you specify one Ethertype, one port appears with the name Match. The block directs packets with this EtherType to port Match.

If you specify more than one EtherType, multiple ports appear, matched to the values in parameter EtherType. The block directs packets with the first EtherType to Match Type (1), with the second EtherType to Match Type (2), and so on.


The port count depends on how many EtherTypes appear in parameter EtherType.

Packets that do not meet the filter criteria appear at this port.


To activate this port, clear Drop non-matches.


expand all

To match packets whose EtherType values fall within the range 1–1500, select this check box.

Programmatic Use

Block Parameter: EtherLength

Enter a vector of EtherTypes on which you want to filter.

Programmatic Use

Block Parameter: EtherType

To discard packets that do not match the filter criteria, select this parameter.

To output packets that do not match the filter criteria, clear this parameter.

Programmatic Use

Block Parameter: Drop

Introduced in R2008b