Lines Matching defs:nat
145 nat_t *nat;
149 nat = &ns.ipn_nat;
150 nat->nat_p = IPPROTO_TCP;
151 nat->nat_dir = NAT_OUTBOUND;
153 strncpy(nat->nat_ifnames[0], extif,
154 sizeof(nat->nat_ifnames[0]));
155 strncpy(nat->nat_ifnames[1], extif,
156 sizeof(nat->nat_ifnames[1]));
157 nat->nat_ifnames[0][sizeof(nat->nat_ifnames[0]) - 1] = '\0';
158 nat->nat_ifnames[1][sizeof(nat->nat_ifnames[1]) - 1] = '\0';
182 nat->nat_inip = usin.sin_addr;
183 nat->nat_outip = nlp->nl_outip;
184 nat->nat_oip = nlp->nl_realip;
187 sum2 = LONG_SUM(ntohl(nat->nat_outip.s_addr)) + ntohs(nlp->nl_outport);
189 nat->nat_sumd[0] = (sumd & 0xffff) + (sumd >> 16);
190 nat->nat_sumd[1] = nat->nat_sumd[0];
193 sum2 = LONG_SUM(ntohl(nat->nat_outip.s_addr));
195 nat->nat_ipsumd = (sumd & 0xffff) + (sumd >> 16);
197 nat->nat_inport = usin.sin_port;
198 nat->nat_outport = nlp->nl_outport;
199 nat->nat_oport = nlp->nl_realport;
201 nat->nat_flags = IPN_TCPUDP;