Lines Matching refs:is1
166 static int ipf_state_match(ipstate_t *is1, ipstate_t *is2);
167 static int ipf_state_matchaddresses(ipstate_t *is1, ipstate_t *is2);
168 static int ipf_state_matchipv4addrs(ipstate_t *is1, ipstate_t *is2);
169 static int ipf_state_matchipv6addrs(ipstate_t *is1, ipstate_t *is2);
170 static int ipf_state_matchisps(ipstate_t *is1, ipstate_t *is2);
171 static int ipf_state_matchports(udpinfo_t *is1, udpinfo_t *is2);
1138 /* Parameters: is1, is2 pointers to states we are checking */
1144 ipf_state_matchipv4addrs(ipstate_t *is1, ipstate_t *is2)
1148 if (is1->is_saddr == is2->is_saddr && is1->is_daddr == is2->is_daddr)
1150 else if (is1->is_saddr == is2->is_daddr &&
1151 is1->is_daddr == is2->is_saddr) {
1153 rv = (is1->is_p == IPPROTO_ICMP) ? 2 : 1;
1166 /* Parameters: is1, is2 pointers to states we are checking */
1172 ipf_state_matchipv6addrs(ipstate_t *is1, ipstate_t *is2)
1176 if (IP6_EQ(&is1->is_src, &is2->is_src) &&
1177 IP6_EQ(&is1->is_dst, &is2->is_dst))
1179 else if (IP6_EQ(&is1->is_src, &is2->is_dst) &&
1180 IP6_EQ(&is1->is_dst, &is2->is_src)) {
1182 rv = (is1->is_p == IPPROTO_ICMPV6) ? 2 : 1;
1194 /* Parameters: is1, is2 pointers to states we are checking */
1202 /* is1->src = 1.1.1.1 */
1203 /* is1->dst = 1.1.1.2 */
1205 /* retreives is1 record created by first packat and compares it with is2 */
1213 /* identical arguments (i.e. ipf_matchaddress(is1, is1) would return 2 */
1216 ipf_state_matchaddresses(ipstate_t *is1, ipstate_t *is2)
1220 if (is1->is_v == 4) {
1221 rv = ipf_state_matchipv4addrs(is1, is2);
1224 rv = ipf_state_matchipv6addrs(is1, is2);
1259 /* Parameters: is1, is2 - states we want to match */
1264 ipf_state_matchisps(ipstate_t *is1, ipstate_t *is2)
1268 if (is1->is_p == is2->is_p) {
1269 switch (is1->is_p)
1275 rv = ipf_state_matchports(&is1->is_ps.is_us,
1282 if (bcmp(&is1->is_ps, &is2->is_ps,
1304 /* Parameters: is1, is2 - states we want to match */
1308 ipf_state_match(ipstate_t *is1, ipstate_t *is2)
1314 if (bcmp(&is1->is_pass, &is2->is_pass,
1318 pomatch = ipf_state_matchisps(is1, is2);
1319 amatch = ipf_state_matchaddresses(is1, is2);