-/* $OpenBSD: if.c,v 1.669 2022/11/08 17:57:47 kn Exp $ */
+/* $OpenBSD: if.c,v 1.670 2022/11/08 18:43:22 kn Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
TAILQ_HEAD(, ifg_group) ifg_head = TAILQ_HEAD_INITIALIZER(ifg_head);
-LIST_HEAD(, if_clone) if_cloners = LIST_HEAD_INITIALIZER(if_cloners);
-int if_cloners_count;
+LIST_HEAD(, if_clone) if_cloners =
+ LIST_HEAD_INITIALIZER(if_cloners); /* [I] list of clonable interfaces */
+int if_cloners_count; /* [I] number of clonable interfaces */
struct rwlock if_cloners_lock = RWLOCK_INITIALIZER("clonelk");
-/* $OpenBSD: if_var.h,v 1.117 2022/09/08 10:22:06 kn Exp $ */
+/* $OpenBSD: if_var.h,v 1.118 2022/11/08 18:43:22 kn Exp $ */
/* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */
/*
* interfaces. These routines live in the files if.c and route.c
*/
+/*
+ * Locks used to protect struct members in this file:
+ * I immutable after creation
+ * d protection left do the driver
+ * c only used in ioctl or routing socket contexts (kernel lock)
+ * K kernel lock
+ * N net lock
+ *
+ * For SRP related structures that allow lock-free reads, the write lock
+ * is indicated below.
+ */
+
struct rtentry;
struct ifnet;
struct task;
* Structure describing a `cloning' interface.
*/
struct if_clone {
- LIST_ENTRY(if_clone) ifc_list; /* on list of cloners */
+ LIST_ENTRY(if_clone) ifc_list; /* [I] on list of cloners */
const char *ifc_name; /* name of device, e.g. `gif' */
size_t ifc_namelen; /* length of name */
.ifc_destroy = destroy, \
}
-/*
- * Locks used to protect struct members in this file:
- * I immutable after creation
- * d protection left do the driver
- * c only used in ioctl or routing socket contexts (kernel lock)
- * K kernel lock
- * N net lock
- *
- * For SRP related structures that allow lock-free reads, the write lock
- * is indicated below.
- */
/*
* Structure defining a queue for a network interface.
*