Module Globals

Global functions and objects provided by TraceBox

Functions

filter (pkt) Create a firewall rule to open ports on the host machine.
filter (pkt) Create a firewall rule to open ports on the host machine.
tracebox_callback (ttl, r_ip, mod) Callback function type, to be provided as argument to tracebox
tracebox (pkt[, args]) Start sending the packet with increasing TTL values and compute the differences
set_ttl_range (args) Set a new TTL range for further tracebox calls
sleep (the) Suspend the current execution thread for a fixed amount of time
dn6 (a) Resolve a domain name to an IPv6 address
dn4 (a) Resolve a domain name to an IPv4 address
gethostname (an) Attempt to map the given IP address to a domain name

Tables

tracebox_args Tracebox optional keyword parameters
set_ttl_range_args Parameters for setttlrange

Fields

argv Contains all arguments that appeared on the command line, in the order they appeared.

dnsquery (name) Create a new DNSQuery for a given hostname, type A, class IN
dnsquery (name) Create a new DNSQuery for a given hostname, type A, class IN

Layers

raw ([args]) Shorthand for Raw:new
icmp ([args]) Shorthand for ICMP:new
ip ([args]) Shorthand for IP:new
ipv6 ([args]) Shorthand for IPv6:new
srh ([args]) Shorthand for IPv6SegmentRoutingHeader:new
tcp ([args]) Shorthand for TCP:new
udp ([args]) Shorthand for UDP:new
raw ([args]) Shorthand for Raw:new
icmp ([args]) Shorthand for ICMP:new
ip ([args]) Shorthand for IP:new
ipv6 ([args]) Shorthand for IPv6:new
srh ([args]) Shorthand for IPv6SegmentRoutingHeader:new
tcp ([args]) Shorthand for TCP:new
udp ([args]) Shorthand for UDP:new

ICMP

ICMPEchoReq (id, seq) Create an ICMP Echo Request Layer
ICMPEchoRep (id, seq) Create an ICMP Echo Reply Layer
ICMPDstUnreach (mtu) Create an ICMP Destination Unreachable Layer
ICMPSrcQuench Create an ICMP Source Quench Unreachable Layer
ICMPRedirect (addr) Create an ICMP Redirect Layer
ICMPTimeExceeded Create an ICMP Time Exceeded Layer
ICMPEchoReq (id, seq) Create an ICMP Echo Request Layer
ICMPEchoRep (id, seq) Create an ICMP Echo Reply Layer
ICMPDstUnreach (mtu) Create an ICMP Destination Unreachable Layer
ICMPSrcQuench Create an ICMP Source Quench Unreachable Layer
ICMPRedirect (addr) Create an ICMP Redirect Layer
ICMPTimeExceeded Create an ICMP Time Exceeded Layer

IP

IP A default IP layer instance
ip_nop () Construct an IPOption NOP (padding, option=1), shorthand for IPOption:new_nop
ip_eol () Construct an IPOption EOL (padding, option=0), shorthand for IPOption:new_eol
rr (the) Construct an IPOption RR, shorthand for IPOption:new_rr
ssrr (addrs) Construct an IPOption SSRR, shorthand for IPOption:new_ssrr
lsrr (addrs) Construct an IPOption LSRR, shorthand for IPOption:new_lsrr
traceroute (src) Construct an IPOption Traceroute, shorthand for IPOption:new_traceroute
IP_NOP A default IP NOP object
IP_EOL A default IP EOL object
RR (the) Construct a RR IPOption, with proper padding
SSRR (addrs) Construct a SSRR IPOption, with proper padding
LSRR (addrs) Construct a LSRR IPOption, with proper padding
IP A default IP layer instance
ip_nop () Construct an IPOption NOP (padding, option=1), shorthand for IPOption:new_nop
ip_eol () Construct an IPOption EOL (padding, option=0), shorthand for IPOption:new_eol
rr (the) Construct an IPOption RR, shorthand for IPOption:new_rr
ssrr (addrs) Construct an IPOption SSRR, shorthand for IPOption:new_ssrr
lsrr (addrs) Construct an IPOption LSRR, shorthand for IPOption:new_lsrr
traceroute (src) Construct an IPOption Traceroute, shorthand for IPOption:new_traceroute
IP_NOP A default IP NOP object
IP_EOL A default IP EOL object
RR (the) Construct a RR IPOption, with proper padding
SSRR (addrs) Construct a SSRR IPOption, with proper padding
LSRR (addrs) Construct a LSRR IPOption, with proper padding

