Class IP

The IP Layer, inherits from Base_Object

Tables

IP.new_args Constructor arguments

Methods

IP:new ([args]) Constructor for an IP Layer
IP:payloadlen () Return the number of bytes after the IP header
IP:source ([source]) Get/Set the IP source address
IP:dest ([dest]) Get/Set the IP destination address
IP:flags (flags) Set the IP flags
IP:fragoffset (offset) Set the IP fragment offset
IP:ttl (tll) Set the IP TTL
IP:id (id) Set the IP Identification
IP:dscp (dscp) Set the IP DSCP
IP:ecn (ecn) Set the IP ECN


Tables

IP.new_args
Constructor arguments

Fields:

  • dst string the IP dst
  • id num the IP identifier
  • flags num the IP flags
  • ttl num the IP TTL
  • offset num the IP fragment offset
  • ecn num the IP ecn flag
  • dscp num the IP dscp byte
  • proto num the IP protocol number

Methods

IP:new ([args])
Constructor for an IP Layer

Parameters:

  • args table arguments, all grouped inside a table, see new_args (optional)

Returns:

    IP a new IP object

Usage:

     IP.new{
    	dst="8.8.8.8,
    	proto=17,
    	tll=64
     }
IP:payloadlen ()
Return the number of bytes after the IP header

Returns:

    num bytes
IP:source ([source])
Get/Set the IP source address

Parameters:

  • source string set the IP source address to source (optional)

Returns:

    string source
IP:dest ([dest])
Get/Set the IP destination address

Parameters:

  • dest string set the IP destination address to dest (optional)

Returns:

    string dest
IP:flags (flags)
Set the IP flags

Parameters:

  • flags num
IP:fragoffset (offset)
Set the IP fragment offset

Parameters:

  • offset num
IP:ttl (tll)
Set the IP TTL

Parameters:

  • tll num
IP:id (id)
Set the IP Identification

Parameters:

  • id num
IP:dscp (dscp)
Set the IP DSCP

Parameters:

  • dscp num
IP:ecn (ecn)
Set the IP ECN

Parameters:

  • ecn num
generated by LDoc 1.4.3 Last updated 2015-05-04 17:26:47