Network Layer Decodes

Class Internet

'Internet' is not a user-accessible class - you can't create an Internet object.  Rather, it's a parent for the IP, IP6, TCP, UDP and ICMP classes, providing access to the fields in an IP or IP6 header.


Instance Variables
ethertype internet.ethertype -> anInteger
Ethertype for the packet that contained this object
version internet.version -> anInteger
IP version: 4 for IPv4, 6 for IPv6
proto internet.proto -> anInteger
IP Protocol, e.g. 6 = TCP, 17 = UDP, 1 = ICMP
traffic_class internet.traffic_class -> anInteger
Originally IPv4 Type-Of-Service, now used for DSCP and ECN.  Traffic Class is its IPv6 name
hop_limit internet.hop_limit -> anInteger
Max number of hops IP packet can pass through. IPv4 used its 'Time to Live' (TTL) field in the same way
pkt_len internet.pkt_len -> anInteger
Total Length of IPv4 packet, nil for an IPv6 packet
hdr_len ip.pkt_len -> anInteger
IPv4 Header Length in 4-byte units, nil for an IPv6 packet
src_prefix ip.src_prefix -> anIPprefix
IP source address (see IPprefix page for details)
dst_prefix ip.dst_prefix -> anIPprefix
IP destination address (see IPprefix page for details)

Nevil Brownlee
Thu, 20 Nov 08 (CST)