escape from old-ALTQ and new-ALTQ difference
This commit is contained in:
parent
ef77780b63
commit
8bc0b4b95d
4
dist/pf/sbin/pfctl/parse.y
vendored
4
dist/pf/sbin/pfctl/parse.y
vendored
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: parse.y,v 1.2 2004/06/22 15:16:30 itojun Exp $ */
|
||||
/* $NetBSD: parse.y,v 1.3 2004/06/23 04:38:43 itojun Exp $ */
|
||||
/* $OpenBSD: parse.y,v 1.449 2004/03/20 23:20:20 david Exp $ */
|
||||
|
||||
/*
|
||||
@ -1287,8 +1287,10 @@ cbqflags_list : cbqflags_item { $$ |= $1; }
|
||||
cbqflags_item : STRING {
|
||||
if (!strcmp($1, "default"))
|
||||
$$ = CBQCLF_DEFCLASS;
|
||||
#ifdef CBQCLF_BORROW
|
||||
else if (!strcmp($1, "borrow"))
|
||||
$$ = CBQCLF_BORROW;
|
||||
#endif
|
||||
else if (!strcmp($1, "red"))
|
||||
$$ = CBQCLF_RED;
|
||||
else if (!strcmp($1, "ecn"))
|
||||
|
4
dist/pf/sbin/pfctl/pfctl_altq.c
vendored
4
dist/pf/sbin/pfctl/pfctl_altq.c
vendored
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pfctl_altq.c,v 1.2 2004/06/22 15:16:30 itojun Exp $ */
|
||||
/* $NetBSD: pfctl_altq.c,v 1.3 2004/06/23 04:38:43 itojun Exp $ */
|
||||
/* $OpenBSD: pfctl_altq.c,v 1.83 2004/03/14 21:51:44 dhartmei Exp $ */
|
||||
|
||||
/*
|
||||
@ -560,8 +560,10 @@ print_cbq_opts(const struct pf_altq *a)
|
||||
printf(" cleardscp");
|
||||
if (opts->flags & CBQCLF_FLOWVALVE)
|
||||
printf(" flowvalve");
|
||||
#ifdef CBQCLF_BORROW
|
||||
if (opts->flags & CBQCLF_BORROW)
|
||||
printf(" borrow");
|
||||
#endif
|
||||
if (opts->flags & CBQCLF_WRR)
|
||||
printf(" wrr");
|
||||
if (opts->flags & CBQCLF_EFFICIENT)
|
||||
|
10
dist/pf/sbin/pfctl/pfctl_qstats.c
vendored
10
dist/pf/sbin/pfctl/pfctl_qstats.c
vendored
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pfctl_qstats.c,v 1.2 2004/06/22 15:16:30 itojun Exp $ */
|
||||
/* $NetBSD: pfctl_qstats.c,v 1.3 2004/06/23 04:38:43 itojun Exp $ */
|
||||
/* $OpenBSD: pfctl_qstats.c,v 1.29 2004/03/15 15:25:44 dhartmei Exp $ */
|
||||
|
||||
/*
|
||||
@ -42,8 +42,10 @@
|
||||
|
||||
union class_stats {
|
||||
class_stats_t cbq_stats;
|
||||
#ifdef __OpenBSD__
|
||||
struct priq_classstats priq_stats;
|
||||
struct hfsc_classstats hfsc_stats;
|
||||
#endif
|
||||
};
|
||||
|
||||
#define AVGN_MAX 8
|
||||
@ -310,6 +312,7 @@ print_cbqstats(struct queue_stats cur)
|
||||
void
|
||||
print_priqstats(struct queue_stats cur)
|
||||
{
|
||||
#ifdef __OpenBSD__
|
||||
printf(" [ pkts: %10llu bytes: %10llu "
|
||||
"dropped pkts: %6llu bytes: %6llu ]\n",
|
||||
(unsigned long long)cur.data.priq_stats.xmitcnt.packets,
|
||||
@ -325,11 +328,13 @@ print_priqstats(struct queue_stats cur)
|
||||
printf(" [ measured: %7.1f packets/s, %s/s ]\n",
|
||||
cur.avg_packets / STAT_INTERVAL,
|
||||
rate2str((8 * cur.avg_bytes) / STAT_INTERVAL));
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
print_hfscstats(struct queue_stats cur)
|
||||
{
|
||||
#ifdef __OpenBSD__
|
||||
printf(" [ pkts: %10llu bytes: %10llu "
|
||||
"dropped pkts: %6llu bytes: %6llu ]\n",
|
||||
(unsigned long long)cur.data.hfsc_stats.xmit_cnt.packets,
|
||||
@ -345,6 +350,7 @@ print_hfscstats(struct queue_stats cur)
|
||||
printf(" [ measured: %7.1f packets/s, %s/s ]\n",
|
||||
cur.avg_packets / STAT_INTERVAL,
|
||||
rate2str((8 * cur.avg_bytes) / STAT_INTERVAL));
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
@ -379,6 +385,7 @@ update_avg(struct pf_altq_node *a)
|
||||
b = qs->data.cbq_stats.xmit_cnt.bytes;
|
||||
p = qs->data.cbq_stats.xmit_cnt.packets;
|
||||
break;
|
||||
#ifdef __OpenBSD__
|
||||
case ALTQT_PRIQ:
|
||||
b = qs->data.priq_stats.xmitcnt.bytes;
|
||||
p = qs->data.priq_stats.xmitcnt.packets;
|
||||
@ -387,6 +394,7 @@ update_avg(struct pf_altq_node *a)
|
||||
b = qs->data.hfsc_stats.xmit_cnt.bytes;
|
||||
p = qs->data.hfsc_stats.xmit_cnt.packets;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
b = 0;
|
||||
p = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user