11.9. Obtaining packet information
Prev | Chapter 11. Lua Support in Wireshark | Next

## 11.9. Obtaining packet information

### 11.9.1. Address

Represents an address

#### 11.9.1.1. Address.ip(hostname)

Creates an Address Object representing an IP address.

##### 11.9.1.1.1. Arguments

hostname

  The address or name of the IP host.

##### 11.9.1.1.2. Returns

The Address object

#### 11.9.1.2. address:__tostring()

##### 11.9.1.2.1. Returns

The string representing the address.

#### 11.9.1.3. address:__eq()

Compares two Addresses

#### 11.9.1.4. address:__le()

Compares two Addresses

#### 11.9.1.5. address:__lt()

Compares two Addresses

### 11.9.2. Column

A Column in the packet list

#### 11.9.2.1. column:__tostring()

##### 11.9.2.1.1. Returns

A string representing the column

#### 11.9.2.2. column:clear()

Clears a Column

#### 11.9.2.3. column:set(text)

Sets the text of a Column

##### 11.9.2.3.1. Arguments

text

  The text to which to set the Column

#### 11.9.2.4. column:append(text)

Appends text to a Column

##### 11.9.2.4.1. Arguments

text

  The text to append to the Column

#### 11.9.2.5. column:preppend(text)

Prepends text to a Column

##### 11.9.2.5.1. Arguments

text

  The text to prepend to the Column

### 11.9.3. Columns

The Columns of the packet list.

#### 11.9.3.1. columns:__tostring()

##### 11.9.3.1.1. Returns

The string "Columns", no real use, just for debugging purposes.

#### 11.9.3.2. columns:__newindex(column, text)

Sets the text of a specific column

##### 11.9.3.2.1. Arguments

column

  The name of the column to set

text

  The text for the column

### 11.9.4. NSTime

NSTime represents a nstime_t. This is an object with seconds and nano seconds.

#### 11.9.4.1. NSTime.new([seconds], [nseconds])

Creates a new NSTime object

##### 11.9.4.1.1. Arguments

seconds (optional)

  Seconds

nseconds (optional)

  Nano seconds

##### 11.9.4.1.2. Returns

The new NSTime object.

#### 11.9.4.2. nstime:__tostring()

##### 11.9.4.2.1. Returns

The string representing the nstime.

#### 11.9.4.3. nstime:__add()

Calculates the sum of two NSTimes

#### 11.9.4.4. nstime:__sub()

Calculates the diff of two NSTimes

#### 11.9.4.5. nstime:__unm()

Calculates the negative NSTime

#### 11.9.4.6. nstime:__eq()

Compares two NSTimes

##### 11.9.4.6.1. Errors

- Data source must be the same for both fields

#### 11.9.4.7. nstime:__le()

Compares two NSTimes

##### 11.9.4.7.1. Errors

- Data source must be the same for both fields

#### 11.9.4.8. nstime:__lt()

Compares two NSTimes

##### 11.9.4.8.1. Errors

- Data source must be the same for both fields

#### 11.9.4.9. nstime.secs

The NSTime seconds

#### 11.9.4.10. nstime.nsecs

The NSTime nano seconds

### 11.9.5. Pinfo

Packet information

#### 11.9.5.1. pinfo.number

The number of this packet in the current file

#### 11.9.5.2. pinfo.len

The length of the frame

#### 11.9.5.3. pinfo.caplen

The captured length of the frame

#### 11.9.5.4. pinfo.abs_ts

When the packet was captured

#### 11.9.5.5. pinfo.rel_ts

Number of seconds passed since beginning of capture

#### 11.9.5.6. pinfo.delta_ts

Number of seconds passed since the last captured packet

#### 11.9.5.7. pinfo.delta_dis_ts

Number of seconds passed since the last displayed packet

#### 11.9.5.8. pinfo.visited

Whether this packet hass been already visited

#### 11.9.5.9. pinfo.src

Source Address of this Packet

#### 11.9.5.10. pinfo.dst

Destination Address of this Packet

#### 11.9.5.11. pinfo.lo

lower Address of this Packet

#### 11.9.5.12. pinfo.hi

higher Address of this Packet

#### 11.9.5.13. pinfo.dl_src

Data Link Source Address of this Packet

#### 11.9.5.14. pinfo.dl_dst

Data Link Destination Address of this Packet

#### 11.9.5.15. pinfo.net_src

Network Layer Source Address of this Packet

#### 11.9.5.16. pinfo.net_dst

Network Layer Destination Address of this Packet

#### 11.9.5.17. pinfo.ptype

Type of Port of .src_port and .dst_port

#### 11.9.5.18. pinfo.src_port

Source Port of this Packet

#### 11.9.5.19. pinfo.dst_port

Source Address of this Packet

#### 11.9.5.20. pinfo.ipproto

IP Protocol id

#### 11.9.5.21. pinfo.circuit_id

For circuit based protocols

#### 11.9.5.22. pinfo.match

Port/Data we are matching

#### 11.9.5.23. pinfo.curr_proto

Which Protocol are we dissecting

#### 11.9.5.24. pinfo.columns

Accesss to the packet list columns

#### 11.9.5.25. pinfo.cols

Accesss to the packet list columns (equivalent to pinfo.columns)

#### 11.9.5.26. pinfo.desegment_len

Estimated number of additional bytes required for completing the PDU

#### 11.9.5.27. pinfo.desegment_offset

Offset in the tvbuff at which the dissector will continue processing when next called

#### 11.9.5.28. pinfo.private_data

Access to private data

#### 11.9.5.29. pinfo.private

Access to the private table entries

#### 11.9.5.30. pinfo.ethertype

Ethernet Type Code, if this is an Ethernet packet

#### 11.9.5.31. pinfo.fragmented

If the protocol is only a fragment

#### 11.9.5.32. pinfo.in_error_pkt

If we're inside an error packet

#### 11.9.5.33. pinfo.match_uint

Matched uint for calling subdissector from table

#### 11.9.5.34. pinfo.match_string

Matched string for calling subdissector from table

### 11.9.6. PrivateTable

PrivateTable represents the pinfo->private_table.

#### 11.9.6.1. privatetable:__tostring()

##### 11.9.6.1.1. Returns

A string with all keys in the table, mostly for debugging.

Prev | Up | Next
11.8. Post-dissection packet analysis | Home | 11.10. Functions for writing dissectors