/* * debug attribute TCA_SFB_PARMS */ void debug_tca_sfb_parms(int lev, struct rtattr *sfb, const char *name) { struct tc_sfb_qopt *qopt; if(debug_rta_len_chk(lev, sfb, name, sizeof(*qopt))) return; qopt = (struct tc_sfb_qopt *)RTA_DATA(sfb); rec_dbg(lev, "%s(%hu):", name, RTA_ALIGN(sfb->rta_len)); rec_dbg(lev, " [ tc_stats(%d) ]", sizeof(*qopt)); rec_dbg(lev, " rehash_interval(%d): %u", sizeof(qopt->rehash_interval), qopt->rehash_interval); rec_dbg(lev, " warmup_time(%d): %u", sizeof(qopt->warmup_time), qopt->warmup_time); rec_dbg(lev, " max(%d): %u", sizeof(qopt->max), qopt->max); rec_dbg(lev, " bin_size(%d): %u", sizeof(qopt->bin_size), qopt->bin_size); rec_dbg(lev, " increment(%d): %u", sizeof(qopt->increment), qopt->increment); rec_dbg(lev, " decrement(%d): %u", sizeof(qopt->decrement), qopt->decrement); rec_dbg(lev, " limit(%d): %u", sizeof(qopt->limit), qopt->limit); rec_dbg(lev, " penalty_rate(%d): %u", sizeof(qopt->penalty_rate), qopt->penalty_rate); rec_dbg(lev, " penalty_burst(%d): %u", sizeof(qopt->penalty_burst), qopt->penalty_burst); }
/* * debug attribute TCA_EM_META_HDR */ struct tcf_meta_hdr *debug_tca_em_meta_hdr(int lev, struct rtattr *meta, const char *name) { struct tcf_meta_hdr *hdr; struct tcf_meta_val *left, *right; if(debug_rta_len_chk(lev, meta, name, sizeof(*hdr))) return(NULL); hdr = (struct tcf_meta_hdr *)RTA_DATA(meta); left = &(hdr->left); right = &(hdr->right); rec_dbg(lev, "%s(%hu):", name, RTA_ALIGN(meta->rta_len)); rec_dbg(lev, " [ tcf_meta_hdr(%d) ]", sizeof(*hdr)); rec_dbg(lev, " [ tcf_meta_val left(%d) ]", sizeof(*left)); rec_dbg(lev, " kind(%d): 0x%04x(%s,%s)", sizeof(left->kind), left->kind, conv_tcf_meta_type(TCF_META_TYPE(left->kind), 1), conv_tcf_meta_id(TCF_META_ID(left->kind), 1)); rec_dbg(lev, " shift(%d): %d", sizeof(left->shift), left->shift); rec_dbg(lev, " op(%d): %d(%s)", sizeof(left->op), left->op, conv_tcf_em_opnd(left->op, 1)); rec_dbg(lev, " [ tcf_meta_val right(%d) ]", sizeof(*right)); rec_dbg(lev, " kind(%d): 0x%04x(%s,%s)", sizeof(right->kind), right->kind, conv_tcf_meta_type(TCF_META_TYPE(right->kind), 1), conv_tcf_meta_id(TCF_META_ID(right->kind), 1)); rec_dbg(lev, " shift(%d): %d", sizeof(right->shift), right->shift); rec_dbg(lev, " op(%d): %d(%s)", sizeof(right->op), right->op, conv_tcf_em_opnd(right->op, 1)); return(hdr); }
/* * debug attribute TCA_RSVP_PINFO */ void debug_tca_rsvp_pinfo(int lev, struct rtattr *rsvp, const char *name) { struct tc_rsvp_pinfo *pinfo; struct tc_rsvp_gpi *dpi, *spi; if(debug_rta_len_chk(lev, rsvp, name, sizeof(*pinfo))) return; pinfo = (struct tc_rsvp_pinfo *)RTA_DATA(rsvp); dpi = &(pinfo->dpi); spi = &(pinfo->spi); rec_dbg(lev, "%s(%hu):", name, RTA_ALIGN(rsvp->rta_len)); rec_dbg(lev, " [ tc_rsvp_pinfo(%d) ]", sizeof(*pinfo)); rec_dbg(lev, " [ tc_rsvp_gpi dpi(%d) ]", sizeof(*dpi)); rec_dbg(lev, " key(%d): 0x%08x", sizeof(dpi->key), dpi->key); rec_dbg(lev, " mask(%d): 0x%08x", sizeof(dpi->mask), dpi->mask); rec_dbg(lev, " offset(%d): %d", sizeof(dpi->offset), dpi->offset); rec_dbg(lev, " [ tc_rsvp_gpi spi(%d) ]", sizeof(*spi)); rec_dbg(lev, " key(%d): 0x%08x", sizeof(spi->key), spi->key); rec_dbg(lev, " mask(%d): 0x%08x", sizeof(spi->mask), spi->mask); rec_dbg(lev, " offset(%d): %d", sizeof(spi->offset), spi->offset); rec_dbg(lev, " protocol(%d): %d", sizeof(pinfo->protocol), pinfo->protocol); rec_dbg(lev, " tunnelid(%d): %d", sizeof(pinfo->tunnelid), pinfo->tunnelid); rec_dbg(lev, " tunnelhdr(%d): %d", sizeof(pinfo->tunnelhdr), pinfo->tunnelhdr); rec_dbg(lev, " pad(%d): %d", sizeof(pinfo->pad), pinfo->pad); }
/* * debug attribute RTA_CACHEINFO */ void debug_rta_cacheinfo(int lev, struct rtattr *rta, const char *name) { struct rta_cacheinfo *rtac; if(debug_rta_len_chk(lev, rta, name, sizeof(*rtac))) return; rtac = (struct rta_cacheinfo *)RTA_DATA(rta); rec_dbg(lev, "%s(%hu):", name, RTA_ALIGN(rta->rta_len)); rec_dbg(lev, " [ rta_cacheinfo(%d) ]", sizeof(*rtac)); rec_dbg(lev, " rta_clntref(%d): %u", sizeof(rtac->rta_clntref), rtac->rta_clntref); rec_dbg(lev, " rta_lastuse(%d): %u", sizeof(rtac->rta_lastuse), rtac->rta_lastuse); rec_dbg(lev, " rta_expires(%d): %d", sizeof(rtac->rta_expires), rtac->rta_expires); rec_dbg(lev, " rta_error(%d): %u", sizeof(rtac->rta_error), rtac->rta_error); rec_dbg(lev, " rta_used(%d): %u", sizeof(rtac->rta_used), rtac->rta_used); rec_dbg(lev, " rta_id(%d): %u", sizeof(rtac->rta_id), rtac->rta_id); rec_dbg(lev, " rta_ts(%d): %u", sizeof(rtac->rta_ts), rtac->rta_ts); rec_dbg(lev, " rta_tsage(%d): %u", sizeof(rtac->rta_tsage), rtac->rta_tsage); }
/* * debug attribute RTA_MULTIPATH */ void debug_rta_multipath(int lev, struct rtmsg *rtm, struct rtattr *rta, const char *name) { struct rtnexthop *rtnh; int rtnh_len = RTA_PAYLOAD(rta); struct rtattr *rtnha[__RTA_MAX]; char ifname[IFNAMSIZ] = ""; char flags_list[MAX_STR_SIZE] = ""; if(debug_rta_len_chk(lev, rta, name, sizeof(*rtnh))) return; rec_dbg(lev, "%s(%hu):", name, RTA_ALIGN(rta->rta_len)); for(rtnh = RTA_DATA(rta); RTNH_OK(rtnh, rtnh_len); rtnh = RTNH_NEXT(rtnh), rtnh_len -= RTNH_ALIGN(rtnh->rtnh_len)) { conv_rtnh_flags(rtnh->rtnh_flags, flags_list, sizeof(flags_list)); if_indextoname_from_lists(rtnh->rtnh_ifindex, ifname); rec_dbg(lev, " [ rtnexthop(%d) ]", sizeof(*rtnh)); rec_dbg(lev, " rtnh_len(%d): %hu", sizeof(rtnh->rtnh_len), rtnh->rtnh_len); rec_dbg(lev, " rtnh_flags(%d): %d(%s)", sizeof(rtnh->rtnh_flags), rtnh->rtnh_flags, flags_list); rec_dbg(lev, " rtnh_hops(%d): %d", sizeof(rtnh->rtnh_hops), rtnh->rtnh_hops); rec_dbg(lev, " rtnh_ifindex(%d): %d(%s)", sizeof(rtnh->rtnh_ifindex), rtnh->rtnh_ifindex, ifname); parse_rtattr(rtnha, RTA_MAX, RTNH_DATA(rtnh), rtnh->rtnh_len - sizeof(*rtnh)); if(rtnha[RTA_GATEWAY]) debug_rta_af(lev+3, rtnha[RTA_GATEWAY], "RTA_GATEWAY", rtm->rtm_family); } }
/* * debug prio options */ void debug_tca_options_prio(int lev, struct rtattr *tca, const char *name) { struct tc_prio_qopt *qopt; char prio[MAX_STR_SIZE] = ""; char *p = prio; int i, len = sizeof(prio); if(debug_rta_len_chk(lev, tca, name, sizeof(*qopt))) return; qopt = (struct tc_prio_qopt *)RTA_DATA(tca); for(i = 0; i < TC_PRIO_MAX + 1; i++) { if(i == TC_PRIO_MAX) APPEND_SNPRINTF(rc, p, len, "%d ", qopt->priomap[i]); else APPEND_SNPRINTF(rc, p, len, "%d-", qopt->priomap[i]); } if (p - prio == sizeof(prio)) { rec_dbg(lev, "%s(%hu): -- priomap too long --", name, RTA_ALIGN(tca->rta_len)); return; } rec_dbg(lev, "%s(%hu):", name, RTA_ALIGN(tca->rta_len)); rec_dbg(lev, " [ tc_prio_qopt(%d) ]", sizeof(*qopt)); rec_dbg(lev, " bands(%d): %d", sizeof(qopt->bands), qopt->bands); rec_dbg(lev, " priomap(%d): %s", sizeof(qopt->priomap), prio); }
/* * debug netem options */ void debug_tca_options_netem(int lev, struct rtattr *tca, const char *name) { struct rtattr *netem[__TCA_NETEM_MAX]; struct tc_netem_qopt *qopt; if(debug_rta_len_chk(lev, tca, name, sizeof(*qopt))) return; qopt = (struct tc_netem_qopt *)RTA_DATA(tca); rec_dbg(lev, "%s(%hu):", name, RTA_ALIGN(tca->rta_len)); rec_dbg(lev, " [ tc_netem_qopt(%d) ]", sizeof(*qopt)); rec_dbg(lev, " latency(%d): %u", sizeof(qopt->latency), qopt->latency); rec_dbg(lev, " limit(%d): %u", sizeof(qopt->limit), qopt->limit); rec_dbg(lev, " loss(%d): %u", sizeof(qopt->loss), qopt->loss); rec_dbg(lev, " gap(%d): %u", sizeof(qopt->gap), qopt->gap); rec_dbg(lev, " duplicate(%d): %u", sizeof(qopt->duplicate), qopt->duplicate); rec_dbg(lev, " jitter(%d): %u", sizeof(qopt->jitter), qopt->jitter); parse_rtattr(netem, TCA_NETEM_MAX, RTA_DATA(tca) + sizeof(struct tc_netem_qopt), RTA_PAYLOAD(tca) - sizeof(struct tc_netem_qopt)); if(netem[TCA_NETEM_CORR]) debug_tca_netem_corr(lev+1, netem[TCA_NETEM_CORR], "TCA_NETEM_CORR"); if(netem[TCA_NETEM_DELAY_DIST]) debug_rta_ignore(lev+1, netem[TCA_NETEM_DELAY_DIST], "TCA_NETEM_DELAY_DIST"); if(netem[TCA_NETEM_REORDER]) debug_tca_netem_reorder(lev+1, netem[TCA_NETEM_REORDER], "TCA_NETEM_REORDER"); if(netem[TCA_NETEM_CORRUPT]) debug_tca_netem_corrupt(lev+1, netem[TCA_NETEM_CORRUPT], "TCA_NETEM_CORRUPT"); #if HAVE_DECL_TCA_NETEM_LOSS if(netem[TCA_NETEM_LOSS]) debug_tca_netem_loss(lev+1, netem[TCA_NETEM_LOSS], "TCA_NETEM_LOSS"); #endif #if HAVE_DECL_TCA_NETEM_RATE if(netem[TCA_NETEM_RATE]) debug_tca_netem_rate(lev+1, netem[TCA_NETEM_RATE], "TCA_NETEM_RATE"); #endif #if HAVE_DECL_TCA_NETEM_ECN if(netem[TCA_NETEM_ECN]) debug_rta_u32(lev+1, netem[TCA_NETEM_ECN], "TCA_NETEM_ECN", NULL); #endif }
/* * debug attribute TCA_*_CLASSID */ void debug_tca_classid(int lev, struct rtattr *tca, const char *name) { unsigned n_classid; char s_classid[MAX_STR_SIZE] = ""; if(debug_rta_len_chk(lev, tca, name, sizeof(n_classid))) return; n_classid = *(unsigned *)RTA_DATA(tca); parse_tc_handle(s_classid, sizeof(s_classid), n_classid); rec_dbg(lev, "%s(%hu): 0x%08x(%s)", name, RTA_ALIGN(tca->rta_len), n_classid, s_classid); }
/* * debug interface index attribute */ void debug_rta_ifindex(int lev, struct rtattr *rta, const char *name) { unsigned ifindex; char ifname[IFNAMSIZ] = ""; if(debug_rta_len_chk(lev, rta, name, sizeof(unsigned))) return; ifindex = *(unsigned *)RTA_DATA(rta); if_indextoname_from_lists(ifindex, ifname); rec_dbg(lev, "%s(%hu): %u(%s)", name, RTA_ALIGN(rta->rta_len), ifindex, ifname); return; }
/* * debug tc_qfq_xstats */ void debug_tc_qfq_xstats(int lev, struct rtattr *tca, const char *name) { struct tc_qfq_stats *stats; if(debug_rta_len_chk(lev, tca, name, sizeof(*stats))) return; stats = (struct tc_qfq_stats *)RTA_DATA(tca); rec_dbg(lev, "%s(%hu):", name, RTA_ALIGN(tca->rta_len)); rec_dbg(lev, " [ tc_qfq_stats(%d) ]", sizeof(*stats)); rec_dbg(lev, " weight(%d): %u", sizeof(stats->weight), stats->weight); rec_dbg(lev, " lmax(%d): %u", sizeof(stats->lmax), stats->lmax); }
/* * debug attribute TCA_HFSC_*SC */ void debug_tca_hfsc_sc(int lev, struct rtattr *hfsc, const char *name) { struct tc_service_curve *sc; if(debug_rta_len_chk(lev, hfsc, name, sizeof(*sc))) return; sc = (struct tc_service_curve *)RTA_DATA(hfsc); rec_dbg(lev, "%s(%hu):", name, RTA_ALIGN(hfsc->rta_len)); rec_dbg(lev, " [ tc_service_curve(%d) ]", sizeof(*sc)); rec_dbg(lev, " m1(%d): %u", sizeof(sc->m1), sc->m1); rec_dbg(lev, " d(%d): %u", sizeof(sc->d), sc->d); rec_dbg(lev, " m2(%d): %u", sizeof(sc->m2), sc->m2); }
/* * debug attribute TCA_NETEM_CORR */ void debug_tca_netem_corr(int lev, struct rtattr *netem, const char *name) { struct tc_netem_corr *corr; if(debug_rta_len_chk(lev, netem, name, sizeof(*corr))) return; corr = (struct tc_netem_corr *)RTA_DATA(netem); rec_dbg(lev, "%s(%hu):", name, RTA_ALIGN(netem->rta_len)); rec_dbg(lev, " [ tc_netem_corr(%d) ]", sizeof(*corr)); rec_dbg(lev, " delay_corr(%d): %u", sizeof(corr->delay_corr), corr->delay_corr); rec_dbg(lev, " loss_corr(%d): %u", sizeof(corr->loss_corr), corr->loss_corr); rec_dbg(lev, " dup_corr(%d): %u", sizeof(corr->dup_corr), corr->dup_corr); }
/* * debug int attribute */ void debug_rta_s32x(int lev, struct rtattr *rta, const char *name, const char *(*conv)(int num, unsigned char debug)) { if(debug_rta_len_chk(lev, rta, name, sizeof(int))) return; int data = *(int *)RTA_DATA(rta); if(conv) rec_dbg(lev, "%s(%hu): 0x%08x(%s)", name, RTA_ALIGN(rta->rta_len), data, conv(data, 1)); else rec_dbg(lev, "%s(%hu): 0x%08x", name, RTA_ALIGN(rta->rta_len), data); return; }
/* * debug unsigned short attribute */ void debug_rta_u16(int lev, struct rtattr *rta, const char *name, const char *(*conv)(unsigned short num, unsigned char debug)) { if(debug_rta_len_chk(lev, rta, name, sizeof(unsigned short))) return; unsigned short data = *(unsigned short *)RTA_DATA(rta); if(conv) rec_dbg(lev, "%s(%hu): %hu(%s)", name, RTA_ALIGN(rta->rta_len), data, conv(data, 1)); else rec_dbg(lev, "%s(%hu): %hu", name, RTA_ALIGN(rta->rta_len), data); return; }
/* * debug attribute NETEM_LOSS_GE */ void debug_netem_loss_ge(int lev, struct rtattr *loss, const char *name) { struct tc_netem_gemodel *ge; if(debug_rta_len_chk(lev, loss, name, sizeof(*ge))) return; ge = (struct tc_netem_gemodel *)RTA_DATA(loss); rec_dbg(lev, "%s(%hu):", name, RTA_ALIGN(loss->rta_len)); rec_dbg(lev, " [ tc_netem_gemodel(%d) ]", sizeof(*ge)); rec_dbg(lev, " p(%d): %u", sizeof(ge->p), ge->p); rec_dbg(lev, " r(%d): %u", sizeof(ge->r), ge->r); rec_dbg(lev, " h(%d): %u", sizeof(ge->h), ge->h); rec_dbg(lev, " k1(%d): %u", sizeof(ge->k1), ge->k1); }
/* * debug attribute TCA_NETEM_REORDER */ void debug_tca_netem_reorder(int lev, struct rtattr *netem, const char *name) { struct tc_netem_reorder *reorder; if(debug_rta_len_chk(lev, netem, name, sizeof(*reorder))) return; reorder = (struct tc_netem_reorder *)RTA_DATA(netem); rec_dbg(lev, "%s(%hu):", name, RTA_ALIGN(netem->rta_len)); rec_dbg(lev, " [ tc_netem_reorder(%d) ]", sizeof(*reorder)); rec_dbg(lev, " probability(%d): %u", sizeof(reorder->probability), reorder->probability); rec_dbg(lev, " correlation(%d): %u", sizeof(reorder->correlation), reorder->correlation); }
/* * debug attribute TCA_NETEM_CORRUPT */ void debug_tca_netem_corrupt(int lev, struct rtattr *netem, const char *name) { struct tc_netem_corrupt *corrupt; if(debug_rta_len_chk(lev, netem, name, sizeof(*corrupt))) return; corrupt = (struct tc_netem_corrupt *)RTA_DATA(netem); rec_dbg(lev, "%s(%hu):", name, RTA_ALIGN(netem->rta_len)); rec_dbg(lev, " [ tc_netem_corrupt(%d) ]", sizeof(*corrupt)); rec_dbg(lev, " probability(%d): %u", sizeof(corrupt->probability), corrupt->probability); rec_dbg(lev, " correlation(%d): %u", sizeof(corrupt->correlation), corrupt->correlation); }
/* * debug tc_red_xstats */ void debug_tc_red_xstats(int lev, struct rtattr *tca, const char *name) { struct tc_red_xstats *xstats; if(debug_rta_len_chk(lev, tca, name, sizeof(*xstats))) return; xstats = (struct tc_red_xstats *)RTA_DATA(tca); rec_dbg(lev, "%s(%hu):", name, RTA_ALIGN(tca->rta_len)); rec_dbg(lev, " [ tc_red_xstats(%d) ]", sizeof(*xstats)); rec_dbg(lev, " early(%d): %u", sizeof(xstats->early), xstats->early); rec_dbg(lev, " pdrop(%d): %u", sizeof(xstats->pdrop), xstats->pdrop); rec_dbg(lev, " other(%d): %u", sizeof(xstats->other), xstats->other); rec_dbg(lev, " marked(%d): %u", sizeof(xstats->marked), xstats->marked); }
/* * debug attribute TCA_EMATCH_TREE_HDR */ int debug_tca_ematch_tree_hdr(int lev, struct rtattr *em_tree, const char *name) { struct tcf_ematch_tree_hdr *hdr; if(debug_rta_len_chk(lev, em_tree, name, sizeof(*hdr))) return(-1); hdr = (struct tcf_ematch_tree_hdr *)RTA_DATA(em_tree); rec_dbg(lev, "%s(%hu):", name, RTA_ALIGN(em_tree->rta_len)); rec_dbg(lev, " [ tcf_ematch_tree_hdr(%d) ]", sizeof(*hdr)); rec_dbg(lev, " nmatches(%d): %hu", sizeof(hdr->nmatches), hdr->nmatches); rec_dbg(lev, " progid(%d): %hu", sizeof(hdr->progid), hdr->progid); return(hdr->nmatches); }
/* * debug attribute NETEM_LOSS_GI */ void debug_netem_loss_gi(int lev, struct rtattr *loss, const char *name) { struct tc_netem_gimodel *gi; if(debug_rta_len_chk(lev, loss, name, sizeof(*gi))) return; gi = (struct tc_netem_gimodel *)RTA_DATA(loss); rec_dbg(lev, "%s(%hu):", name, RTA_ALIGN(loss->rta_len)); rec_dbg(lev, " [ tc_netem_gimodel(%d) ]", sizeof(*gi)); rec_dbg(lev, " p13(%d): %u", sizeof(gi->p13), gi->p13); rec_dbg(lev, " p31(%d): %u", sizeof(gi->p31), gi->p31); rec_dbg(lev, " p32(%d): %u", sizeof(gi->p32), gi->p32); rec_dbg(lev, " p14(%d): %u", sizeof(gi->p14), gi->p14); rec_dbg(lev, " p23(%d): %u", sizeof(gi->p23), gi->p23); }
/* * debug attribute TCA_NETEM_RATE */ void debug_tca_netem_rate(int lev, struct rtattr *netem, const char *name) { struct tc_netem_rate *rate; if(debug_rta_len_chk(lev, netem, name, sizeof(*rate))) return; rate = (struct tc_netem_rate *)RTA_DATA(netem); rec_dbg(lev, "%s(%hu):", name, RTA_ALIGN(netem->rta_len)); rec_dbg(lev, " [ tc_netem_rate(%d) ]", sizeof(*rate)); rec_dbg(lev, " rate(%d): %u", sizeof(rate->rate), rate->rate); rec_dbg(lev, " packet_overhead(%d): %u", sizeof(rate->packet_overhead), rate->packet_overhead); rec_dbg(lev, " cell_size(%d): %u", sizeof(rate->cell_size), rate->cell_size); rec_dbg(lev, " cell_overhead(%d): %u", sizeof(rate->cell_overhead), rate->cell_overhead); }
/* * debug tc_sfb_xstats */ void debug_tc_sfb_xstats(int lev, struct rtattr *tca, const char *name) { struct tc_sfb_xstats *xstats; if(debug_rta_len_chk(lev, tca, name, sizeof(*xstats))) return; xstats = (struct tc_sfb_xstats *)RTA_DATA(tca); rec_dbg(lev, "%s(%hu):", name, RTA_ALIGN(tca->rta_len)); rec_dbg(lev, " [ tc_sfb_xstats(%d) ]", sizeof(*xstats)); rec_dbg(lev, " earlydrop(%d): %u", sizeof(xstats->earlydrop), xstats->earlydrop); rec_dbg(lev, " penaltydrop(%d): %u", sizeof(xstats->penaltydrop), xstats->penaltydrop); rec_dbg(lev, " bucketdrop(%d): %u", sizeof(xstats->bucketdrop), xstats->bucketdrop); rec_dbg(lev, " queuedrop(%d): %u", sizeof(xstats->queuedrop), xstats->queuedrop); rec_dbg(lev, " childdrop(%d): %u", sizeof(xstats->childdrop), xstats->childdrop); rec_dbg(lev, " marked(%d): %u", sizeof(xstats->marked), xstats->marked); rec_dbg(lev, " maxqlen(%d): %u", sizeof(xstats->maxqlen), xstats->maxqlen); rec_dbg(lev, " maxprob(%d): %u", sizeof(xstats->maxprob), xstats->maxprob); rec_dbg(lev, " avgprob(%d): %u", sizeof(xstats->avgprob), xstats->avgprob); }
/* * debug attribute TCA_CHOKE_PARMS */ void debug_tca_choke_parms(int lev, struct rtattr *choke, const char *name) { struct tc_choke_qopt *qopt; char list[MAX_STR_SIZE] = ""; if(debug_rta_len_chk(lev, choke, name, sizeof(*qopt))) return; qopt = (struct tc_choke_qopt *)RTA_DATA(choke); conv_tc_red_flags(qopt->flags, list, sizeof(list), 1); rec_dbg(lev, "%s(%hu):", name, RTA_ALIGN(choke->rta_len)); rec_dbg(lev, " [ tc_choke_qopt(%d) ]", sizeof(*qopt)); rec_dbg(lev, " limit(%d): %d", sizeof(qopt->limit), qopt->limit); rec_dbg(lev, " qth_min(%d): %u", sizeof(qopt->qth_min), qopt->qth_min); rec_dbg(lev, " qth_max(%d): %u", sizeof(qopt->qth_max), qopt->qth_max); rec_dbg(lev, " Wlog(%d): %d", sizeof(qopt->Wlog), qopt->Wlog); rec_dbg(lev, " Plog(%d): %d", sizeof(qopt->Plog), qopt->Plog); rec_dbg(lev, " Scell_log(%d): %d", sizeof(qopt->Scell_log), qopt->Scell_log); rec_dbg(lev, " flags(%d): %d(%s)", sizeof(qopt->flags), qopt->flags, list); }