/titanic_44/usr/src/cmd/ipf/lib/common/ |
H A D | printactivenat.c | 17 void printactivenat(nat, opts, alive) in printactivenat() argument 18 nat_t *nat; in printactivenat() 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, 35 nat->nat_ifnames[0]); [all …]
|
H A D | getnattype.c | 25 char *getnattype(nat, alive) in getnattype() argument 26 nat_t *nat; in getnattype() 34 if (!nat) 37 type = nat->nat_redir; 39 ipn = nat->nat_ptr;
|
/titanic_44/usr/src/cmd/ipf/tools/ |
H A D | ipnat_y.y | 62 static ipnat_t *nat = NULL; variable 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 …]
|
H A D | ipfs.c | 170 nat_t *nat; local 180 nat = &ipn.ipn_nat; 181 if (nlen >= sizeof(nat->nat_ifnames[0]) || 182 olen >= sizeof(nat->nat_ifnames[0])) 193 if (!strncmp(nat->nat_ifnames[0], ifs, olen + 1)) { 194 strcpy(nat->nat_ifnames[0], s); 197 if (!strncmp(nat->nat_ifnames[1], ifs, olen + 1)) { 198 strcpy(nat->nat_ifnames[1], s); 570 nat_t *nat; local 640 nat = &in->ipn_nat; [all …]
|
H A D | ipnat.c | 307 nat_t *np, nat; local 351 for (np = nsp->ns_instances; np; np = nat.nat_next) { 352 if (kmemcpy((char *)&nat, (long)np, sizeof(nat))) 354 printactivenat(&nat, opts, 0); 355 if (nat.nat_aps) 356 printaps(nat.nat_aps, opts); 441 nat_t nat; local 470 iter.igi_data = &nat; 475 printactivenat(&nat, opts, 1); 476 if (nat.nat_aps) [all …]
|
H A D | ipftest.c | 634 nat_t *nat; local 640 for (nat = ifs->ifs_nat_instances; nat; nat = nat->nat_next) { 641 printactivenat(nat, opts, 0); 642 if (nat->nat_aps) 643 printaps(nat->nat_aps, opts);
|
/titanic_44/usr/src/uts/common/inet/ipf/ |
H A D | ip_nat6.c | 280 static INLINE int nat6_newmap(fin, nat, ni) in nat6_newmap() argument 282 nat_t *nat; 328 nat->nat_hm = hm; 510 nat->nat_inip6 = fin->fin_src6; 511 nat->nat_outip6 = in; 512 nat->nat_oip6 = fin->fin_dst6; 513 if (nat->nat_hm == NULL) 514 nat->nat_hm = nat6_hostmap(np, &fin->fin_src6, &fin->fin_dst6, 515 &nat->nat_outip6, 0, ifs); 518 nat->nat_inport = sport; [all …]
|
H A D | ip_nat.c | 607 ipnat_t *nat, *nt, *n = NULL, **np = NULL; local 622 nat = NULL; /* XXX gcc -Wuninitialized */ 646 nat = &natd; 647 if (nat->in_v == 0) /* For backward compat. */ 648 nat->in_v = 4; 649 nat->in_flags &= IPN_USERFLAGS; 650 if ((nat->in_redir & NAT_MAPBLK) == 0) { 651 if ((nat->in_flags & IPN_SPLIT) == 0) 652 nat->in_inip &= nat->in_inmsk; 653 if ((nat->in_flags & IPN_IPRANGE) == 0) [all …]
|
H A D | ip_proxy.c | 284 int appr_ok(fin, tcp, nat) in appr_ok() argument 287 ipnat_t *nat; 289 aproxy_t *apr = nat->in_apr; 290 u_short dport = nat->in_dport; 357 int appr_match(fin, nat) in appr_match() argument 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); 403 int appr_new(fin, nat) in appr_new() argument [all …]
|
H A D | ip_frag.c | 423 int fr_nat_newfrag(fin, pass, nat) in fr_nat_newfrag() argument 426 nat_t *nat; 437 fra->ipfr_data = nat; 438 nat->nat_data = fra; 598 nat_t *nat; local 607 nat = ipf->ipfr_data; 611 if ((ipf->ipfr_ttl == ifs->ifs_fr_ticks + 1) && (nat != NULL)) { 612 nat->nat_data = NULL; 616 nat = NULL; 618 return nat; [all …]
|
H A D | ip_compat.c | 143 struct nat *nat_next; 144 struct nat **nat_pnext; 145 struct nat *nat_hnext[2]; 146 struct nat **nat_phnext[2]; 149 struct nat **nat_me;
|
/titanic_44/usr/src/uts/common/inet/ipf/netinet/ |
H A D | ip_rcmd_pxy.c | 77 int ippr_rcmd_new(fin, aps, nat, private) in ippr_rcmd_new() argument 80 nat_t *nat; 86 nat = nat; /* LINT */ 120 int ippr_rcmd_portmsg(fin, aps, nat, ifsrcmd) in ippr_rcmd_portmsg() argument 123 nat_t *nat; 181 if (nat->nat_dir == NAT_OUTBOUND) 182 nat2 = nat_outlookup(&fi, NAT_SEARCH|IPN_TCP, nat->nat_p, 183 nat->nat_inip, nat->nat_oip); 185 nat2 = nat_inlookup(&fi, NAT_SEARCH|IPN_TCP, nat->nat_p, 186 nat->nat_inip, nat->nat_oip); [all …]
|
H A D | ip_ftp_pxy.c | 153 int ippr_ftp_new(fin, aps, nat, private) in ippr_ftp_new() argument 156 nat_t *nat; 167 nat = nat; /* LINT */ 185 int ippr_ftp_port(fin, ip, nat, f, dlen, ifsftp) in ippr_ftp_port() argument 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) && 247 (a1 != ntohl(nat->nat_oip.s_addr)))) { 291 if (nat->nat_dir == NAT_INBOUND) [all …]
|
H A D | ip_pptp_pxy.c | 106 int ippr_pptp_new(fin, aps, nat, private) in ippr_pptp_new() argument 109 nat_t *nat; 118 if (nat_outlookup(fin, 0, IPPROTO_GRE, nat->nat_inip, 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; 155 ipn->in_inip = nat->nat_inip.s_addr; 160 bcopy(nat->nat_ptr->in_ifnames[0], ipn->in_ifnames[0], 170 void ippr_pptp_donatstate(fin, nat, pptp, ifspptp) in ippr_pptp_donatstate() argument [all …]
|
H A D | ip_h323_pxy.c | 129 int ippr_h323_new(fin, aps, nat, private) in ippr_h323_new() argument 132 nat_t *nat; 136 nat = nat; /* LINT */ 180 int ippr_h323_in(fin, aps, nat, private) in ippr_h323_in() argument 183 nat_t *nat; 212 bcopy((caddr_t)nat->nat_ptr, (caddr_t)ipn, sizeof(ipnat_t)); 215 ipn->in_inip = nat->nat_inip.s_addr; 249 int ippr_h245_new(fin, aps, nat, private) in ippr_h245_new() argument 252 nat_t *nat; 256 nat = nat; /* LINT */ [all …]
|
H A D | ip_rpcb_pxy.c | 170 ippr_rpcb_new(fin, aps, nat, private) in ippr_rpcb_new() argument 173 nat_t *nat; 179 nat = nat; /* LINT */ 232 ippr_rpcb_in(fin, aps, nat, private) in ippr_rpcb_in() argument 235 nat_t *nat; 267 rv = ippr_rpcb_decodereq(fin, nat, rs, rm, (ifs_rpcbpxy_t *)private); 276 rv = ippr_rpcb_modreq(fin, nat, rm, m, off); 302 ippr_rpcb_out(fin, aps, nat, private) in ippr_rpcb_out() argument 305 nat_t *nat; 340 rv = ippr_rpcb_decoderep(fin, nat, rs, rm, &rx, ifsrpcb); [all …]
|
H A D | ip_ipsec_pxy.c | 111 int ippr_ipsec_new(fin, aps, nat, private) in ippr_ipsec_new() argument 114 nat_t *nat; 138 if (nat_outlookup(fin, 0, IPPROTO_ESP, nat->nat_inip, 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], 218 int ippr_ipsec_inout(fin, aps, nat, private) in ippr_ipsec_inout() argument 221 nat_t *nat; 231 if ((fin->fin_out == 1) && (nat->nat_dir == NAT_INBOUND)) [all …]
|
H A D | ip_irc_pxy.c | 248 int ippr_irc_new(fin, aps, nat, private) in ippr_irc_new() argument 251 nat_t *nat; 261 nat = nat; /* LINT */ 271 int ippr_irc_send(fin, nat, ifsirc) in ippr_irc_send() argument 273 nat_t *nat; 312 irc = nat->nat_aps->aps_data; 320 if (irc->irc_ipnum != ntohl(nat->nat_inip.s_addr)) 417 nat2 = nat_outlookup(fin, IPN_TCP, nat->nat_p, nat->nat_inip, 432 ip->ip_src = nat->nat_inip; 433 nat2 = nat_new(&fi, nat->nat_ptr, NULL, [all …]
|
H A D | ip_raudio_pxy.c | 72 int ippr_raudio_new(fin, aps, nat, private) in ippr_raudio_new() argument 75 nat_t *nat; 85 nat = nat; /* LINT */ 96 int ippr_raudio_out(fin, aps, nat, private) in ippr_raudio_out() argument 99 nat_t *nat; 110 nat = nat; /* LINT */ 203 int ippr_raudio_in(fin, aps, nat, private) in ippr_raudio_in() argument 206 nat_t *nat; 298 ip->ip_src = nat->nat_inip; 299 ip->ip_dst = nat->nat_oip; [all …]
|
H A D | ip_netbios_pxy.c | 95 int ippr_netbios_out(fin, aps, nat, private) in ippr_netbios_out() argument 98 nat_t *nat; 108 nat = nat; /* LINT */
|
H A D | ip_proxy.h | 35 struct nat; 111 int (* apr_new) __P((fr_info_t *, ap_session_t *, struct nat *, void *)); 113 int (* apr_inpkt) __P((fr_info_t *, ap_session_t *, struct nat *, void *)); 114 int (* apr_outpkt) __P((fr_info_t *, ap_session_t *, struct nat *, void *)); 115 int (* apr_match) __P((fr_info_t *, ap_session_t *, struct nat *, void *)); 454 extern int appr_match __P((fr_info_t *, struct nat *)); 457 extern int appr_check __P((fr_info_t *, struct nat *)); 459 extern int appr_new __P((fr_info_t *, struct nat *));
|
H A D | ip_nat.h | 92 typedef struct nat { struct 94 struct nat *nat_next; argument 95 struct nat **nat_pnext; argument 96 struct nat *nat_hnext[2]; argument 97 struct nat **nat_phnext[2]; argument 100 struct nat **nat_me; argument 300 struct nat ipn_nat; 484 extern int nat_delete __P((struct nat *, int, ipf_stack_t *)); 494 extern void nat_log __P((struct nat *, u_int, ipf_stack_t *));
|
/titanic_44/usr/src/cmd/cmd-inet/usr.lib/ilbd/ |
H A D | ilbd_nat.c | 164 ilb_nat_entry_t *nat; in ilbd_show_nat() local 166 nat = &kcmd->entries[i]; in ilbd_show_nat() 168 nat_ret->nat_proto = nat->proto; in ilbd_show_nat() 170 nat_ret->nat_in_local = nat->in_local; in ilbd_show_nat() 171 nat_ret->nat_in_global = nat->in_global; in ilbd_show_nat() 172 nat_ret->nat_out_local = nat->out_local; in ilbd_show_nat() 173 nat_ret->nat_out_global = nat->out_global; in ilbd_show_nat() 175 nat_ret->nat_in_local_port = nat->in_local_port; in ilbd_show_nat() 176 nat_ret->nat_in_global_port = nat->in_global_port; in ilbd_show_nat() 177 nat_ret->nat_out_local_port = nat->out_local_port; in ilbd_show_nat() [all …]
|
/titanic_44/usr/src/cmd/ipf/examples/ |
H A D | Makefile | 34 ftppxy ip_rules nat-setup nat.eg \
|
/titanic_44/usr/src/cmd/cmd-inet/usr.lib/mdnsd/ |
H A D | uDNS.c | 1489 mDNSlocal void DeleteNATPortMapping(mDNS *m, NATTraversalInfo *nat, ServiceRecordSet *srs) in DeleteNATPortMapping() argument 1491 if (nat->state == NATState_Established) // let other edge-case states expire for simplicity in DeleteNATPortMapping() 1494 nat->request.PortReq.lease.NotAnInteger = 0; in DeleteNATPortMapping() 1495 nat->state = NATState_Request; in DeleteNATPortMapping() 1496 SendNATMsg(nat, m); in DeleteNATPortMapping() 1499 else if (nat->state == NATState_Legacy) in DeleteNATPortMapping() 1503 err = LNT_UnmapPort(nat->PublicPort, tcp); in DeleteNATPortMapping() 1529 NATTraversalInfo *nat = m->uDNS_info.LLQNatInfo; in CheckForUnreferencedLLQMapping() local 1532 if (!nat) return; in CheckForUnreferencedLLQMapping() 1538 if (nat->state == NATState_Established || nat->state == NATState_Legacy) in CheckForUnreferencedLLQMapping() [all …]
|