Shared Definitions

Reference Documentation

product_line_custom
Intel® PAC
Napatech SmartNIC
category
Reference Information
Napatech Software Suite: Shared Definitions

This chapter specifies the syntax and semantics for some shared definitions.

The syntax for some shared definitions is shown below.

<Letter>                ::= 'a' | 'b' | 'c' | ... | 'z' | 'A' | 'B' | 'C' | ... | 'Z'
<Ascii char>            ::= 'a' | 'b' | 'c' | ... | 'z' | 'A' | 'B' | 'C' | ... | 'Z' |
                            '0' | ... | '9' | ' ' | '.' | '(' | ')' | '{' | '}' | '[' | ']' |
                            ',' | ';' | '=' | '<' | '>' | '!' | '_' | '-'
<Ascii char reduced>    ::= 'a' | 'b' | 'c' | ... | 'z' | 'A' | 'B' | 'C' | ... | 'Z' |
                            '0' | ... | '9' | '_' | '-'
<Number>                ::= '0' | '1' | ... | '9'

<Identifier> ::= <Letter> { <Ascii char reduced> }
<NtplId> ::= <32-bit value> <Priority> ::= '0' | '1' | '2' | ... | '62' <FrameLengthValue> ::= '0' | '1' | '2' | ... | 10000 | '0x0' | '0x1' | '0x2' | ... | '0x2710' <TrueFalseValue> ::= 'TRUE' | 'FALSE'
<StreamIdSpec> ::= <StreamIdSetSpec> | <StreamIdRangeSpec> | 'DROP' <StreamIdSetSpec> ::= <StreamId> [ ',' <StreamIdSetSpec> ] - Up to 32 StreamIDs <StreamIdRangeSpec> ::= '(' <StreamId> '..' <StreamId> ')' <StreamId> ::= '0' | '1' | '2' | ... | '255'
<PortNumberSpec> ::= <PortNumberSetSpec> | <PortNumberRangeSpec> <PortNumberSetSpec> ::= <PortNumber> [ ',' <PortNumberSetSpec> ] - Up to 8 port numbers <PortNumberRangeSpec> ::= '(' <PortNumber> '..' <PortNumber> ')' <PortNumber> ::= '0' | '1' | '2' | ... | '31'
<MaskNumber> ::= '0' | '1' | '2' | ... | '15' <KeySetId> ::= '1' | '2' | ... | '15'
<EqualNotEqualTest> ::= '==' | '!=' <CompareOperator> ::= '==' | '!=' | '<' | '<=' | '>' | '>='
<IPv4AddrValue> ::= '[' <8-bit decimal value> '.' <8-bit decimal value> '.' <8-bit decimal value> '.' <8-bit decimal value> ']' <IPv4AddrMask> ::= '[' <8-bit hex value> '.' <8-bit hex value> '.' <8-bit hex value> '.' <8-bit hex value> ']' | '[' <8-bit hex value without 0x> '.' <8-bit hex value without 0x> '.' <8-bit hex value without 0x> '.' <8-bit hex value without 0x> ']' <IPv6AddrValue> ::= '[' <16-bit hex value> ':' <16-bit hex value> ':' <16-bit hex value> ':' <16-bit hex value> ':' <16-bit hex value> ':' <16-bit hex value> ':' <16-bit hex value> ':' <16-bit hex value> ']' | '[' <16-bit hex value without 0x> ':' <16-bit hex value without 0x> ':' <16-bit hex value without 0x> ':' <16-bit hex value without 0x> ':' <16-bit hex value without 0x> ':' <16-bit hex value without 0x> ':' <16-bit hex value without 0x> ':' <16-bit hex value without 0x> ']' <IPv6AddrMask> ::= '[' <16-bit hex value> ':' <16-bit hex value> ':' <16-bit hex value> ':' <16-bit hex value> ':' <16-bit hex value> ':' <16-bit hex value> ':' <16-bit hex value> ':' <16-bit hex value> ']' | '[' <16-bit hex value without 0x> ':' <16-bit hex value without 0x> ':' <16-bit hex value without 0x> ':' <16-bit hex value without 0x> ':' <16-bit hex value without 0x> ':' <16-bit hex value without 0x> ':' <16-bit hex value without 0x> ':' <16-bit hex value without 0x> ']'
<ProtocolField> ::= <ProtocolField8> | <ProtocolField11> | <ProtocolField15> <ProtocolField8> ::= <Identifier> | <ProtocolLocation8> '/' <Number>) <ProtocolField11> ::= <Identifier> | <ProtocolLocation11> '/' <Number>) <ProtocolField15> ::= <Identifier> | <ProtocolLocation15> '/' <Number>) <ProtocolLocation8> ::= <ProtocolOffset> '[' <8-bit signed value> ']' <ProtocolLocation11> ::= <ProtocolOffset> '[' <11-bit signed value> ']' <ProtocolLocation15> ::= <ProtocolOffset> '[' <15-bit signed value> ']' <ProtocolOffset> ::= 'StartOfFrame' | 'Layer2Header' | 'FirstVLAN' | 'FirstMPLS' | 'Layer3Header' | 'IdentificationField' | 'DestinationIp' | 'Layer4Header' | 'Layer4Payload' | 'TunnelPayload' | 'InnerLayer2Header' | 'InnerFirstVLAN' | 'InnerFirstMPLS' | 'InnerLayer3Header' | 'InnerIdentificationField' | 'InnerDestinationIp' | 'InnerLayer4Header' | 'InnerLayer4Payload' | 'EndOfFrame' | 'Layer3PayloadEnd' | 'InnerLayer3PayloadEnd'
<8-bit signed value> ::= '-128' | '-127' | ... | '-1' | '0' | '1' | ... | '127' <8-bit value> ::= <8-bit hex value> | <8-bit decimal value> <8-bit hex value> ::= '0x00' | '0x01' | '0x02' | ... | '0xFF' <8-bit hex value without 0x> ::= '00' | '01' | '02' | ... | 'FF' <8-bit decimal value> ::= '0' | '1' | '2' | ... | '255' <11-bit signed value> ::= '-1024' | '-1023' | ... | '-1' | '0' | '1' | ... | '1024' <15-bit signed value> ::= '-16384' | '-16383' | ... | '-1' | '0' | '1' | ... | '16383' <16-bit value> ::= <16-bit hex value> | <16-bit decimal value> <16-bit hex value> ::= '0x0000' | '0x0001' | ... | '0xFFFF' <16-bit hex value without 0x> ::= '0000' | '0001' | ... | 'FFFF' <16-bit decimal value> ::= '0' | '1' | '2' | ... | '65535' <32-bit value> ::= <32-bit hex value> | <32-bit decimal value> <32-bit hex value> ::= '0x00000000' | '0x00000001' | ... | '0xFFFFFFFF' <32-bit hex value witout 0x> ::= '00000000' | '00000001' | ... | 'FFFFFFFF' <32-bit decimal value> ::= '0' | '1' | '2' | ... | '4294967295' <HexString> ::= '0x' <HexDigitSpec> <HexDigitList> ::= <HexDigit> [ <HexDigitSpec> ] <HexDigit> ::= '0' | '1' | '2' | ... | '9' | 'A' | 'B' | ... | 'F' <BinaryString> ::= ''b' <BinaryDigitSpec> <BinaryDigitSpec> ::= <BinaryDigit> [ <BinaryDigitSpec> ] <BinaryDigit> ::= '0' | '1' <DescriptorLength> ::= '16' | '18' | '20' | ... | '64' <DeduplicationGroupNumber> ::= '0' | '1' | ... | '15'

A 'ProtocolField' is a range of bytes in a packet. It is specified by a starting point and a number of bits (in practice a multiplum of 8). E.g. 'Layer3Header[12]/32' specifies the source IP address in an IPv4 packet.

'ProtocolLocation' takes two parameters, a dynamic part - 'ProtocolOffset' and a static offset. E.g. Layer2Header[4] means 4 bytes into the layer 2 header.

'ProtocolOffset' is a symbollic reference to a particular offset in a packet. The actual value will be calculated at runtime. This is why this is often referred to as the dynamic offset.