rem: ret=comp_ip(ip, param, EQUAL_OP, subtype);
add: ret=comp_ip(EQUAL_OP, ip, rtype, r);
context: inline static int comp_ip(struct ip_addr* ip, void* param, int op, int subtype){	struct hostent* he;	char ** h;	int ret;	str tmp;	ret=-1;	switch(subtype){		case NET_ST:			switch(op){				case EQUAL_OP:					ret=(matchnet(ip, (struct net*) param)==1);					break;				case DIFF_OP:					ret=(matchnet(ip, (struct net*) param)!=1);					break;				default:					goto error_op;			}			break;		case STRING_ST:		case RE_ST:			switch(op){				case EQUAL_OP:				case MATCH_OP:					/* 1: compare with ip2str*/					ret=comp_str(ip_addr2a(ip), param, op, subtype);					if (ret==1) break;					/* 2: resolve (name) & compare w/ all the ips */					if (subtype==STRING_ST){						he=resolvehost((char*)param);						if (he==0){							DBG("comp_ip: could not resolve %s\n",									(char*)param);						}else if (he->h_addrtype==ip->af){							for(h=he->h_addr_list;(ret!=1)&& (*h); h++){								ret=(memcmp(ip->u.addr, *h, ip->len)==0);							}							if (ret==1) break;						}					}					/* 3: (slow) rev dns the address					* and compare with all the aliases					* !!??!! review: remove this? */					he=rev_resolvehost(ip);					if (he==0){						print_ip( "comp_ip: could not rev_resolve ip address:"									" ", ip, "\n");					ret=0;					}else{						/*  compare with primary host name */						ret=comp_str(he->h_name, param, op, subtype);						/* compare with all the aliases */						for(h=he->h_aliases; (ret!=1) && (*h); h++){							ret=comp_str(*h, param, op, subtype);						}					}					break;				case DIFF_OP:					ret=comp_ip(ip, param, EQUAL_OP, subtype);					if (ret>=0) ret=!ret;					break;				default:					goto error_op;			}			break;		case MYSELF_ST: /* check if it's one of our addresses*/			tmp.s=ip_addr2a(ip);			tmp.len=strlen(tmp.s);			ret=check_self_op(op, &tmp, 0);			break;		default:			LOG(L_CRIT, "BUG: comp_ip: invalid type for "						" src_ip or dst_ip (%d)\n", subtype);			ret=-1;	}	return ret;error_op:	LOG(L_CRIT, "BUG: comp_ip: invalid operator %d\n", op);	return -1;	}