afm
struct afm *
struct afm *afm;
afm = malloc(sizeof(struct afm), M_DEVBUF, M_WAITOK|M_ZERO);
if (afm == NULL)
afm->afm_vci = flowmap->af_vci;
afm->afm_vpi = flowmap->af_vpi;
(void)memcpy(&afm->afm_flowinfo, &flowmap->af_flowinfo,
LIST_INSERT_HEAD(&head->afh_head, afm, afm_list);
afm_remove(struct afm *afm)
LIST_REMOVE(afm, afm_list);
free(afm, M_DEVBUF);
struct afm *afm;
while ((afm = head->afh_head.lh_first) != NULL)
afm_remove(afm);
struct afm *
struct afm *afm;
for (afm = head->afh_head.lh_first; afm != NULL;
afm = afm->afm_list.le_next)
if (afm->afm_vpi == vpi && afm->afm_vci == vci)
return afm;
static struct afm *
struct afm *afm;
for (afm = head->afh_head.lh_first; afm != NULL;
afm = afm->afm_list.le_next) {
if (afm->afm_flowinfo4.fi_dst.s_addr != 0 &&
afm->afm_flowinfo4.fi_dst.s_addr != fp->fi_dst.s_addr)
if (afm->afm_flowinfo4.fi_dport != 0 &&
afm->afm_flowinfo4.fi_dport != fp->fi_dport)
if (afm->afm_flowinfo4.fi_src.s_addr != 0 &&
afm->afm_flowinfo4.fi_src.s_addr != fp->fi_src.s_addr)
if (afm->afm_flowinfo4.fi_sport != 0 &&
afm->afm_flowinfo4.fi_sport != fp->fi_sport)
if (afm->afm_flowinfo4.fi_proto != 0 &&
afm->afm_flowinfo4.fi_proto != fp->fi_proto)
return afm;
static struct afm *
struct afm *afm;
for (afm = head->afh_head.lh_first; afm != NULL;
afm = afm->afm_list.le_next) {
if (afm->afm_flowinfo6.fi6_flowlabel != 0 &&
afm->afm_flowinfo6.fi6_flowlabel != fp->fi6_flowlabel)
if (!IN6_IS_ADDR_UNSPECIFIED(&afm->afm_flowinfo6.fi6_dst) &&
!IN6_ARE_ADDR_EQUAL(&afm->afm_flowinfo6.fi6_dst,
if (afm->afm_flowinfo6.fi6_dport != 0 &&
afm->afm_flowinfo6.fi6_dport != fp->fi6_dport)
if (!IN6_IS_ADDR_UNSPECIFIED(&afm->afm_flowinfo6.fi6_src) &&
!IN6_ARE_ADDR_EQUAL(&afm->afm_flowinfo6.fi6_src,
if (afm->afm_flowinfo6.fi6_sport != 0 &&
afm->afm_flowinfo6.fi6_sport != fp->fi6_sport)
if (afm->afm_flowinfo6.fi6_proto != 0 &&
afm->afm_flowinfo6.fi6_proto != fp->fi6_proto)
return (afm);
struct afm *
altqdev_decl(afm);
static struct afm *afm_match4(struct afm_head *, struct flowinfo_in *);
static struct afm *afm_match6(struct afm_head *, struct flowinfo_in6 *);
struct afm *afm_match(struct ifnet *, struct flowinfo *);
LIST_ENTRY(afm) afm_list;
LIST_HEAD(, afm) afh_head;
struct afm *afm_top(struct ifnet *);
int afm_remove(struct afm *);
struct afm *afm_lookup(struct ifnet *, int, int);
altqdev_decl(afm);