Skip to content
Daniel Zappala edited this page Mar 19, 2014 · 3 revisions

A packet represents an IP packet in the network simulation. It contains a source address and port, destination address and port, identifier, protocol field, length, and the body of the packet.

To create a Packet(), call:

Packet(source_address,source_port,destination_address,destination_port,ident,ttl,protocol,body,length)

The source and destination addresses, as well as the source and destination ports, are integers. The identifier is an integer that can be used for debugging. The TTL is an integer, specifying the maximum number of hops the packet can be sent before it must be drop. The protocol is a string that specifies which handler to call in the destination node's protocol table. The body is a string and the length is an integer that represents the length of the packet in bytes.

The packet also contains some fields that can be used for measurements.

Clone this wiki locally