11.6. Obtaining dissection data
Prev | Chapter 11. Lua Support in Wireshark | Next

## 11.6. Obtaining dissection data

### 11.6.1. Field

A Field extractor to to obtain field values.

#### 11.6.1.1. Field.new(fieldname)

Create a Field extractor

##### 11.6.1.1.1. Arguments

fieldname

  The filter name of the field (e.g. ip.addr)

##### 11.6.1.1.2. Returns

The field extractor

##### 11.6.1.1.3. Errors

- A Field extractor must be defined before Taps or Dissectors get called

#### 11.6.1.2. field:__call()

Obtain all values (see FieldInfo) for this field.

##### 11.6.1.2.1. Returns

All the values of this field

##### 11.6.1.2.2. Errors

- Fields cannot be used outside dissectors or taps

### 11.6.2. FieldInfo

An extracted Field

#### 11.6.2.1. fieldinfo:__len()

Obtain the Length of the field

#### 11.6.2.2. fieldinfo:__unm()

Obtain the Offset of the field

#### 11.6.2.3. fieldinfo:__call()

Obtain the Value of the field

#### 11.6.2.4. fieldinfo:__tostring()

The string representation of the field

#### 11.6.2.5. fieldinfo:__eq()

Checks whether lhs is within rhs

##### 11.6.2.5.1. Errors

- Data source must be the same for both fields

#### 11.6.2.6. fieldinfo:__le()

Checks whether the end byte of lhs is before the end of rhs

#### 11.6.2.7. fieldinfo:__lt()

Checks whether the end byte of rhs is before the beginning of rhs

##### 11.6.2.7.1. Errors

- Data source must be the same for both fields

#### 11.6.2.8. fieldinfo.name

The name of this field

#### 11.6.2.9. fieldinfo.label

The string representing this field

#### 11.6.2.10. fieldinfo.value

The value of this field

#### 11.6.2.11. fieldinfo.len

The length of this field

#### 11.6.2.12. fieldinfo.offset

The offset of this field

### 11.6.3. Non Method Functions

#### 11.6.3.1. all_field_infos()

Obtain all fields from the current tree

##### 11.6.3.1.1. Errors

- Cannot be called outside a listener or dissector

Prev | Up | Next
11.5. Saving capture files | Home | 11.7. GUI support