Common Syntax Errors A-13

Common Syntax

When a packet filter definition is loaded, the definition is checked for syntax

Errors

errors. The syntax errors and their causes are listed in Table A-1.

 

Table A-1 Possible Syntax Errors When Loading Packet Filters

 

 

 

 

Syntax Error

Description

 

 

 

 

 

Opcode

not found

An opcode was expected on the line and was not found.

 

 

 

 

The opcode must be one of those described in “Opcodes” on

 

 

 

 

page A-1 and must include the size, if any. The opcode and

 

 

 

 

size must be separated by a single “.” with no intervening

 

 

 

 

spaces. Any mix of uppercase and lowercase characters is

 

 

 

 

permitted.

 

 

 

 

 

Unknown

opcode

An opcode was expected on the line and was not found.

 

 

 

 

The opcode must be one of those described in “Opcodes” on

 

 

 

 

page A-1 and must include the size, if any. The opcode and

 

 

 

 

size must be separated by a single “.” with no intervening

 

 

 

 

spaces. Any mix of upper and lower case characters is

 

 

 

 

permitted.

 

 

 

 

 

Operands

are not

The opcode requires two operands of the same size. The top

 

the same

size

two operands currently on the stack are of different sizes.

 

 

 

 

 

 

 

 

 

Stack

underflow

The opcode requires one or more operands. An insufficient

 

 

 

 

number of operands are currently on the stack.

 

 

 

 

 

Stack

overflow

The opcode pushes an operand on the stack. The stack does

 

 

 

 

not have sufficient room for the operand.

No result found on top of stack

The program must end with a byte operand on the top of the stack. After the last instruction in the program is executed, the stack is either empty or contains an operand other than a byte.

Extra characters

The source line contains extraneous characters that are not

on line

 

 

part of the instruction and are not preceded by a comment

 

 

 

 

 

 

character (#).

 

 

 

Expected a

byte

The opcode requires a byte operand as one of its parameters.

operand

 

 

The operand is of a size other than a byte.

 

 

 

 

 

 

 

Offset

not

found

The opcode requires an offset to be specified. None was

 

 

 

found on the line.

 

 

 

 

Literal

not

found

The opcode requires a literal value to be specified. None was

 

 

 

found on the line.

 

 

 

 

String

not

found

The opcode requires a quoted string to be specified. None

 

 

 

was found on the line.

(continued)

Page 187
Image 187
3Com 2200 manual Common Syntax, Errors