A-8 APPENDIX A: PACKET FILTER OPCODES, EXAMPLES, AND SYNTAX ERRORS
reject
Description:
Conditionally rejects the packet being examined. A byte is popped from the
stack. If it is non-zero, the packet is rejected and evaluation of the filter ends
immediately; otherwise, filter evaluation continues with the next instruction.
Storage Needed:
1 byte
shiftl (shift left)
Description:
Pops two values from the stack and shifts the first operand left by the number of
bits specified by the second operand. Bits shifted out of the left side of the
operand are discarded and zeros are shifted in from the right. The resulting value
is pushed back onto the stack. The size of the first operand and the size of the
result are determined by the contents of the top of the stack. The second
operand is always 1 byte and only the low 5 bits of the byte are used as the
shift count.
Storage Needed:
1 byte
shiftr (shift right)
Description:
Pops two values from the stack and shifts the first operand right by the number
of bits specified by the second operand. Bits shifted out of the right side of the
operand are discarded and zeros are shifted in from the left. The resulting value
is pushed back onto the stack. The size of the first operand and the size of the
result are determined by the contents of the top of the stack. The second
operand is always 1 byte and only the low 5 bits of the byte are used as the
shift count.
Storage Needed:
1 byte