+#define ARRAY_SIZE (4096)
+
+static uint16_t *id_array = NULL;
+static bitstr_t *id_bits = NULL;
+static uint32_t array_ptr = 0;
+static uint32_t random_id_statistics = 0;
+static uint64_t random_id_collisions = 0;
+static uint64_t random_id_total = 0;
+
+decl_lck_mtx_data(static, ipid_lock);
+static lck_attr_t *ipid_lock_attr;
+static lck_grp_t *ipid_lock_grp;
+static lck_grp_attr_t *ipid_lock_grp_attr;
+
+SYSCTL_UINT(_net_inet_ip, OID_AUTO, random_id_statistics,
+ CTLFLAG_RW | CTLFLAG_LOCKED, &random_id_statistics, 0,
+ "Enable IP ID statistics");
+SYSCTL_QUAD(_net_inet_ip, OID_AUTO, random_id_collisions,
+ CTLFLAG_RD | CTLFLAG_LOCKED, &random_id_collisions,
+ "Count of IP ID collisions");
+SYSCTL_QUAD(_net_inet_ip, OID_AUTO, random_id_total,
+ CTLFLAG_RD | CTLFLAG_LOCKED, &random_id_total,
+ "Count of IP IDs created");