Skip to content
Tom Barbette edited this page Oct 3, 2018 · 2 revisions

CheckPacket Element Documentation

NAME

CheckPacket — Click element; check packets against a specification

SYNOPSIS

CheckPacket(KEYWORDS)

Ports: 1 input, 1 output
Processing: agnostic

DESCRIPTION

CheckPacket compares all received packets against a specification provided by keyword arguments. It prints error messages when incoming packets don't match the spec.

Keyword arguments are as follows. Tests are performed for the keyword arguments you specify. If you don't want to run a test, don't supply the keyword. CheckPacket(), with no keywords, accepts every packet.

  • DATA — String. The contents of the packet (starting DATA_OFFSET bytes in) must exactly match DATA.
  • DATA_OFFSET — Integer. Specifies the offset into the packet used for DATA matches. Default is 0.
  • LENGTH — Integer. The packet's length must equal LENGTH.
  • LENGTH_GE — Integer. The packet's length must be at least LENGTH_GE.
  • LENGTH_LE — Integer. The packet's length must be at most LENGTH_LE. Specify at most one of LENGTH, LENGTH_GE, and LENGTH_LE.
  • ALIGNMENT — Two space-separated integers, `MODULUS OFFSET'. The packet's data must be aligned OFFSET bytes off from a MODULUS-byte boundary.

SEE ALSO

PacketTest

Generated by click-elem2man from ../elements/test/checkpacket.hh:7 on 2018/10/03.

Clone this wiki locally