IP_PATTERN結構 (traffic.h)
IP_PATTERN結構會套用IP通訊協定的特定模式或對應的遮罩。 IP_PATTERN結構指定是由應用封包篩選器中的流量控制介面所使用。
語法
typedef struct _IP_PATTERN {
ULONG Reserved1;
ULONG Reserved2;
ULONG SrcAddr;
ULONG DstAddr;
union {
struct {
USHORT s_srcport;
USHORT s_dstport;
} S_un_ports;
struct {
UCHAR s_type;
UCHAR s_code;
USHORT filler;
} S_un_icmp;
ULONG S_Spi;
} S_un;
UCHAR ProtocolId;
UCHAR Reserved3[3];
} IP_PATTERN, *PIP_PATTERN;
成員
Reserved1
保留供未來使用。
Reserved2
保留供未來使用。
SrcAddr
來源位址。
DstAddr
目的地位址。
S_un
S_un.S_un_ports
S_un_ports.s_srcport,s_dstport
來源埠和目的地埠。
S_un.S_un_ports.s_srcport
S_un.S_un_ports.s_dstport
S_un.S_un_icmp
S_un_icmp.s_type,s_code
ICMP 訊息類型和ICMP訊息碼。
S_un.S_un_icmp.s_type
S_un.S_un_icmp.s_code
S_un.S_un_icmp.filler
S_un.S_Spi
服務提供者介面。
ProtocolId
通訊協議標識碼。
Reserved3[3]
保留供未來使用。
備註
在 Traffic.h 中定義下列宏,可讓您更輕鬆地參考聯集的成員:
#define tcSrcPort S_un.S_un_ports.s_srcport
#define tcDstPort S_un.S_un_ports.s_dstport
#define tcIcmpType S_un.S_un_icmp.s_type
#define tcIcmpCode S_un.S_un_icmp.s_code
#define tcSpi S_un.S_Spi
規格需求
需求 | 值 |
---|---|
最低支援的用戶端 | Windows 2000 Professional [僅限傳統型應用程式] |
最低支援的伺服器 | Windows 2000 Server [僅限桌面應用程式] |
標頭 | traffic.h |