there instead of pf_ioctl.c.
ok henning@
-/* $OpenBSD: hfsc.c,v 1.16 2015/03/03 11:14:00 henning Exp $ */
+/* $OpenBSD: hfsc.c,v 1.17 2015/04/11 13:00:12 dlg Exp $ */
/*
* Copyright (c) 2012-2013 Henning Brauer <henning@openbsd.org>
#define HFSC_HT_INFINITY 0xffffffffffffffffLL /* infinite time value */
+struct pool hfsc_class_pl, hfsc_classq_pl, hfsc_internal_sc_pl;
+
u_int64_t
hfsc_microuptime(void)
{
free(old, M_DEVBUF, 0);
}
+void
+hfsc_initialize(void)
+{
+ pool_init(&hfsc_class_pl, sizeof(struct hfsc_class), 0, 0, PR_WAITOK,
+ "hfscclass", NULL);
+ pool_init(&hfsc_classq_pl, sizeof(struct hfsc_classq), 0, 0, PR_WAITOK,
+ "hfscclassq", NULL);
+ pool_init(&hfsc_internal_sc_pl, sizeof(struct hfsc_internal_sc), 0, 0,
+ PR_WAITOK, "hfscintsc", NULL);
+}
+
int
hfsc_attach(struct ifnet *ifp)
{
-/* $OpenBSD: hfsc.h,v 1.6 2014/04/19 16:02:17 henning Exp $ */
+/* $OpenBSD: hfsc.h,v 1.7 2015/04/11 13:00:12 dlg Exp $ */
/*
* Copyright (c) 2012-2013 Henning Brauer <henning@openbsd.org>
struct ifnet; struct ifqueue; struct pf_queuespec;
+void hfsc_initialize(void);
int hfsc_attach(struct ifnet *);
int hfsc_detach(struct ifnet *);
void hfsc_purge(struct ifqueue *);
-/* $OpenBSD: pf.c,v 1.910 2015/04/08 12:50:21 mikeb Exp $ */
+/* $OpenBSD: pf.c,v 1.911 2015/04/11 13:00:12 dlg Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
struct pool pf_src_tree_pl, pf_rule_pl, pf_queue_pl;
struct pool pf_state_pl, pf_state_key_pl, pf_state_item_pl;
struct pool pf_rule_item_pl, pf_sn_item_pl;
-struct pool hfsc_class_pl, hfsc_classq_pl, hfsc_internal_sc_pl;
void pf_init_threshold(struct pf_threshold *, u_int32_t,
u_int32_t);
-/* $OpenBSD: pf_ioctl.c,v 1.284 2015/03/14 03:38:51 jsg Exp $ */
+/* $OpenBSD: pf_ioctl.c,v 1.285 2015/04/11 13:00:12 dlg Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
"pfruleitem", NULL);
pool_init(&pf_queue_pl, sizeof(struct pf_queuespec), 0, 0, 0,
"pfqueue", NULL);
- pool_init(&hfsc_class_pl, sizeof(struct hfsc_class), 0, 0, PR_WAITOK,
- "hfscclass", NULL);
- pool_init(&hfsc_classq_pl, sizeof(struct hfsc_classq), 0, 0, PR_WAITOK,
- "hfscclassq", NULL);
- pool_init(&hfsc_internal_sc_pl, sizeof(struct hfsc_internal_sc), 0, 0,
- PR_WAITOK, "hfscintsc", NULL);
+ hfsc_initialize();
pfr_initialize();
pfi_initialize();
pf_osfp_initialize();
-/* $OpenBSD: pfvar.h,v 1.413 2015/02/15 10:40:53 sthen Exp $ */
+/* $OpenBSD: pfvar.h,v 1.414 2015/04/11 13:00:12 dlg Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
extern struct pool pf_state_pl, pf_state_key_pl, pf_state_item_pl,
pf_rule_item_pl, pf_queue_pl;
extern struct pool pf_state_scrub_pl;
-extern struct pool hfsc_class_pl, hfsc_classq_pl,
- hfsc_internal_sc_pl;
extern void pf_purge_thread(void *);
extern void pf_purge_expired_src_nodes(int);
extern void pf_purge_expired_states(u_int32_t);