tableUdfColumn
tableUdfColumn - manage a table UDF column.
SYNOPSIS
tableUdfColumn sub-command options
DESCRIPTION
The tableUdfCommand command is used columns used in table UDFs. Columns define the locations within a packet that are to be modified. Columns are defined with the options of this command and then added to a table using the addColumn sub-command of the tableUdf command. Column attributes include:
- Column name
- Offset and size-data for multiple columns may not overlap
- Data format; for example, IPv4 address.
Column data for existing tables is retrieved with the getFirstColumn and getNextColumn sub-commands of the tableUdf; the values retrieved are available in this command.
Note that when using ATM ports, different types of ATM encapsulation result in different length headers, as discussed in atmHeader. The data portion of the packet normally follows the header, except in the case of the two LLC Bridged Ethernet choices, where 12 octets of MAC address and 2 octets of Ethernet type follow the header. The offsets used in this command is with respect to the beginning of the AAL5 packet and must be adjusted by hand to account for the header.
STANDARD OPTIONS
customFormat
If formatType is set to formatTypeCustom, then this string indicates the type of formatting expected. A custom format consists of any number of fixed width fields. Each field has a specific format and fields are separated by one of a number of pre-defined separators. For example: 8b;3d;16x is a custom format that requires 8 binary digits, a semi-colon, 3 decimal digits, a semi-colon and 16 hex digits. The possible format characters are:
Option |
Usage |
---|---|
a |
Ascii characters, optionally surrounded by quotes. |
b |
Binary characters (0 or 1). |
d |
Decimal characters (0 through 9). |
x |
Hex characters (0 through 9, a through f, or A through F). |
The legal separators are `.', `:', `;', `,', `/', `\' and space. (default = "")
formatType
The expected format of the data in the column. Data is expected and is displayed in this format.
Option |
Value |
Usage |
---|---|---|
formatTypeHex |
0 |
(default) Hex digits, without any leading `0x' or `0X'. |
formatTypeAscii |
1 |
Ascii characters. If a space is part of the string, the entire string should be enclosed in quotes. |
formatTypeBinary |
2 |
Binary characters, without any leading `0b' or `0B'. |
formatTypeDecimal |
3 |
Decimal characters. |
formatTypeMAC |
4 |
A MAC address: 12 hex digits, with or without spaces. If spaces are used, the entire address should be enclosed in quotes. |
formatTypeIPv4 |
5 |
An IPv4 IP address: four decimal octets separated by periods (`.'). |
formatTypeIPv6 |
6 |
An IPv6 address. |
formatTypeCustom |
7 |
A custom specification, as detailed in customFormat. |
name
The name of the column. (default = "New Field")
offset
The offset, in bytes, from the beginning of the packet to the start of the column's data. (default = 0)
size
The size, in bytes, of the column's data. (default = 4)
COMMANDS
The tableUdfColumn command is invoked with the following sub-commands. If no sub-command is specified, returns a list of all sub-commands available.
tableUdfColumn cget option
Returns the current value of the configuration option given by option. Option may have any of the values accepted by the tableUdfColumn command.
tableUdfColumn config option value
Modify the table UDF column options. If no option is specified, returns a list describing all of the available options (see STANDARD OPTIONS).
tableUdfColumn setDefault
Sets to IxTclHal default values for all configuration options.
EXAMPLES
See examples under tableUdf