/freebsd-13-stable/contrib/ipfilter/lib/ |
H A D | printactivenat.c | 20 printactivenat(nat, opts, ticks) 21 nat_t *nat; 26 PRINTF("%s", getnattype(nat)); 28 if (nat->nat_flags & SI_CLONE) 30 if (nat->nat_phnext[0] == NULL && nat->nat_phnext[1] == NULL) 34 if (nat->nat_redir & NAT_REWRITE) { 35 printactiveaddress(nat->nat_v[0], "%-15s", &nat->nat_osrc6, 36 nat [all...] |
H A D | getnattype.c | 19 * Get a nat filter type given its kernel address. 22 getnattype(nat) 23 nat_t *nat; 28 if (!nat) 31 switch (nat->nat_redir) 65 nat->nat_redir & 0xffffffff);
|
/freebsd-13-stable/contrib/ipfilter/tools/ |
H A D | ipnat_y.y | 46 static ipnat_t *nat = NULL; 131 while ((nat = nattop) != NULL) { 132 if (nat->in_v[0] == 0) 133 nat->in_v[0] = 4; 134 if (nat->in_v[1] == 0) 135 nat->in_v[1] = nat->in_v[0]; 136 nattop = nat->in_next; 137 err = (*nataddfunc)(natfd, natioctlfunc, nat); 138 free(nat); [all...] |
H A D | ipnat.c | 336 nat_t *np, nat; local 367 for (np = nsp->ns_instances; np; np = nat.nat_next) { 368 if (kmemcpy((char *)&nat, (long)np, sizeof(nat))) 370 if ((filter != NULL) && (nat_matcharray(&nat, filter) == 0)) 374 printnatfield(&nat, nat_fields[i].w_value); 380 printactivenat(&nat, opts, nsp->ns_ticks); 381 if (nat.nat_aps) { 384 if (nat.nat_dir & NAT_OUTBOUND) 385 proto = nat 532 nat_t nat; local [all...] |
H A D | ipfs.c | 158 nat_t *nat; local 168 nat = &ipn.ipn_nat; 169 if (nlen >= sizeof(nat->nat_ifnames[0]) || 170 olen >= sizeof(nat->nat_ifnames[0])) 181 if (!strncmp(nat->nat_ifnames[0], ifs, olen + 1)) { 182 strcpy(nat->nat_ifnames[0], s); 185 if (!strncmp(nat->nat_ifnames[1], ifs, olen + 1)) { 186 strcpy(nat->nat_ifnames[1], s); 556 nat_t *nat; local 571 perror("nat [all...] |
/freebsd-13-stable/sys/contrib/ipfilter/netinet/ |
H A D | ip_nat.c | 130 /* nat */ 470 "nat ipftq udp tab"); 474 "nat ipftq udpack tab"); 478 "nat icmp ipftq tab"); 482 "nat icmpack ipftq tab"); 486 "nat ip ipftq tab"); 489 IPFTQ_INIT(&softn->ipf_nat_pending, 1, "nat pending ipftq tab"); 508 MUTEX_INIT(&softn->ipf_nat_new, "ipf nat new mutex"); 509 MUTEX_INIT(&softn->ipf_nat_io, "ipf nat io mutex"); 1009 ipnat_t *nat, *n local 1703 nat_t *nat, *n; local 1799 nat_t *n, *nat; local 1933 nat_t *n, *nat; local 2450 nat_t *nat; local 2547 nat_t *nat; local 3095 nat_t *nat, *natl; local 3622 nat_t *nat; local 3781 nat_t *nat; local 4086 nat_t *nat; local 4420 nat_t *nat; local 4649 nat_t *nat; local 4858 nat_t *nat; local 5356 nat_t *nat; local 5943 nat_t *nat; local 6293 nat_t *nat; local 6604 nat_t *nat, *nextnat = NULL, zeronat; local 6751 nat_t *nat, **natp; local 7711 nat_t *nat, *natnext; local 8038 nat_t **newtab[2], *nat, **natp; local 8388 nat_t *nat; local [all...] |
H A D | ip_nat6.c | 446 /* nat(I) - pointer to NAT entry */ 456 ipf_nat6_newmap(fin, nat, ni) 458 nat_t *nat; 480 flags = nat->nat_flags; 511 nat->nat_hm = hm; 700 nat->nat_osrc6 = fin->fin_src6; 701 nat->nat_nsrc6 = in; 702 nat->nat_odst6 = fin->fin_dst6; 703 nat->nat_ndst6 = fin->fin_dst6; 704 if (nat 962 nat_t *nat, *natl; local 1397 nat_t *nat; local 1597 nat_t *nat; local 1914 nat_t *nat; local 2235 nat_t *nat; local 2466 nat_t *nat; local 2621 nat_t *nat; local 3020 nat_t *nat; local [all...] |
H A D | ip_rcmd_pxy.c | 68 ipf_p_rcmd_new(arg, fin, aps, nat) 72 nat_t *nat; 82 np = nat->nat_ptr; 94 ipn = ipf_proxy_rule_rev(nat); 144 ipf_p_rcmd_portmsg(fin, aps, nat) 147 nat_t *nat; 221 fi.fin_src6 = nat->nat_ndst6; 222 fi.fin_dst6 = nat->nat_nsrc6; 224 if (nat->nat_v[0] == 6) { 226 if (nat [all...] |
H A D | ip_tftp_pxy.c | 133 ipf_p_tftp_out(arg, fin, aps, nat) 137 nat_t *nat; 142 if (nat->nat_dir == NAT_OUTBOUND) 143 return ipf_p_tftp_client(softt, fin, aps, nat); 144 return ipf_p_tftp_server(softt, fin, aps, nat); 149 ipf_p_tftp_in(arg, fin, aps, nat) 153 nat_t *nat; 158 if (nat->nat_dir == NAT_INBOUND) 159 return ipf_p_tftp_client(softt, fin, aps, nat); 160 return ipf_p_tftp_server(softt, fin, aps, nat); [all...] |
H A D | ip_netbios_pxy.c | 70 ipf_p_netbios_out(arg, fin, aps, nat) 74 nat_t *nat; 83 nat = nat; /* LINT */
|
H A D | ip_pptp_pxy.c | 110 ipf_p_pptp_new(arg, fin, aps, nat) 114 nat_t *nat; 126 np = nat->nat_ptr; 129 if (ipf_nat_outlookup(fin, 0, IPPROTO_GRE, nat->nat_osrcip, 165 ipn->in_snip = ntohl(nat->nat_nsrcaddr); 167 ipn->in_dnip = ntohl(nat->nat_ndstaddr); 168 ipn->in_ndstaddr = nat->nat_ndstaddr; 170 ipn->in_osrcaddr = nat->nat_osrcaddr; 171 ipn->in_odstaddr = nat->nat_odstaddr; 194 ipf_p_pptp_donatstate(fin, nat, ppt [all...] |
H A D | ip_irc_pxy.c | 227 ipf_p_irc_new(arg, fin, aps, nat) 231 nat_t *nat; 242 nat = nat; /* LINT */ 253 ipf_p_irc_send(fin, nat) 255 nat_t *nat; 291 irc = nat->nat_aps->aps_data; 299 if (irc->irc_ipnum != ntohl(nat->nat_osrcaddr)) 399 nat2 = ipf_nat_outlookup(fin, IPN_TCP, nat->nat_pr[1], nat [all...] |
H A D | ip_ftp_pxy.c | 228 ipf_p_ftp_new(arg, fin, aps, nat) 232 nat_t *nat; 241 nat = nat; /* LINT */ 289 ipf_p_ftp_port(softf, fin, ip, nat, ftp, dlen) 293 nat_t *nat; 315 DT3(ftp_PORT_error_dlen, nat_t *, nat, ftpside_t *, f, 331 DT2(ftp_PORT_error_atoi_1, nat_t *, nat, ftpside_t *, f); 338 DT2(ftp_PORT_error_atoi_2, nat_t *, nat, ftpside_t *, f); 350 if (((nat [all...] |
H A D | ip_rpcb_pxy.c | 142 /* nat(I) - pointer to NAT session structure */ 147 ipf_p_rpcb_new(arg, fin, aps, nat) 151 nat_t *nat; 155 nat = nat; /* LINT */ 201 /* nat(I) - pointer to NAT session structure */ 207 ipf_p_rpcb_in(arg, fin, aps, nat) 211 nat_t *nat; 242 rv = ipf_p_rpcb_decodereq(fin, nat, rs, rm); 253 rv = ipf_p_rpcb_modreq(fin, nat, r [all...] |
H A D | ip_raudio_pxy.c | 53 ipf_p_raudio_new(arg, fin, aps, nat) 57 nat_t *nat; 61 nat = nat; /* LINT */ 80 ipf_p_raudio_out(arg, fin, aps, nat) 84 nat_t *nat; 94 nat = nat; /* LINT */ 184 ipf_p_raudio_in(arg, fin, aps, nat) 188 nat_t *nat; [all...] |
H A D | ip_ipsec_pxy.c | 133 ipf_p_ipsec_new(arg, fin, aps, nat) 137 nat_t *nat; 167 if (ipf_nat_outlookup(fin, 0, IPPROTO_ESP, nat->nat_nsrcip, 171 np = nat->nat_ptr; 202 ipn->in_snip = ntohl(nat->nat_nsrcaddr); 204 ipn->in_osrcip = nat->nat_osrcip; 206 ipn->in_nsrcip = nat->nat_nsrcip; 208 ipn->in_odstip = nat->nat_odstip; 210 ipn->in_ndstip = nat->nat_ndstip; 269 ipf_p_ipsec_inout(arg, fin, aps, nat) [all...] |
H A D | ip_proxy.c | 669 /* nat(I) - pointer to current NAT session */ 764 /* nat(I) - pointer to current NAT session */ 772 ipf_proxy_match(fin, nat) 774 nat_t *nat; 782 ipn = nat->nat_ptr; 785 (u_long)fin, (u_long)nat, (u_long)nat->nat_aps, 804 result = (*apr->apr_match)(fin, nat->nat_aps, nat); 819 /* nat( [all...] |
/freebsd-13-stable/tests/sys/netpfil/pf/ |
H A D | nat.sh | 44 vnet_mkjail nat ${epair_nat}b ${epair_echo}a 50 jexec nat ifconfig ${epair_nat}b 192.0.2.1/24 up 51 jexec nat ifconfig ${epair_echo}a 198.51.100.1/24 up 52 jexec nat sysctl net.inet.ip.forwarding=1 58 jexec nat pfctl -e 59 pft_set_rules nat \ 60 "nat pass on ${epair_echo}a inet from 192.0.2.0/24 to any -> (${epair_echo}a) port 30000:30001 sticky-address" 74 timeout 2 jexec nat pfctl -sa
|
/freebsd-13-stable/contrib/ipfilter/samples/ |
H A D | proxy.c | 145 nat_t *nat; local 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 [all...] |
/freebsd-13-stable/tests/sys/netpfil/common/ |
H A D | nat.sh | 49 vnet_mkjail nat ${epair_host_nat}b ${epair_client1_nat}a ${epair_client2_nat}a 54 jexec nat ifconfig ${epair_host_nat}b 198.51.100.1/24 up 56 jexec nat ifconfig ${epair_client1_nat}a 192.0.2.1/24 up 59 jexec nat ifconfig ${epair_client2_nat}a 192.0.3.1/24 up 62 jexec nat sysctl net.inet.ip.forwarding=1 71 firewall_config nat ${firewall} \ 73 "nat pass on ${epair_host_nat}b inet from any to any -> (${epair_host_nat}b)" \ 75 "ipfw -q nat 123 config if ${epair_host_nat}b" \ 76 "ipfw -q add 1000 nat 123 all from any to any" \ 112 vnet_mkjail nat [all...] |
H A D | Makefile | 10 nat \
|
/freebsd-13-stable/contrib/netbsd-tests/ipf/ |
H A D | t_pools.sh | 46 if [ -f $(atf_get_srcdir)/regress/$1.nat ] ; then 47 cp $(atf_get_srcdir)/regress/$1.nat nat 53 if [ -f nat ] ; then 54 atf_check -o save:out ipftest -RD -b -P pool -N nat -i in
|
/freebsd-13-stable/sbin/ipfw/ |
H A D | Makefile | 7 SRCS= ipfw2.c dummynet.c ipv6.c main.c nat.c tables.c
|
/freebsd-13-stable/share/examples/ipfilter/ |
H A D | Makefile | 14 ftp-proxy ftppxy nat-setup nat.eg server tcpstate
|
/freebsd-13-stable/tests/sys/netinet/libalias/ |
H A D | perf.c | 78 } nat, usenat, unnat, random, attack; local 109 bzero(&nat, sizeof(nat)); 166 nat.ok++; 168 nat.fail++; 284 printf("newNAT ok : %9lu\n", nat.ok); 285 printf("newNAT fail: %9lu\n", nat.fail); 296 nat.ok + nat.fail +
|