VC 编写 防火墙 源代码,
注解非常详细
inFilter.dwFilterFlags = FD_FLAGS_NOSYN; //一直添这个值
inFilter.dwRule = 0; //一直添这个值
inFilter.pfatType = PF_IPV4; //用 ipV4 地址
inFilter.SrcAddr = localIp; //设置本地IP地址
inFilter.wSrcPort = FILTER_TCPUDP_PORT_ANY; //任意来源端口
inFilter.wSrcPortHighRange = FILTER_TCPUDP_PORT_ANY;
inFilter.DstAddr = 0; //任意目标地址
inFilter.DstMask = 0;
inFilter.wDstPort = FILTER_TCPUDP_PORT_ANY; //任意目标端口
inFilter.wDstPortHighRange =FILTER_TCPUDP_PORT_ANY;
inFilter.dwProtocol = FILTER_PROTO_TCP; // 过滤的协议,可选FILTER_PROTO_ICMP
// 加入一个过滤接口
1