Lines Matching refs:is1

877 static int fr_match_ipv4addrs(is1, is2)
878 ipstate_t *is1;
883 if (is1->is_saddr == is2->is_saddr && is1->is_daddr == is2->is_daddr)
885 else if (is1->is_saddr == is2->is_daddr &&
886 is1->is_daddr == is2->is_saddr)
902 static int fr_match_ipv6addrs(is1, is2)
903 ipstate_t *is1;
908 if (IP6_EQ(&is1->is_src, &is2->is_src) &&
909 IP6_EQ(&is1->is_dst, &is2->is_dst))
911 else if (IP6_EQ(&is1->is_src, &is2->is_dst) &&
912 IP6_EQ(&is1->is_dst, &is2->is_src)) {
925 /* Parameters: is1, is2 pointers to states we are checking */
930 static int fr_match_addresses(is1, is2)
931 ipstate_t *is1;
936 if (is1->is_v == 4) {
937 rv = fr_match_ipv4addrs(is1, is2);
939 rv = fr_match_ipv6addrs(is1, is2);
978 /* Parameters is1, is2 - states we want to match */
983 static int fr_match_l4_hdr(is1, is2)
984 ipstate_t *is1;
991 if (is1->is_p != is2->is_p)
994 switch (is1->is_p) {
996 pp1.pp_sport = is1->is_ps.is_ts.ts_sport;
997 pp1.pp_dport = is1->is_ps.is_ts.ts_dport;
1003 pp1.pp_sport = is1->is_ps.is_us.us_sport;
1004 pp1.pp_dport = is1->is_ps.is_us.us_dport;
1011 pp1.pp_sport = is1->is_ps.is_ug.gs_call[0];
1012 pp1.pp_dport = is1->is_ps.is_ug.gs_call[1];
1019 if (bcmp(&is1->is_ps, &is2->is_ps, sizeof (icmpinfo_t)))
1034 /* Parameters is1, is2 - states we want to match */
1042 /* L4 (ports). There are three possible relationships betwee is1, is2: */
1043 /* - no match (match(is1, is2) == 0)) */
1045 /* directions (1) (fr_match_xxxx(is1, is2) == 1) */
1047 /* (2) (fr_match_xxxx(is1, is2) == 2) */
1049 /* There are functions, which match match addresses (L3 header) in is1, is2 */
1051 /* the is1 and is2 are same (identical) if there is a match */
1052 /* (fr_match_l4_hdr(is1, is2) != 0) and matchlevels are same for entries */
1053 /* (fr_match_l3_hdr(is1, is2) == fr_match_l4_hdr(is1, is2)) for is1, is2. */
1061 /* to connection B. Assume there are two entries is1, is2. is1 has been */
1067 /* fr_match_l3_hdr(is1, is2) == 2 -> strong match, while */
1068 /* fr_match_l4_hdr(is1, is2) == 1 -> weak match. Since match levels are */
1072 static int fr_matchstates(is1, is2)
1073 ipstate_t *is1;
1080 if (bcmp(&is1->is_pass, &is2->is_pass,
1084 pmatch = fr_match_l4_hdr(is1, is2);
1085 amatch = fr_match_addresses(is1, is2);
1090 * is1 and is2 belong to different sessions.