-/* $OpenBSD: nd6.c,v 1.255 2022/11/28 13:10:58 kn Exp $ */
+/* $OpenBSD: nd6.c,v 1.256 2022/11/28 19:13:36 kn Exp $ */
/* $KAME: nd6.c,v 1.280 2002/06/08 19:52:07 itojun Exp $ */
/*
nd = malloc(sizeof(*nd), M_IP6NDP, M_WAITOK | M_ZERO);
- nd->initialized = 1;
-
nd->basereachable = REACHABLE_TIME;
nd->reachable = ND_COMPUTE_RTIME(nd->basereachable);
nd->retrans = RETRANS_TIMER;
-/* $OpenBSD: nd6.h,v 1.89 2022/11/23 19:35:42 kn Exp $ */
+/* $OpenBSD: nd6.h,v 1.90 2022/11/28 19:13:36 kn Exp $ */
/* $KAME: nd6.h,v 1.95 2002/06/08 11:31:06 itojun Exp $ */
/*
#define ND6_LLINFO_DELAY 3
#define ND6_LLINFO_PROBE 4
+/*
+ * Locks used to protect struct members in this file:
+ * I immutable after creation
+ * N net lock
+ */
+
struct nd_ifinfo {
- u_int32_t basereachable; /* BaseReachableTime */
- u_int32_t reachable; /* Reachable Time */
- u_int32_t retrans; /* Retrans Timer */
- int recalctm; /* BaseReacable re-calculation timer */
- u_int8_t initialized; /* Flag to see the entry is initialized */
+ u_int32_t basereachable; /* [I] BaseReachableTime */
+ u_int32_t reachable; /* [N] Reachable Time */
+ u_int32_t retrans; /* [I] Retrans Timer */
+ int recalctm; /* [N] BaseReachable recalc timer */
};
struct in6_nbrinfo {
-/* $OpenBSD: ndp.c,v 1.104 2022/11/09 18:00:02 kn Exp $ */
+/* $OpenBSD: ndp.c,v 1.105 2022/11/28 19:13:36 kn Exp $ */
/* $KAME: ndp.c,v 1.101 2002/07/17 08:46:33 itojun Exp $ */
/*
if (ioctl(s, SIOCGIFINFO_IN6, (caddr_t)&nd) == -1)
err(1, "ioctl(SIOCGIFINFO_IN6)");
- if (!nd.ndi.initialized)
- errx(1, "%s: not initialized yet", ifname);
-
printf("basereachable=%ds%dms",
nd.ndi.basereachable / 1000, nd.ndi.basereachable % 1000);
printf(", reachable=%ds", nd.ndi.reachable);