IPv6

IPv6 A default IPv6 layer instance
SRH (segs) Create a Segment Routing Header from a list of segment
IPv6 A default IPv6 layer instance
SRH (segs) Create a Segment Routing Header from a list of segment

TCP

TCP A default TCP layer whose destination port is 80
nop () Construct a TCPOption NOP (padding, kind=1), shorthand for TCPOption:new_nop
eol () Construct a TCPOption EOL (padding, kind=0), shorthand for TCPOption:new_eol
sackp () Construct a TCPOption SACKP, shorthand for TCPOption:new_sackp
sack (list) Construct a TCPOption SACK, shorthand for TCPOption:new_sack
mss (the) Construct a TCPOption MSS, shorthand for TCPOption:new_mss
wscale (the) Construct a TCPOption WScale, shorthand for TCPOption:new_wscale
mpcapable ([arg]) Construct a TCPOption MPCapable, shorthand for TCPOption:new_mpcapable
mpjoin ([arg]) Construct a TCPOption MPJoin, shorthand for TCPOption:new_mpjoin
NOP A default TCP NOP object
EOL A default TCPOption EOL object
SACKP A default TCPOption SACKPermitted object with proper padding
MSS A TCP MSS object defaulting to 1460 bytes
SACK (list) Construct a SACK Option block, with proper padding
WSCALE A default TCPOption WScale object (14), with proper padding
MPCAPABLE A default TCPOption MPCapable object
MPJOIN A default TCPOption MPjoin object
edo () Construct a TCPOption EDO, shorthand for TCPEDO:new
EDO A TCPEDO option that will contain the header length field
EDOREQUEST A TCPEDO option to be used during the handshake negociation, requires padding (length is 2 bytes)
EDOEXT A TCPEDO option containing the header length and the segment length, requires padding (length is 6 bytes)
timestamp ([arg]) Construct a TCPOption Timestamp, shorthand for TCPTimestamp:new
TS A default TCP Timestamp object
tfo ([cookie]) Construct a TCPOption TFO, shorthand for TCPTFO:new
TFO A default TCP TFO object
TCP A default TCP layer whose destination port is 80
nop () Construct a TCPOption NOP (padding, kind=1), shorthand for TCPOption:new_nop
eol () Construct a TCPOption EOL (padding, kind=0), shorthand for TCPOption:new_eol
sackp () Construct a TCPOption SACKP, shorthand for TCPOption:new_sackp
sack (list) Construct a TCPOption SACK, shorthand for TCPOption:new_sack
mss (the) Construct a TCPOption MSS, shorthand for TCPOption:new_mss
wscale (the) Construct a TCPOption WScale, shorthand for TCPOption:new_wscale
mpcapable ([arg]) Construct a TCPOption MPCapable, shorthand for TCPOption:new_mpcapable
mpjoin ([arg]) Construct a TCPOption MPJoin, shorthand for TCPOption:new_mpjoin
NOP A default TCP NOP object
EOL A default TCPOption EOL object
SACKP A default TCPOption SACKPermitted object with proper padding
MSS A TCP MSS object defaulting to 1460 bytes
SACK (list) Construct a SACK Option block, with proper padding
WSCALE A default TCPOption WScale object (14), with proper padding
MPCAPABLE A default TCPOption MPCapable object
MPJOIN A default TCPOption MPjoin object
edo () Construct a TCPOption EDO, shorthand for TCPEDO:new
EDO A TCPEDO option that will contain the header length field
EDOREQUEST A TCPEDO option to be used during the handshake negociation, requires padding (length is 2 bytes)
EDOEXT A TCPEDO option containing the header length and the segment length, requires padding (length is 6 bytes)
timestamp ([arg]) Construct a TCPOption Timestamp, shorthand for TCPTimestamp:new
TS A default TCP Timestamp object
tfo ([cookie]) Construct a TCPOption TFO, shorthand for TCPTFO:new
TFO A default TCP TFO object

UDP

UDP A default UDP layer whose destination port is 53
UDP A default UDP layer whose destination port is 53

TbxSniffer

snif (key, cb) Create a TbxSniffer and start sniffing immediately
snif (key, cb) Create a TbxSniffer and start sniffing immediately

Set of functions to help debugging the bindings

random ([UB]) Return a random number between 0 (inclusive) and the given bound (exclusive) if any

Debugging

__dump_c_stack () Return a string containing the content of the lua C stack


Functions

