Lines Matching defs:altq
106 #ifdef ALTQ
107 #include <altq/altq.h>
126 #ifdef ALTQ
132 #endif /* ALTQ */
152 #ifdef ALTQ
387 #ifdef ALTQ
390 #endif /* ALTQ */
569 #ifdef ALTQ
734 #ifdef ALTQ
756 struct pf_altq *altq;
759 /* Purge the old altq list */
760 while ((altq = TAILQ_FIRST(pf_altqs_inactive)) != NULL) {
761 TAILQ_REMOVE(pf_altqs_inactive, altq, entries);
762 if (altq->qname[0] == 0) {
764 error = altq_remove(altq);
766 pf_qid_unref(altq->qid);
767 pool_put(&pf_altq_pl, altq);
779 struct pf_altq *altq;
784 /* Purge the old altq list */
785 while ((altq = TAILQ_FIRST(pf_altqs_inactive)) != NULL) {
786 TAILQ_REMOVE(pf_altqs_inactive, altq, entries);
787 if (altq->qname[0] == 0) {
789 error = altq_remove(altq);
791 pf_qid_unref(altq->qid);
792 pool_put(&pf_altq_pl, altq);
802 struct pf_altq *altq;
816 TAILQ_FOREACH(altq, pf_altqs_active, entries) {
817 if (altq->qname[0] == 0) {
819 error = altq_pfattach(altq);
821 error = pf_enable_altq(altq);
829 /* Purge the old altq list */
830 while ((altq = TAILQ_FIRST(pf_altqs_inactive)) != NULL) {
831 TAILQ_REMOVE(pf_altqs_inactive, altq, entries);
832 if (altq->qname[0] == 0) {
835 error = pf_disable_altq(altq);
836 err = altq_pfdetach(altq);
839 err = altq_remove(altq);
843 pf_qid_unref(altq->qid);
844 pool_put(&pf_altq_pl, altq);
853 pf_enable_altq(struct pf_altq *altq)
859 if ((ifp = ifunit(altq->ifname)) == NULL)
867 tb.rate = altq->ifbandwidth;
868 tb.depth = altq->tbrsize;
878 pf_disable_altq(struct pf_altq *altq)
884 if ((ifp = ifunit(altq->ifname)) == NULL)
891 if (altq->altq_disc != ifp->if_snd.altq_disc)
906 #endif /* ALTQ */
1491 #ifdef ALTQ
1741 #ifdef ALTQ
1754 #endif /* ALTQ */
2226 #ifdef ALTQ
2228 struct pf_altq *altq;
2230 /* enable all altq interfaces on active list */
2231 TAILQ_FOREACH(altq, pf_altqs_active, entries) {
2232 if (altq->qname[0] == 0) {
2233 error = pf_enable_altq(altq);
2240 DPFPRINTF(PF_DEBUG_MISC, ("altq: started\n"));
2245 struct pf_altq *altq;
2247 /* disable all altq interfaces on active list */
2248 TAILQ_FOREACH(altq, pf_altqs_active, entries) {
2249 if (altq->qname[0] == 0) {
2250 error = pf_disable_altq(altq);
2257 DPFPRINTF(PF_DEBUG_MISC, ("altq: stopped\n"));
2263 struct pf_altq *altq, *a;
2269 altq = pool_get(&pf_altq_pl, PR_NOWAIT);
2270 if (altq == NULL) {
2274 bcopy(&paa->altq, altq, sizeof(struct pf_altq));
2280 if (altq->qname[0] != 0) {
2281 if ((altq->qid = pf_qname2qid(altq->qname)) == 0) {
2283 pool_put(&pf_altq_pl, altq);
2287 if (strncmp(a->ifname, altq->ifname,
2289 altq->altq_disc = a->altq_disc;
2295 error = altq_add(altq);
2297 pool_put(&pf_altq_pl, altq);
2301 TAILQ_INSERT_TAIL(pf_altqs_inactive, altq, entries);
2302 bcopy(altq, &paa->altq, sizeof(struct pf_altq));
2308 struct pf_altq *altq;
2311 TAILQ_FOREACH(altq, pf_altqs_active, entries)
2319 struct pf_altq *altq;
2327 altq = TAILQ_FIRST(pf_altqs_active);
2328 while ((altq != NULL) && (nr < paa->nr)) {
2329 altq = TAILQ_NEXT(altq, entries);
2332 if (altq == NULL) {
2336 bcopy(altq, &paa->altq, sizeof(struct pf_altq));
2347 struct pf_altq *altq;
2357 altq = TAILQ_FIRST(pf_altqs_active);
2358 while ((altq != NULL) && (nr < pq->nr)) {
2359 altq = TAILQ_NEXT(altq, entries);
2362 if (altq == NULL) {
2366 error = altq_getqstats(altq, pq->buf, &nbytes);
2368 pq->scheduler = altq->scheduler;
2373 #endif /* ALTQ */
2877 #ifdef ALTQ
2891 #endif /* ALTQ */
2946 #ifdef ALTQ
2960 #endif /* ALTQ */
3011 #ifdef ALTQ
3027 #endif /* ALTQ */
3068 #ifdef ALTQ
3076 #endif /* ALTQ */