exchanger.h

来自「把文本文件转换成ethereal数据文件」· C头文件 代码 · 共 42 行

H
42
字号
#include "stdio.h"
#include "string.h"
#include "iostream.h"


#ifndef EXCHANGE_H
#define EXCHANGE_H

#define	PCAP_MAGIC			0xa1b2c3d4

typedef struct _pcap_hdr 
{
	int magic;		    /* magic number */
	unsigned short	version_major;	/* major version number */
	unsigned short	version_minor;	/* minor version number */
	int	thiszone;	    /* GMT to local correction */
	int	sigfigs;	    /* accuracy of timestamps */
	int	snaplen;	    /* max length of captured packets, in octets */
	int	network;	    /* data link type */

} pcap_hdr;

class Exchanger
{
public :
    Exchanger(){};

	int initlize(char *src, char *tag);

	int process();

    void toEtherealCapFile();
//	void initializeCapHeader();

private:
    pcap_hdr hdr;
    FILE     *m_pSourceFile;
    FILE     *m_pTargetFile;
};

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?