Lines Matching refs:hm
214 hostmap_t *hm; local
230 for (hm = ifs->ifs_maptable[hv]; hm; hm = hm->hm_next)
231 if (IP6_EQ(&hm->hm_srcip6, src) &&
232 IP6_EQ(&hm->hm_dstip6, dst) &&
233 ((np == NULL) || (np == hm->hm_ipnat)) &&
234 ((port == 0) || (port == hm->hm_port))) {
235 hm->hm_ref++;
236 return hm;
242 KMALLOC(hm, hostmap_t *);
243 if (hm) {
244 hm->hm_hnext = ifs->ifs_ipf_hm_maplist;
245 hm->hm_phnext = &ifs->ifs_ipf_hm_maplist;
247 ifs->ifs_ipf_hm_maplist->hm_phnext = &hm->hm_hnext;
248 ifs->ifs_ipf_hm_maplist = hm;
250 hm->hm_next = ifs->ifs_maptable[hv];
251 hm->hm_pnext = ifs->ifs_maptable + hv;
253 ifs->ifs_maptable[hv]->hm_pnext = &hm->hm_next;
254 ifs->ifs_maptable[hv] = hm;
255 hm->hm_ipnat = np;
256 hm->hm_src = *src;
257 hm->hm_dst = *dst;
258 hm->hm_map = *map;
259 hm->hm_ref = 1;
260 hm->hm_port = port;
261 hm->hm_v = 6;
263 return hm;
287 hostmap_t *hm; local
299 hm = NULL;
320 hm = nat6_hostmap(np, &fin->fin_src6, &fin->fin_dst6,
322 if (hm != NULL)
323 in = hm->hm_map;
324 } else if ((l == 1) && (hm != NULL)) {
325 fr_hostmapdel(&hm);
328 nat->nat_hm = hm;
400 (np->in_pnext == 0) && ((l > 0) || (hm == NULL))) {
554 hostmap_t *hm; local
562 hm = NULL;
581 hm = nat6_hostmap(NULL, &fin->fin_src6, &fin->fin_dst6, &in,
583 if (hm != NULL) {
584 in = hm->hm_map;
585 np = hm->hm_ipnat;
601 hm = nat6_hostmap(np, &fin->fin_src6, &fin->fin_dst6,
603 if (hm != NULL) {
604 in = hm->hm_map;
609 if (hm == NULL || hm->hm_ref == 1) {
744 hostmap_t *hm = NULL; local
882 if ((hm = nat->nat_hm) != NULL)
883 fr_hostmapdel(&hm);