11.5.1. Address

Represents an address;

11.5.1.1. Address. IP (hostname)

Create an Address object representing an IPv4 Address

  • parameter

    • hostname

      Address value or IP host name;

  • The return value

    • The newly created Address object;

11.5.1.2. Address. Ipv6 (hostname)

Represents an address;

11.5.1.1. Address. IP (hostname)

Create an Address object representing an IPv6 Address

  • parameter

    • hostname

      Address value or IP host name;

  • The return value

    • The newly created Address object;

11.5.1.3.Address.ether(eth)

Create an Address object representing an Ethernet Address.

  • parameter

    • eth

      Ethernet address value;

  • The return value

    • The newly created Address object;

11.5.1.4. Address: __tostring ()

  • The return value

    • A string representing an address;

11.5.1.5. Address: __eq ()

Compare two address values;

11.5.1.6. Address: __le ()

Compare two address values;

11.5.1.7. Address: __lt ()

Compare two address values;

11.5.2. The Column

A column in the packet list;

11.5.2.1. Column: __tostring ()

  • The return value

    • The string text for the column (if not, in parentheses);

11.5.2.2. Column: the clear ()

Empty the column;

11.5.2.3. Column: set (text)

Sets the text of the column;

  • parameter

    • text

      The text to set to the column;

11.5.2.4. Column: append (text)

Add text to the column;

  • parameter

    • text

      The text to add to the column;

11.5.2.5. Column: the prepend (text)

Presets a text to the column;

  • parameter

    • text

      The text to preset to the column;

11.5.2.6. Column: fence ()

Set up a layer of text protection to prevent being overwritten;

11.5.2.7. Column: clear_fence ()

Remove text protection;

11.5.3. The Columns

The Column of The packet list;

11.5.3.1. The columns: __tostring ()

  • The return value

    • The string “Columns” has no real use except for debugging;

11.5.3.2. The columns: __newindex (column, text)

Sets the text for a specific column;

Some columns can’t be modified, but you don’t get an error if you try (but it doesn’t work);

Columns known to be allowed to be modified are “info” and “protocal”;

  • parameter

    • column

      Valid values for the name of the column to be set are as follows:

      Name Description
      number Frame number
      abs_time Absolute timestamp
      utc_time UTC timestamp
      cls_time CLS timestamp
      rel_time Relative timestamp
      date Absolute date and time
      date_doy Absolute year, day of year, and time
      utc_date UTC date and time
      utc_date_doy UTC year, day of year, and time
      delta_time Delta time from previous packet
      delta_time_displayed Delta time from previous displayed packet
      src Source address
      src_res Resolved source address
      src_unres Numeric source address
      dl_src Source data link address
      dl_src_res Resolved source data link address
      dl_src_unres Numeric source data link address
      net_src Source network address
      net_src_res Resolved source network address
      net_src_unres Numeric source network address
      dst Destination address
      dst_res Resolve destination address
      dst_unres Numeric destination address
      dl_dst Destination data link address
      dl_dst_res Resolved destination data link address
      dl_dst_unres Numeric destination data link address
      net_dst Destination network address
      net_dst_res Resolved destination network address
      net_dst_unres Numeric destination network address
      src_port Source port
      src_port_res Resolved source port
      src_port_unres Numeric source port
      dst_port Destination port
      dst_port_res Resolved destination port
      dst_port_unres Numeric destination port
      protocol Protocol name
      info General packet information
      packet_len Packet length
      cumulative_bytes Cumulative bytes in the capture
      direction Packet direction
      vsan Virtual SAN
      tx_rate Transmit rate
      rssi RSSI value
      dce_call DCE call

11.5.3.3. Sample

pinfo.cols['info'] = 'foo bar'- Syntactic sugar (equivalent to above) pinfo.cols.info ='foo bar'
Copy the code
  • text

    • The text of the column;

11.5.3.4. The columns: index ()

Get a specific column;

11.5.4. NSTime

NSTime represents an nSTIme_t, which is an object with seconds and nanoseconds;

11.5.4.1. NSTime. New ([seconds], [nseconds])

Create an NSTime object.

  • parameter

    • Seconds (optional)

      Seconds;

    • Nseconds (Optional)

      A nanosecond.

  • The return value

    New NSTime object;

11.5.4.2. Nstime: __call ([seconds], [nseconds])

Create an NSTime object;

  • parameter

    • Seconds (optional)

      Seconds;

    • Nseconds (Optional)

      A nanosecond.

  • The return value

New NSTime object;

11.5.4.3. Nstime: tonumber ()

Return a Lua number representing the NSTime in seconds of time;

  • The return value

    • Lua Numbers;

11.5.4.4. Nstime: __tostring ()

  • The return value

    • According to thenstimeA string of characters of;

11.5.4.5. Nstime: __add, for addition ()

The sum of two nS mes;

11.5.4.6. Nstime: __sub ()

The difference between two nS mes;

11.5.4.7. Nstime: __unm ()

Take the negative of the NSTime;

11.5.4.8. Nstime: __eq ()

Compare two NSTimes;

11.5.4.9. Nstime: __le ()

Compare two NSTimes;

11.5.4.10. Nstime: __lt ()

Compare two NSTimes;

11.5.4.11. Nstime. Secs

Mode: only for retrieval or assignment (Mode: Retrieve or assign);