filter (pkt)
Create a firewall rule to open ports on the host machine.

Parameters:

  • pkt Packet a packet with a TCP or an UDP layer available.

Returns:

    FWFilter

    the firewall object that will open the source

    and destination ports found in the TCP/UDP layer of the packet
    

Usage:

    filter(IP / UDP{src=53}) -- Will open port 53 on the host machine
filter (pkt)
Create a firewall rule to open ports on the host machine.

Parameters:

  • pkt Packet a packet with a TCP or an UDP layer available.

Returns:

    FWFilter

    the firewall object that will open the source

    and destination ports found in the TCP/UDP layer of the packet
    

Usage:

    filter(IP / UDP{src=53}) -- Will open port 53 on the host machine
tracebox_callback (ttl, r_ip, mod)
Callback function type, to be provided as argument to tracebox

Parameters:

  • ttl num the current TTL value
  • r_ip string the ip of the router that echoed the probe
  • mod PacketModifications the packet modifications list

Returns:

    num 1 to force tracebox to stop sending probes

See also:

Usage:

    function callback_func(ttl, r_ip, mod)
    	print("Sent probe n#" .. tll .. " and received " .. mod:modif():tostring())
    end
tracebox (pkt[, args])
Start sending the packet with increasing TTL values and compute the differences

Parameters:

  • pkt Packet the probe packet
  • args table see tracebox_args (optional)

Returns:

    Packet the echoed packet from the destination or nil

See also:

Usage:

    tracebox(IP/TCP, { callback = 'callback_func'})
set_ttl_range (args)
Set a new TTL range for further tracebox calls

Parameters:

  • args table see setttlrange_args

Returns:

    table The old TTL table
sleep (the)
Suspend the current execution thread for a fixed amount of time

Parameters:

  • the num number of milliseconds during which the thread should sleep
dn6 (a)
Resolve a domain name to an IPv6 address

Parameters:

  • a string domain name. If it is an IP address, does nothing

Returns:

    string the corresponding IPv6 address, or nil if the call failed
dn4 (a)
Resolve a domain name to an IPv4 address

Parameters:

  • a string domain name. If it is an IP address, does nothing

Returns:

    string the corresponding IPv4 address, or nil if the call failed
gethostname (an)
Attempt to map the given IP address to a domain name

Parameters:

  • an string IP address, does nothing on domain names

Returns:

    string the corresponding IP address, either v4 or v6

Tables

tracebox_args
Tracebox optional keyword parameters

Fields:

  • callback string The callback function to call at each received probe, see tracebox_callback
set_ttl_range_args
Parameters for setttlrange

Fields:

  • min_ttl num The minimal probe TTL
  • max_ttl num The maximal probe TTL

Fields

argv
Contains all arguments that appeared on the command line, in the order they appeared. Spaces in the command line act as separator between arguments, escape them with quotes if you want to pass in a longer string.
  • argv vector

Usage:

    tracebox -l "print(#argv)" Hello " " \" Worl "d
    
    	Will print 4, as there are five arguments:
    		1. Hello
    		2. " " (without the quotes)
    		3. " (an actual quote)
    		4. Worl
    		5. d (quote was there only to fix hilighting ...)
    	Escape-rules depends on your shell.

dnsquery (name)
Create a new DNSQuery for a given hostname, type A, class IN

Parameters:

Returns:

    DNSQuery
dnsquery (name)
Create a new DNSQuery for a given hostname, type A, class IN

Parameters:

Returns:

    DNSQuery

Layers

raw ([args])
Shorthand for Raw:new

Parameters:

  • args table arguments (optional)

Returns:

    Raw a new Raw Layer object

See also:

icmp ([args])
Shorthand for ICMP:new

Parameters:

  • args table arguments (optional)

Returns:

    ICMP a new ICMP Layer object

See also:

ip ([args])
Shorthand for IP:new

Parameters:

  • args table arguments (optional)

Returns:

    IP a new IP Layer object

See also:

ipv6 ([args])
Shorthand for IPv6:new

Parameters:

  • args table arguments (optional)

Returns:

    IPv6 a new IP Layer object

See also:

srh ([args])
Shorthand for IPv6SegmentRoutingHeader:new

Parameters:

  • args table arguments (optional)

Returns:

    IPv6SegmentRoutingHeader a new IPv6SegmentRoutingHeader Layer object

See also:

tcp ([args])
Shorthand for TCP:new

Parameters:

  • args table arguments (optional)

Returns:

    TCP a new TCP Layer object

