+ if (!vlan_bitmap_from_array__(vlans, n_vlans, b)) {
+ free(b);
+ return NULL;
+ }
+ return b;
+}
+
+/* Adds to 4096-bit VLAN bitmap 'b' a 1-bit in each position in the 'n_vlans'
+ * bits indicated in 'vlans'. Returns the number of 1-bits added to 'b'. */
+int
+vlan_bitmap_from_array__(const int64_t *vlans, size_t n_vlans,
+ unsigned long int *b)
+{
+ size_t i;
+ int n;
+