Lines Matching defs:pm
315 Path_match_t* pm;
323 if (!(pm = newof(0, Path_match_t, 1, strlen(val->string.data))))
329 strcpy(pm->pat, val->string.data);
330 return pm;
336 Path_match_t* pm = (Path_match_t*)data;
341 if (!(ire = pm->ire32))
345 if (!(ire = irecomp(pm->pat, 4, 0, 1, 1, &iredisc)))
347 pm->ire32 = ire;
350 else if (!(ire = pm->ire16))
354 if (!(ire = irecomp(pm->pat, 2, 0, 1, 1, &iredisc)))
356 pm->ire16 = ire;
364 Path_match_t* pm = (Path_match_t*)data;
366 if (pm->ire16)
367 irefree(pm->ire16);
368 if (pm->ire32)
369 irefree(pm->ire32);
370 free(pm);
842 Prefix_match_t* pm;
850 if (!(pm = newof(0, Prefix_match_t, 1, strlen(val->string.data))))
856 strcpy(pm->pat, val->string.data);
857 pm->val.string.data = pm->pat;
858 pm->str = cxisstring(pat);
859 return pm;
865 Prefix_match_t* pm = (Prefix_match_t*)data;
869 if (!pm->ptv)
871 ptvinit(&pm->ptdisc);
872 pm->ptdisc.errorf = disc->errorf;
873 pm->prefix = type->externalf == prefixv6_external;
874 if (!(pm->ptv = ptvload(pm->str, &pm->val, &pm->ptdisc, disc)))
877 return ptvmatch(pm->ptv, (Ptvaddr_t)val->buffer.data) != 0;
879 if (!pm->pt)
881 ptinit(&pm->ptdisc);
882 pm->ptdisc.errorf = disc->errorf;
883 pm->prefix = type->externalf == prefixv6_external;
884 if (!(pm->pt = ptload(pm->str, &pm->val, &pm->ptdisc, disc)))
887 return ptmatch(pm->pt, type->externalf == prefixv4_external ? PREFIX_ADDR(val->number) : (Ptaddr_t)val->number) != 0;
893 Prefix_match_t* pm = (Prefix_match_t*)data;
895 free(pm);