See also:

udp ([args])
Shorthand for UDP:new

Parameters:

  • args table arguments (optional)

Returns:

    UDP a new UDP Layer object

See also:

raw ([args])
Shorthand for Raw:new

Parameters:

  • args table arguments (optional)

Returns:

    Raw a new Raw Layer object

See also:

icmp ([args])
Shorthand for ICMP:new

Parameters:

  • args table arguments (optional)

Returns:

    ICMP a new ICMP Layer object

See also:

ip ([args])
Shorthand for IP:new

Parameters:

  • args table arguments (optional)

Returns:

    IP a new IP Layer object

See also:

ipv6 ([args])
Shorthand for IPv6:new

Parameters:

  • args table arguments (optional)

Returns:

    IPv6 a new IP Layer object

See also:

srh ([args])
Shorthand for IPv6SegmentRoutingHeader:new

Parameters:

  • args table arguments (optional)

Returns:

    IPv6SegmentRoutingHeader a new IPv6SegmentRoutingHeader Layer object

See also:

tcp ([args])
Shorthand for TCP:new

Parameters:

  • args table arguments (optional)

Returns:

    TCP a new TCP Layer object

See also:

udp ([args])
Shorthand for UDP:new

Parameters:

  • args table arguments (optional)

Returns:

    UDP a new UDP Layer object

See also:

ICMP

ICMPEchoReq (id, seq)
Create an ICMP Echo Request Layer

Parameters:

  • id num the ICMP Identification number
  • seq num the ICMP sequenc number

Returns:

    ICMP a new ICMP Layer object
ICMPEchoRep (id, seq)
Create an ICMP Echo Reply Layer

Parameters:

  • id num the ICMP Identification number
  • seq num the ICMP sequenc number

Returns:

    ICMP a new ICMP Layer object
ICMPDstUnreach (mtu)
Create an ICMP Destination Unreachable Layer

Parameters:

  • mtu num the mtu to specify

Returns:

    ICMP a new ICMP Layer object
ICMPSrcQuench
Create an ICMP Source Quench Unreachable Layer

See also:

ICMPRedirect (addr)
Create an ICMP Redirect Layer

Parameters:

  • addr string the address for the redirection

Returns:

    ICMP a new ICMP Layer object
ICMPTimeExceeded
Create an ICMP Time Exceeded Layer

See also:

ICMPEchoReq (id, seq)
Create an ICMP Echo Request Layer

Parameters:

  • id num the ICMP Identification number
  • seq num the ICMP sequenc number

Returns:

    ICMP a new ICMP Layer object
ICMPEchoRep (id, seq)
Create an ICMP Echo Reply Layer

Parameters:

  • id num the ICMP Identification number
  • seq num the ICMP sequenc number

Returns:

    ICMP a new ICMP Layer object
ICMPDstUnreach (mtu)
Create an ICMP Destination Unreachable Layer

Parameters:

  • mtu num the mtu to specify

Returns:

    ICMP a new ICMP Layer object
ICMPSrcQuench
Create an ICMP Source Quench Unreachable Layer

See also:

ICMPRedirect (addr)
Create an ICMP Redirect Layer

Parameters:

  • addr string the address for the redirection

Returns:

    ICMP a new ICMP Layer object
ICMPTimeExceeded
Create an ICMP Time Exceeded Layer

See also:

IP

IP
A default IP layer instance

See also:

ip_nop ()
Construct an IPOption NOP (padding, option=1), shorthand for IPOption:new_nop

Returns:

    IPOption

See also:

ip_eol ()
Construct an IPOption EOL (padding, option=0), shorthand for IPOption:new_eol

Returns:

    IPOption

See also:

rr (the)
Construct an IPOption RR, shorthand for IPOption:new_rr

Parameters:

  • the num number of IPs

Returns:

    IPOption

See also:

ssrr (addrs)
Construct an IPOption SSRR, shorthand for IPOption:new_ssrr

Parameters:

  • addrs table list of IPs

Returns:

    IPOption

See also:

lsrr (addrs)
Construct an IPOption LSRR, shorthand for IPOption:new_lsrr

Parameters:

  • addrs table list of IPs

Returns:

    IPOption

See also:

traceroute (src)
Construct an IPOption Traceroute, shorthand for IPOption:new_traceroute

Parameters:

Returns:

    IPOption

See also:

IP_NOP
A default IP NOP object

See also:

IP_EOL
A default IP EOL object

See also:

