阅读:1150回复:0
大牛们请帮我注释一下下面的几句代码是什么意思,谢谢了
if(aux->ipf.protocol == 0 || ipp->protocol == aux->ipf.protocol)
{ retTraffic = FALSE; if(aux->ipf.sourceIp != 0 && (ipp->source & aux->ipf.sourceMask) != aux->ipf.sourceIp) { // For tcp packets of accepted conexions, pass packets in both directions. if(ipp->protocol == IPPROTO_TCP) { // TCP rules! if(((tcph->flags & TH_SYN) != TH_SYN) || ((tcph->flags & (TH_SYN | TH_ACK)) == (TH_SYN | TH_ACK))) { if((ipp->destination & aux->ipf.sourceMask) == aux->ipf.sourceIp) { retTraffic = TRUE; } } } if(retTraffic != TRUE) { aux=aux->next; countRule++; continue; } } if(!retTraffic) { if(aux->ipf.destinationIp != 0 && (ipp->destination & aux->ipf.destinationMask) != aux->ipf.destinationIp) { aux=aux->next; countRule++; continue; } } |
|