Home | History | Annotate | Download | only in npf

Lines Matching refs:alen

448 npf_nat_getaddr(npf_cache_t *npc, npf_natpolicy_t *np, const unsigned alen)
463 idx = npf_addr_mix(alen,
468 return npf_table_getsome(t, alen, idx);
480 const unsigned alen = npc->npc_alen;
514 taddr = npf_nat_getaddr(npc, np, alen);
520 memcpy(&nt->nt_taddr, taddr, alen);
530 memcpy(&nt->nt_taddr, taddr, alen);
532 nt->nt_alen = alen;
537 memcpy(&nt->nt_oaddr, npc->npc_ips[NPF_SRC], alen);
541 memcpy(&nt->nt_oaddr, npc->npc_ips[NPF_DST], alen);
568 nt->nt_tport = npf_portmap_get(pm, alen, taddr);
904 unsigned alen = nt->nt_alen;
913 nvlist_add_number(nat_nv, "alen", alen);
915 nvlist_add_binary(nat_nv, "oaddr", &nt->nt_oaddr, alen);
918 nvlist_add_binary(nat_nv, "taddr", &nt->nt_taddr, alen);
936 size_t alen, len;
951 alen = dnvlist_get_number(nat, "alen", 0);
952 if (alen == 0 || alen > sizeof(npf_addr_t)) {
957 if (!taddr || len != alen) {
963 if (!oaddr || len != alen) {