Embedded Python Real-Time FrameWork : API  Build 20250616.1
 All Classes Namespaces Files Functions Variables Pages
pyRT.gatea.net.pcap Namespace Reference

pcap File / Record Header Cracker More...

Classes

class  FileHdr
 print( 'magic=%02x; compr=d; Time=d' % ( magic, compr, tm ) ) More...
 
class  PktHdr
 benop-byte network packet header : ethernet / ip / udp More...
 
class  RecHdr
 16-byte pcap Record / packet Header from following struct: More...
 

Functions

def IsGzip
 Return True if this is the gzip header string. More...
 

Detailed Description

pcap File / Record Header Cracker

Function Documentation

def pyRT.gatea.net.pcap.IsGzip (   map)

Return True if this is the gzip header string.

Valid gzip file has the following 10-byte header:

  1. 2-byte Magic number = 0x8b1f (network byte order)
  2. 1-byte compression method (08 for DEFLATE)
  3. 1-byte header flags
  4. 4-byte Unix Timestamp
Parameters
map- 1st 10 bytes of mapped in file
Returns
True if mapped