43 lines
1.0 KiB
C
43 lines
1.0 KiB
C
|
#ifndef _RAWSOCKET_H_
|
|||
|
#define _RAWSOCKET_H_
|
|||
|
|
|||
|
/*
|
|||
|
ע<EFBFBD>⣺
|
|||
|
ͷ<EFBFBD>ļ<EFBFBD>.hֻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD>ͷ<EFBFBD>ļ<EFBFBD><EFBFBD>ﶨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD>Ȼ#ifndef .. #define ...#endif û<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŷ^_^
|
|||
|
*/
|
|||
|
|
|||
|
#include <stdio.h>
|
|||
|
#include <WinSock2.h>
|
|||
|
#include <ws2tcpip.h>
|
|||
|
#include <mstcpip.h>
|
|||
|
#include "PacketStruct.h"
|
|||
|
#pragma comment(lib, "ws2_32.lib")
|
|||
|
#include <stdarg.h> // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA>ͷ<EFBFBD>ļ<EFBFBD>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
typedef struct _HOSTIP
|
|||
|
{
|
|||
|
int iLen;
|
|||
|
char szIPArray[10][50];
|
|||
|
}HOSTIP;
|
|||
|
|
|||
|
extern SOCKET g_RawSocket;
|
|||
|
extern HOSTIP g_HostIp;
|
|||
|
extern BOOL g_bStopRecv;
|
|||
|
|
|||
|
void ShowError(char *lpszText);
|
|||
|
BOOL InitRawSocket();
|
|||
|
BOOL ReceivePacket();
|
|||
|
BOOL ReceivePacket_Print();
|
|||
|
BOOL ExitRawSocket();
|
|||
|
void AnalyseRecvPacket(BYTE *lpBuf);
|
|||
|
void AnalyseRecvPacket_All(BYTE *lpBuf);
|
|||
|
void AnalyseRecvPacket_UDP(BYTE *lpBuf);
|
|||
|
void AnalyseRecvPacket_TCP(BYTE *lpBuf);
|
|||
|
void PrintData(BYTE *lpBuf, int iLen, int iPrintType);
|
|||
|
void MyPrintf(const char * _Format, ...); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
void SaveToFile(char *lpszFileName, char *lpBuf);
|
|||
|
|
|||
|
|
|||
|
#endif
|