NSTime seconds;

11.5.4.12. Nstime. Nsecs

Mode: only for retrieval or assignment (Mode: Retrieve or assign);

NSTime nanoseconds.

11.5.5. Pinfo

Packet information;

11.5.5.1. Pinfo. Visited

Mode: for retrieval only (Mode: Retrieve only);

Whether the packet has been accessed;

11.5.5.2. Pinfo. Number

Mode: for retrieval only (Mode: Retrieve only);

The number of packets in the current file;

11.5.5.3. Pinfo. Len

Mode: for retrieval only (Mode: Retrieve only);

Length of data frame;

11.5.5.4. Pinfo. Caplen

Mode: for retrieval only (Mode: Retrieve only);

The length of captured data frames;

11.5.5.5. Pinfo. Abs_ts

Mode: for retrieval only (Mode: Retrieve only);

The time when the packet was captured;

11.5.5.6. Pinfo. Rel_ts

Mode: for retrieval only (Mode: Retrieve only);

The number of seconds since the packet was captured;

11.5.5.7. Pinfo. Delta_ts

Mode: for retrieval only (Mode: Retrieve only);

The number of seconds since the last packet was captured

11.5.5.8. Pinfo. Delta_dis_ts

Mode: for retrieval only (Mode: Retrieve only);

The number of seconds since the packet was last displayed;

11.5.5.9. Pinfo. Curr_proto

Mode: for retrieval only (Mode: Retrieve only);

The agreement that we are currently parsing;

11.5.5.10. Pinfo. Can_desegment

Mode: only for retrieval and assignment (Mode: Retrieve or assign);

Set whether the segment can be (be deseged);

11.5.5.11. Pinfo. Desegment_len

Mode: only for retrieval and assignment (Mode: Retrieve or assign);

Estimate the number of extra bytes required for a Protocal Data Unit (PDU).

11.5.5.12. Pinfo. Desegment_offset

Mode: only for retrieval and assignment (Mode: Retrieve or assign);

The offset in the TVbuff from which dissector will continue processing on the next call;

11.5.5.13. Pinfo. Fragmented

Mode: for retrieval only (Mode: Retrieve only);

Whether the protocol has only one fragment;

11.5.5.14. Pinfo. In_error_pkt

Mode: for retrieval only (Mode: Retrieve only);

Whether we are in the wrong packet;

11.5.5.15. Pinfo. Match_uint

Mode: for retrieval only (Mode: Retrieve only);

Matching uINT is used to call subdissector from a table;

11.5.5.16. Pinfo. Match_string

Mode: for retrieval only (Mode: Retrieve only);

Matching string is used to call subdissector from the table;

11.5.5.17. Pinfo. Port_type

Mode: only for retrieval and assignment (Mode: Retrieve or assign);

Type of the source port and destination port.

11.5.5.18. Pinfo. Src_port

Mode: only for retrieval and assignment (Mode: Retrieve or assign);

The source port of the packet;

11.5.5.19. Pinfo. Dst_port

Mode: only for retrieval and assignment (Mode: Retrieve or assign);

The destination port of the packet;

11.5.5.20. Pinfo. Dl_src

Mode: only for retrieval and assignment (Mode: Retrieve or assign);

Data link layer source address of the packet;

11.5.5.21. Pinfo. Dl_dst

Mode: only for retrieval and assignment (Mode: Retrieve or assign);

Destination address of the data link layer of the packet;

_src 11.5.5.22. Pinfo.net

Mode: only for retrieval and assignment (Mode: Retrieve or assign);

The network layer source address of the packet;

_dst 11.5.5.23. Pinfo.net

Mode: only for retrieval and assignment (Mode: Retrieve or assign);

The network layer destination address of the packet;

11.5.5.24. Pinfo. SRC

Mode: only for retrieval and assignment (Mode: Retrieve or assign);

The source address of the packet;

11.5.5.25. Pinfo. DST

Mode: only for retrieval and assignment (Mode: Retrieve or assign);

The destination address of the packet;

11.5.5.26. Pinfo. P2p_dir

Mode: only for retrieval and assignment (Mode: Retrieve or assign);

The transmission direction of the packet is incoming/outgoing.

11.5.5.27. Pinfo. Match

Mode: for retrieval only (Mode: Retrieve only);

We are matching ports or data;

11.5.5.28. Pinfo. The columns

Mode: for retrieval only (Mode: Retrieve only);

Access packet list columns;

11.5.5.29. Pinfo. Cols

Mode: for retrieval only (Mode: Retrieve only);

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

11.5.5.30. Pinfo. Private

Mode: for retrieval only (Mode: Retrieve only);

Access the entire private table;

11.5.5.31. Pinfo. Hi

Mode: only for retrieval and assignment (Mode: Retrieve or assign);

The packet’s higher address;

11.5.5.32. Pinfo. Lo

Mode: for retrieval only (Mode: Retrieve only);

The lower address of the packet;

11.5.5.33. Pinfo. The conversation

Mode: only used for assignment (Mode: Assign only);

Sets the packet session to the specified Proto object.

11.5.6. PrivateTable

PrivateTable: pinfo – > private_table;

11.5.6.1. Privatetable: __tostring ()

Get debug type information about private table;

  • The return value

    • A string containing all the keys in the table, usually used only for debugging;