RR (the)
Construct a RR IPOption, with proper padding

Parameters:

  • the num number of IPs

Returns:

    IPOption

See also:

SSRR (addrs)
Construct a SSRR IPOption, with proper padding

Parameters:

  • addrs table list of IPs

Returns:

    IPOption

See also:

LSRR (addrs)
Construct a LSRR IPOption, with proper padding

Parameters:

  • addrs table list of IPS

Returns:

    IPOption

See also:

IP
A default IP layer instance

See also:

ip_nop ()
Construct an IPOption NOP (padding, option=1), shorthand for IPOption:new_nop

Returns:

    IPOption

See also:

ip_eol ()
Construct an IPOption EOL (padding, option=0), shorthand for IPOption:new_eol

Returns:

    IPOption

See also:

rr (the)
Construct an IPOption RR, shorthand for IPOption:new_rr

Parameters:

  • the num number of IPs

Returns:

    IPOption

See also:

ssrr (addrs)
Construct an IPOption SSRR, shorthand for IPOption:new_ssrr

Parameters:

  • addrs table list of IPs

Returns:

    IPOption

See also:

lsrr (addrs)
Construct an IPOption LSRR, shorthand for IPOption:new_lsrr

Parameters:

  • addrs table list of IPs

Returns:

    IPOption

See also:

traceroute (src)
Construct an IPOption Traceroute, shorthand for IPOption:new_traceroute

Parameters:

Returns:

    IPOption

See also:

IP_NOP
A default IP NOP object

See also:

IP_EOL
A default IP EOL object

See also:

RR (the)
Construct a RR IPOption, with proper padding

Parameters:

  • the num number of IPs

Returns:

    IPOption

See also:

SSRR (addrs)
Construct a SSRR IPOption, with proper padding

Parameters:

  • addrs table list of IPs

Returns:

    IPOption

See also:

LSRR (addrs)
Construct a LSRR IPOption, with proper padding

Parameters:

  • addrs table list of IPS

Returns:

    IPOption

See also:

IPv6

IPv6
A default IPv6 layer instance

See also:

SRH (segs)
Create a Segment Routing Header from a list of segment

Parameters:

  • segs table a list of segments

Returns:

    IPv6SegmentRoutingHeader

See also:

IPv6
A default IPv6 layer instance

See also:

SRH (segs)
Create a Segment Routing Header from a list of segment

Parameters:

  • segs table a list of segments

Returns:

    IPv6SegmentRoutingHeader

See also:

TCP

TCP
A default TCP layer whose destination port is 80

See also:

nop ()
Construct a TCPOption NOP (padding, kind=1), shorthand for TCPOption:new_nop

Returns:

    TCPOption

See also:

eol ()
Construct a TCPOption EOL (padding, kind=0), shorthand for TCPOption:new_eol

Returns:

    TCPOption

See also:

sackp ()
Construct a TCPOption SACKP, shorthand for TCPOption:new_sackp

Returns:

    TCPOption

See also:

sack (list)
Construct a TCPOption SACK, shorthand for TCPOption:new_sack

Parameters:

  • list table of pairs of number, will attempt to group them 2-by-2 or flatten sublists

Returns:

    TCPOption

See also:

mss (the)
Construct a TCPOption MSS, shorthand for TCPOption:new_mss

Parameters:

  • the num mss size

Returns:

    TCPOption

See also:

wscale (the)
Construct a TCPOption WScale, shorthand for TCPOption:new_wscale

Parameters:

  • the num wscale shift value

Returns:

    TCPOption

See also:

mpcapable ([arg])
Construct a TCPOption MPCapable, shorthand for TCPOption:new_mpcapable

Parameters:

Returns:

    TCPOption

See also:

mpjoin ([arg])
Construct a TCPOption MPJoin, shorthand for TCPOption:new_mpjoin

Parameters:

Returns:

    TCPOption

See also:

NOP
A default TCP NOP object

See also:

EOL
A default TCPOption EOL object

See also:

SACKP
A default TCPOption SACKPermitted object with proper padding

See also:

MSS
A TCP MSS object defaulting to 1460 bytes

See also:

SACK (list)
Construct a SACK Option block, with proper padding

Parameters:

Returns:

    TCPOption

See also:

WSCALE
A default TCPOption WScale object (14), with proper padding

See also:

MPCAPABLE
A default TCPOption MPCapable object

See also:

MPJOIN
A default TCPOption MPjoin object

See also:

edo ()
Construct a TCPOption EDO, shorthand for TCPEDO:new

