Ask Your Question

Revision history [back]

I don't think fields have leading or trailing spaces, at least they're not intended to have them.

Info that might help:

Using tshark -G fields outputs a list of all fields and protocols in the application in a tab separated format.

Items may have info about Protocols (initial char is "P") or Fields (initial char is "F").

Protocol items have 3 elements; a type indicator ("P"), a text name and a filter name.

Field items have 9 elements: a type indicator ("F"), a text name, a filter name, the field type, the protocol associated with the field, the base for the field value, the bit mask for active bits in the field value and a comment for the field.

And now how I tested:

Post-processing the output of tshark -G fields with PowerShell showed no Fields or Protocols have a name element that has leading or trailing spaces.

tshark -G fields | `
    ConvertFrom-Csv  -Delimiter "`t" -Header "FieldInd", "Name", "FilterName", "FieldType", "Protocol", "Base", "Bits", "Comment" | `
    Where-Object { $_.Name -match "^ +.* +$" }

and

tshark -G fields | `
    ConvertFrom-Csv  -Delimiter "`t" -Header "FieldInd", "Name", "FilterName" | `
    Where-Object { $_.Name -match "^ +.* +$" }

I don't think fields field names have leading or trailing spaces, at least they're not intended to have them.

Info that might help:

Using tshark -G fields outputs a list of all fields and protocols in the application in a tab separated format.

Items may have info about Protocols (initial char is "P") or Fields (initial char is "F").

Protocol items have 3 elements; a type indicator ("P"), a text name and a filter name.

Field items have 9 elements: a type indicator ("F"), a text name, a filter name, the field type, the protocol associated with the field, the base for the field value, the bit mask for active bits in the field value and a comment for the field.

And now how I tested:

Post-processing the output of tshark -G fields with PowerShell showed no Fields or Protocols have a name element that has leading or trailing spaces.

tshark -G fields | `
    ConvertFrom-Csv  -Delimiter "`t" -Header "FieldInd", "Name", "FilterName", "FieldType", "Protocol", "Base", "Bits", "Comment" | `
    Where-Object { $_.Name -match "^ +.* +$" }

and

tshark -G fields | `
    ConvertFrom-Csv  -Delimiter "`t" -Header "FieldInd", "Name", "FilterName" | `
    Where-Object { $_.Name -match "^ +.* +$" }