pgen_ip class can analyze IP packet, inheriting pgen_eth class. More IP’s information, please see RFC719 and IP(wikipedia).


Packet Format


Member Variable

  • can’t use         Version
  • IP.hlen            Header length
  • IP.tos               Type of Service
  • IP.tot_len       Total Length
  •                 Identification
  • can’t use         Flags
  • IP.frag_off     Fragment Offset
  • IP.ttl                Time to Live
  • IP.protocol     Protocol
  • IP.check         Header Checksum
  • IP.src               Source Address
  • IP.dst               Destination Address
  • can’t use         Options
  • can’t use         Padding


Sample Code


This is execution result.


Comments are closed.