IT/System & Network
pcap 파일의 구조
Hotman
2012. 1. 25. 09:29
struct pcap_file_header{ bpf_u_int32 magic; // 고정 값 0xa1b2c3d4 u_short version_major; // 패킷 파일 포맷 버전 u_short version_minor; // 패킷 파일 포맷 버전 bpf_int32 thiszone; // 시간 관련 bpf_u_int32 sigflgs; // bpf_u_int32 snaplen; // 캡쳐된 패킷 길이 bpf_u_int32 linktype; // 데이터 링크 타입 };- pcap 파일 헤더 구조체 -
typedef struct pcaprec_hdr_s{ guint32 ts_secc; // timestamp seconds guint32 ts_usec; // timestamp microseconds guint32 incl_len; // number of octets of packet saved in file guint32 orig_len; // actual length of packet }pcaprec_hdr_t;- pcap 레코드 헤더 구조체 -