Returns:

    TCPEDO

See also:

EDO
A TCPEDO option that will contain the header length field

See also:

EDOREQUEST
A TCPEDO option to be used during the handshake negociation, requires padding (length is 2 bytes)

See also:

EDOEXT
A TCPEDO option containing the header length and the segment length, requires padding (length is 6 bytes)

See also:

timestamp ([arg])
Construct a TCPOption Timestamp, shorthand for TCPTimestamp:new

Parameters:

Returns:

    TCPTimestamp

See also:

TS
A default TCP Timestamp object

See also:

tfo ([cookie])
Construct a TCPOption TFO, shorthand for TCPTFO:new

Parameters:

  • cookie table (optional)

Returns:

    TCPTFO

See also:

TFO
A default TCP TFO object

See also:

TCP
A default TCP layer whose destination port is 80

See also:

nop ()
Construct a TCPOption NOP (padding, kind=1), shorthand for TCPOption:new_nop

Returns:

    TCPOption

See also:

eol ()
Construct a TCPOption EOL (padding, kind=0), shorthand for TCPOption:new_eol

Returns:

    TCPOption

See also:

sackp ()
Construct a TCPOption SACKP, shorthand for TCPOption:new_sackp

Returns:

    TCPOption

See also:

sack (list)
Construct a TCPOption SACK, shorthand for TCPOption:new_sack

Parameters:

  • list table of pairs of number, will attempt to group them 2-by-2 or flatten sublists

Returns:

    TCPOption

See also:

mss (the)
Construct a TCPOption MSS, shorthand for TCPOption:new_mss

Parameters:

  • the num mss size

Returns:

    TCPOption

See also:

wscale (the)
Construct a TCPOption WScale, shorthand for TCPOption:new_wscale

Parameters:

  • the num wscale shift value

Returns:

    TCPOption

See also:

mpcapable ([arg])
Construct a TCPOption MPCapable, shorthand for TCPOption:new_mpcapable

Parameters:

Returns:

    TCPOption

See also:

mpjoin ([arg])
Construct a TCPOption MPJoin, shorthand for TCPOption:new_mpjoin

Parameters:

Returns:

    TCPOption

See also:

NOP
A default TCP NOP object

See also:

EOL
A default TCPOption EOL object

See also:

SACKP
A default TCPOption SACKPermitted object with proper padding

See also:

MSS
A TCP MSS object defaulting to 1460 bytes

See also:

SACK (list)
Construct a SACK Option block, with proper padding

Parameters:

Returns:

    TCPOption

See also:

WSCALE
A default TCPOption WScale object (14), with proper padding

See also:

MPCAPABLE
A default TCPOption MPCapable object

See also:

MPJOIN
A default TCPOption MPjoin object

See also:

edo ()
Construct a TCPOption EDO, shorthand for TCPEDO:new

Returns:

    TCPEDO

See also:

EDO
A TCPEDO option that will contain the header length field

See also:

EDOREQUEST
A TCPEDO option to be used during the handshake negociation, requires padding (length is 2 bytes)

See also:

EDOEXT
A TCPEDO option containing the header length and the segment length, requires padding (length is 6 bytes)

See also:

timestamp ([arg])
Construct a TCPOption Timestamp, shorthand for TCPTimestamp:new

Parameters:

Returns:

    TCPTimestamp

See also:

TS
A default TCP Timestamp object

See also:

tfo ([cookie])
Construct a TCPOption TFO, shorthand for TCPTFO:new

Parameters:

  • cookie table (optional)

Returns:

    TCPTFO

See also:

TFO
A default TCP TFO object

See also:

UDP

UDP
A default UDP layer whose destination port is 53

See also:

UDP
A default UDP layer whose destination port is 53

See also:

TbxSniffer

snif (key, cb)
Create a TbxSniffer and start sniffing immediately

Parameters:

  • key table the Sniffing key
  • cb function the callback function

See also:

snif (key, cb)
Create a TbxSniffer and start sniffing immediately

Parameters:

  • key table the Sniffing key
  • cb function the callback function

See also:

Set of functions to help debugging the bindings

random ([UB])
Return a random number between 0 (inclusive) and the given bound (exclusive) if any

Parameters:

  • UB num (optional)

Returns:

    num n

Debugging

__dump_c_stack ()
Return a string containing the content of the lua C stack

Returns:

    string the content of the C stack
generated by LDoc 1.4.6 Last updated 2017-10-04 11:48:45