File: contrib/messages/NetwPkt.msg
A basic network layer message definition
subclass if you want to create your own network layer message class
The basic network packet contains a destination and source network address. Additionally a time to live (ttl) field can be defined in order to limit the maximum number of hops the messge will travel. The sequence number is guranteed to be unique for all packets generated by one host
Author: Daniel Willkomm
The following diagram shows part of the inheritance hierarchy. Unresolved types are missing from the diagram. Click here to see the full picture.
Name | Type | Description |
---|---|---|
destAddr | int | destination address |
srcAddr | int | source address |
ttl | int | time to live field (IP) |
seqNum | unsigned long | sequence number |
message NetwPkt { fields: int destAddr; // destination address int srcAddr; // source address int ttl = 1; // time to live field (IP) unsigned long seqNum = 0; // sequence number }