ifh.h

来自「简单实现网路数据的过滤」· C头文件 代码 · 共 25 行

H
25
字号
#ifndef __IFH_H__
#define __IFH_H__

#define DD_DEVICE_NAME				L"\\Device\\IpFilterHook"
#define DD_SYMBOL_NAME				L"\\DosDevices\\IpFilterHook"

typedef struct IPHeader {
    UCHAR     iph_verlen;     // Version and length 
    UCHAR     iph_tos;        // Type of service 
    USHORT    iph_length;     // Total datagram length 
    USHORT    iph_id;         // Identification 
    USHORT    iph_offset;     // Flags, fragment offset 
    UCHAR     iph_ttl;        // Time to live 
    UCHAR     iph_protocol;   // Protocol 
    USHORT    iph_xsum;       // Header checksum 
    ULONG     iph_src;        // Source address 
    ULONG     iph_dest;       // Destination address 
} IPHeader; 

// Protocol IDs copied from winsock2.h
#define IPPROTO_ICMP                       1
#define IPPROTO_TCP                        6
#define IPPROTO_UDP                       17

#endif	/* __IFH_H__ */

⌨️ 快捷键说明

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