| /onnv/onnv-gate/usr/src/cmd/ipf/lib/common/ |
| printactivenat.c | 17 void printactivenat(nat, opts, alive) 18 nat_t *nat; 22 printf("%s", getnattype(nat, alive)); 24 if (nat->nat_flags & SI_CLONE) 27 printactiveaddress(nat->nat_v, " %-15s", &nat->nat_inip6, 28 nat->nat_ifnames[0]); 30 if ((nat->nat_flags & IPN_TCPUDP) != 0) 31 printf(" %-5hu", ntohs(nat->nat_inport)); 34 printactiveaddress(nat->nat_v, "%-15s", &nat->nat_outip6 [all...] |
| getnattype.c | 23 * Get a nat filter type given its kernel address. 25 char *getnattype(nat, alive) 26 nat_t *nat; 34 if (!nat) 37 type = nat->nat_redir; 39 ipn = nat->nat_ptr;
|
| /onnv/onnv-gate/usr/src/cmd/ipf/tools/ |
| ipnat_y.y | 62 static ipnat_t *nat = NULL; 119 line: xx rule { while ((nat = nattop) != NULL) { 120 if (nat->in_v == 0) 121 nat->in_v = 4; 122 nattop = nat->in_next; 123 (*nataddfunc)(natfd, natioctlfunc, nat); 124 free(nat); 156 bcopy(&$3.a, &nat->in_in[0], sizeof($3.a)); 157 bcopy(&$3.m, &nat->in_in[1], sizeof($3.a)); 158 bcopy(&$5.a, &nat->in_out[0], sizeof($5.a)) [all...] |
| ipfs.c | 157 * Change interface names in NAT information saved out to disk. 164 nat_t *nat; local 174 nat = &ipn.ipn_nat; 175 if (nlen >= sizeof(nat->nat_ifnames[0]) || 176 olen >= sizeof(nat->nat_ifnames[0])) 187 if (!strncmp(nat->nat_ifnames[0], ifs, olen + 1)) { 188 strcpy(nat->nat_ifnames[0], s); 191 if (!strncmp(nat->nat_ifnames[1], ifs, olen + 1)) { 192 strcpy(nat->nat_ifnames[1], s); 552 nat_t *nat; local [all...] |
| ipnat.c | 231 * Read NAT statistic information in using a symbol table and memory file 286 * Display NAT statistics. 292 nat_t *np, nat; local 303 printf("no memory\t%lu\tbad nat\t%lu\n", 314 * Show list of NAT rules and NAT sessions ? 336 for (np = nsp->ns_instances; np; np = nat.nat_next) { 337 if (kmemcpy((char *)&nat, (long)np, sizeof(nat))) 339 printactivenat(&nat, opts, 0) 426 nat_t nat; local [all...] |
| ipftest.c | 110 RWLOCK_INIT(&ifs->ifs_ipf_ipidfrag, "ipf IP NAT-Frag rwlock"); 361 fprintf(stderr, "iplioctl(NAT,%#x,%p) = %d\n", 507 fprintf(stderr, "iplioctl(NAT,%#x,%p) = %d\n", cmd, data, i); 633 * Display the built up NAT table rules and mapping entries. 639 nat_t *nat; local 645 for (nat = ifs->ifs_nat_instances; nat; nat = nat->nat_next) { 646 printactivenat(nat, opts, 0) [all...] |
| /onnv/onnv-gate/usr/src/uts/common/inet/ipf/ |
| ip_nat6.c | 131 /* Parameters: n(I) - pointer to NAT rule to add */ 134 /* loaded NAT rules. Updates the bitmask indicating which netmasks are in */ 164 /* Parameters: n(I) - pointer to NAT rule to add */ 166 /* Adds a NAT map rule to the hash table of rules and the list of loaded */ 167 /* NAT rules. Updates the bitmask indicating which netmasks are in use by */ 198 /* Parameters: np(I) - pointer to NAT rule */ 206 /* create a new entry if a non-NULL NAT rule pointer has been supplied. */ 271 /* nat(I) - pointer to NAT entry */ 273 /* to create new NAT entry. * 745 nat_t *nat, *natl; local 1085 nat_t *nat; local 1220 nat_t *nat; local 1483 nat_t *nat; local 1738 nat_t *nat; local 1902 nat_t *nat; local 2040 nat_t *nat; local 2321 nat_t *nat; local [all...] |
| ip_nat.c | 120 /* How the NAT is organised and works. */ 122 /* Inside (interface y) NAT Outside (interface x) */ 136 /* In the NAT table, internal source is recorded as "in" and externally */ 177 /* Initialise all of the NAT locks, tables and other structures. */ 257 MUTEX_INIT(&ifs->ifs_nat_udptq.ifq_lock, "nat ipftq udp tab"); 263 MUTEX_INIT(&ifs->ifs_nat_icmptq.ifq_lock, "nat icmp ipftq tab"); 269 MUTEX_INIT(&ifs->ifs_nat_iptq.ifq_lock, "nat ip ipftq tab"); 289 RWLOCK_INIT(&ifs->ifs_ipf_nat, "ipf IP NAT rwlock"); 290 RWLOCK_INIT(&ifs->ifs_ipf_natfrag, "ipf IP NAT-Frag rwlock"); 291 MUTEX_INIT(&ifs->ifs_ipf_nat_new, "ipf nat new mutex") 607 ipnat_t *nat, *nt, *n = NULL, **np = NULL; local 1194 nat_t *nat, *n; local 1265 nat_t *n, *nat; local 1570 nat_t *n, *nat; local 2528 nat_t *nat, *natl; local 2867 nat_t *nat; local 3001 nat_t *nat; local 3272 nat_t *nat; local 3527 nat_t *nat; local 3690 nat_t *nat; local 3881 nat_t *nat; local 4204 nat_t *nat; local 4746 nat_t *nat; local 4872 nat_t *nat; local 4986 nat_t *nat; local 5180 nat_t *nat; local 5492 nat_t *nat, *nextnat = NULL, zeronat; local 5738 nat_t *nat, *natn; local 5811 nat_t *nat; local [all...] |
| ip_proxy.c | 284 int appr_ok(fin, tcp, nat) 287 ipnat_t *nat; 289 aproxy_t *apr = nat->in_apr; 290 u_short dport = nat->in_dport; 357 int appr_match(fin, nat) 359 nat_t *nat; 365 ipn = nat->nat_ptr; 368 (u_long)fin, (u_long)nat, (u_long)nat->nat_aps, 387 result = (*apr->apr_match)(fin, nat->nat_aps, nat, apr->apr_private) [all...] |
| ip_compat.c | 144 struct nat *nat_next; 145 struct nat **nat_pnext; 146 struct nat *nat_hnext[2]; 147 struct nat **nat_phnext[2]; 150 struct nat **nat_me; 175 u_char nat_p; /* protocol for NAT */
|
| ip_frag.c | 418 /* nat(I) - pointer to NAT structure */ 420 /* Create a new NAT fragment cache entry based on the current packet and */ 421 /* the NAT structure for this "session". */ 423 int fr_nat_newfrag(fin, pass, nat) 426 nat_t *nat; 437 fra->ipfr_data = nat; 438 nat->nat_data = fra; 589 /* Returns: nat_t* - pointer to 'parent' NAT structure if frag table */ 593 /* Functional interface for NAT lookups of the NAT fragment cache * 598 nat_t *nat; local 789 nat_t *nat; local 827 nat_t *nat; local [all...] |
| /onnv/onnv-gate/usr/src/uts/common/inet/ipf/netinet/ |
| ip_rcmd_pxy.c | 11 * Simple RCMD transparent proxy for in-kernel use. For use with the NAT 77 int ippr_rcmd_new(fin, aps, nat, private) 80 nat_t *nat; 86 nat = nat; /* LINT */ 120 int ippr_rcmd_portmsg(fin, aps, nat, ifsrcmd) 123 nat_t *nat; 174 * Add skeleton NAT entry for connection which will come back the 181 if (nat->nat_dir == NAT_OUTBOUND) 182 nat2 = nat_outlookup(&fi, NAT_SEARCH|IPN_TCP, nat->nat_p [all...] |
| ip_ftp_pxy.c | 11 * Simple FTP transparent proxy for in-kernel use. For use with the NAT 153 int ippr_ftp_new(fin, aps, nat, private) 156 nat_t *nat; 167 nat = nat; /* LINT */ 185 int ippr_ftp_port(fin, ip, nat, f, dlen, ifsftp) 188 nat_t *nat; 244 if (((nat->nat_dir == NAT_OUTBOUND) && 245 (a1 != ntohl(nat->nat_inip.s_addr))) || 246 ((nat->nat_dir == NAT_INBOUND) & [all...] |
| ip_h323_pxy.c | 129 int ippr_h323_new(fin, aps, nat, private) 132 nat_t *nat; 136 nat = nat; /* LINT */ 180 int ippr_h323_in(fin, aps, nat, private) 183 nat_t *nat; 203 /* setup a nat rule to set a h245 proxy on tcp-port "port" 212 bcopy((caddr_t)nat->nat_ptr, (caddr_t)ipn, sizeof(ipnat_t)); 215 ipn->in_inip = nat->nat_inip.s_addr; 221 * the nat table rwlock (ipf_nat), if we go into fr_nat_ioctl() [all...] |
| ip_pptp_pxy.c | 4 * Simple PPTP transparent proxy for in-kernel use. For use with the NAT 106 int ippr_pptp_new(fin, aps, nat, private) 109 nat_t *nat; 118 if (nat_outlookup(fin, 0, IPPROTO_GRE, nat->nat_inip, 134 * Create NAT rule against which the tunnel/transport mapping is 135 * created. This is required because the current NAT rule does not 146 if (nat->nat_dir == NAT_OUTBOUND) { 147 ipn->in_nip = ntohl(nat->nat_outip.s_addr); 150 } else if (nat->nat_dir == NAT_INBOUND) { 152 ipn->in_outip = nat->nat_outip.s_addr [all...] |
| ip_netbios_pxy.c | 3 * For use with the NAT code. 95 int ippr_netbios_out(fin, aps, nat, private) 98 nat_t *nat; 108 nat = nat; /* LINT */
|
| ip_irc_pxy.c | 248 int ippr_irc_new(fin, aps, nat, private) 251 nat_t *nat; 261 nat = nat; /* LINT */ 271 int ippr_irc_send(fin, nat, ifsirc) 273 nat_t *nat; 312 irc = nat->nat_aps->aps_data; 320 if (irc->irc_ipnum != ntohl(nat->nat_inip.s_addr)) 398 * Add skeleton NAT entry for connection which will come back the 417 nat2 = nat_outlookup(fin, IPN_TCP, nat->nat_p, nat->nat_inip [all...] |
| ip_rpcb_pxy.c | 22 * When triggered by appropriate IP NAT rules, this proxy works by 24 * modified, NAT and state table entries created, etc., as necessary. 37 * o There is a potential collision between cloning, wildcard NAT and 164 /* nat(I) - pointer to NAT session structure */ 170 ippr_rpcb_new(fin, aps, nat, private) 173 nat_t *nat; 179 nat = nat; /* LINT */ 226 /* nat(I) - pointer to NAT session structure * [all...] |
| ip_raudio_pxy.c | 72 int ippr_raudio_new(fin, aps, nat, private) 75 nat_t *nat; 85 nat = nat; /* LINT */ 96 int ippr_raudio_out(fin, aps, nat, private) 99 nat_t *nat; 110 nat = nat; /* LINT */ 203 int ippr_raudio_in(fin, aps, nat, private) 206 nat_t *nat; [all...] |
| ip_ipsec_pxy.c | 6 * Simple ISAKMP transparent proxy for in-kernel use. For use with the NAT 111 int ippr_ipsec_new(fin, aps, nat, private) 114 nat_t *nat; 138 if (nat_outlookup(fin, 0, IPPROTO_ESP, nat->nat_inip, 151 * Create NAT rule against which the tunnel/transport mapping is 152 * created. This is required because the current NAT rule does not 163 ipn->in_nip = ntohl(nat->nat_outip.s_addr); 165 ipn->in_inip = nat->nat_inip.s_addr; 168 ipn->in_outmsk = nat->nat_outip.s_addr; 172 bcopy(nat->nat_ptr->in_ifnames[0], ipn->in_ifnames[0] [all...] |
| ip_proxy.h | 32 struct nat; 61 void *aps_nat; /* pointer back to nat struct */ 108 int (* apr_new) __P((fr_info_t *, ap_session_t *, struct nat *, void *)); 110 int (* apr_inpkt) __P((fr_info_t *, ap_session_t *, struct nat *, void *)); 111 int (* apr_outpkt) __P((fr_info_t *, ap_session_t *, struct nat *, void *)); 112 int (* apr_match) __P((fr_info_t *, ap_session_t *, struct nat *, void *)); 451 extern int appr_match __P((fr_info_t *, struct nat *)); 454 extern int appr_check __P((fr_info_t *, struct nat *)); 456 extern int appr_new __P((fr_info_t *, struct nat *));
|
| ip_nat.h | 32 #undef LARGE_NAT /* define this if you're setting up a system to NAT 37 * a setup with 1000-2000 networks to NAT. 87 typedef struct nat { struct 89 struct nat *nat_next; 90 struct nat **nat_pnext; 91 struct nat *nat_hnext[2]; 92 struct nat **nat_phnext[2]; 95 struct nat **nat_me; 120 u_char nat_p; /* protocol for NAT */ 175 struct ipnat *in_next; /* NAT rule list next * [all...] |
| ip_frag.h | 62 extern int fr_nat_newfrag __P((fr_info_t *, u_32_t, struct nat *));
|
| /onnv/onnv-gate/usr/src/cmd/cmd-inet/usr.lib/ilbd/ |
| ilbd_nat.c | 40 * We only allow one show nat/persist command running at any time. Note that 49 /* Maximum number of NAT/sticky entries to request from kernel. */ 69 * To show the kernel NAT table. 164 ilb_nat_entry_t *nat; local 166 nat = &kcmd->entries[i]; 168 nat_ret->nat_proto = nat->proto; 170 nat_ret->nat_in_local = nat->in_local; 171 nat_ret->nat_in_global = nat->in_global; 172 nat_ret->nat_out_local = nat->out_local; 173 nat_ret->nat_out_global = nat->out_global [all...] |
| /onnv/onnv-gate/usr/src/cmd/ipf/examples/ |
| Makefile | 29 EXAMPLES= BASIC.NAT BASIC_1.FW BASIC_2.FW \ 34 ftppxy ip_rules nat-setup nat.eg \
|