Lines Matching defs:nflags
3067 u_int nflags;
3085 nflags = np->in_flags & flags;
3086 nflags &= NAT_FROMRULE;
3152 natl = ipf_nat_outlookup(fin, nflags, (u_int)fin->fin_p,
3165 natl = ipf_nat_inlookup(fin, nflags, (u_int)fin->fin_p,
3708 /* nflags(I) - NAT flags for this packet */
3718 ipf_nat_icmperror(fr_info_t *fin, u_int *nflags, int dir)
3749 *nflags = IPN_ICMPERR;
4016 /* THIS FUNCTION IS CALLED WITH NAT_SEARCH SET IN nflags. */
4030 int nflags;
4189 nflags = nat->nat_flags;
4190 if (!(nflags & (NAT_TCPUDP|SI_WILDP)))
4193 if (ipf_nat_wildok(nat, (int)sport, (int)dport, nflags,
4197 if ((nflags & SI_CLONE) != 0) {
4345 /* THIS FUNCTION IS CALLED WITH NAT_SEARCH SET IN nflags. */
4785 u_int nflags = 0;
4822 nflags = IPN_TCP;
4825 nflags = IPN_UDP;
4833 nflags = IPN_ICMPQUERY;
4839 if ((nflags & IPN_TCPUDP))
4847 if ((fin->fin_p == IPPROTO_ICMP) && !(nflags & IPN_ICMPQUERY) &&
4848 (nat = ipf_nat_icmperror(fin, &nflags, NAT_OUTBOUND)))
4852 else if ((nat = ipf_nat_outlookup(fin, nflags|NAT_SEARCH,
4855 nflags = nat->nat_flags;
4877 !(np->in_flags & nflags))
4924 nat = ipf_nat_add(fin, np, NULL, nflags, NAT_OUTBOUND);
4939 rval = ipf_nat_out(fin, nat, natadd, nflags);
4983 /* nflags(I) - NAT flags set for this packet */
4988 ipf_nat_out(fr_info_t *fin, nat_t *nat, int natadd, u_32_t nflags)
5013 if (nflags == IPN_ICMPERR) {
5161 nflags &= ~IPN_TCPUDPICMP;
5173 if ((nat->nat_nsport != 0) && (nflags & IPN_TCPUDP)) {
5194 if ((nat->nat_oicmpid != 0) && (nflags & IPN_ICMPQUERY)) {
5208 csump = ipf_nat_proto(fin, nat, nflags);
5274 u_int nflags, natadd;
5298 nflags = 0;
5306 nflags = IPN_TCP;
5309 nflags = IPN_UDP;
5319 nflags = IPN_ICMPQUERY;
5326 if ((nflags & IPN_TCPUDP)) {
5336 if ((fin->fin_p == IPPROTO_ICMP) && !(nflags & IPN_ICMPQUERY) &&
5337 (nat = ipf_nat_icmperror(fin, &nflags, NAT_INBOUND)))
5341 else if ((nat = ipf_nat_inlookup(fin, nflags|NAT_SEARCH,
5344 nflags = nat->nat_flags;
5366 if ((np->in_flags & IPN_RF) && !(np->in_flags & nflags))
5415 nat = ipf_nat_add(fin, np, NULL, nflags, NAT_INBOUND);
5430 rval = ipf_nat_in(fin, nat, natadd, nflags);
5474 /* nflags(I) - NAT flags set for this packet */
5480 ipf_nat_in(fr_info_t *fin, nat_t *nat, int natadd, u_32_t nflags)
5607 nflags &= ~IPN_TCPUDPICMP;
5637 nflags &= ~IPN_TCPUDPICMP;
5645 if (nflags & IPN_TCPUDP)
5651 if ((nat->nat_odport != 0) && (nflags & IPN_TCPUDP)) {
5671 if ((nat->nat_oicmpid != 0) && (nflags & IPN_ICMPQUERY)) {
5685 csump = ipf_nat_proto(fin, nat, nflags);
5713 /* nflags(I) - NAT flags set for this packet */
5721 ipf_nat_proto(fr_info_t *fin, nat_t *nat, u_int nflags)
5740 if ((nflags & IPN_TCP) != 0)
5755 if ((nflags & IPN_UDP) != 0) {
5764 if ((nflags & IPN_ICMPQUERY) != 0) {
5777 if ((nflags & IPN_ICMPQUERY) != 0) {
8230 int nflags;
8236 nflags = IPN_TCP;
8239 nflags = IPN_UDP;
8242 nflags = 0;
8249 nat = ipf_nat_outlookup(fin, nflags, (u_int)fin->fin_p,
8252 nat = ipf_nat_inlookup(fin, nflags, (u_int)fin->fin_p,