nd6.c (82aa34e6fa1cd5a4ad401383522daf51412ea4b2) nd6.c (9901091ebac799a0835ba5b9ef9d418f192f47eb)
1/*-
2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 128 unchanged lines hidden (view full) ---

137 const struct sockaddr_in6 *, u_char *, uint32_t *);
138static int nd6_need_cache(struct ifnet *);
139
140
141static VNET_DEFINE(struct callout, nd6_slowtimo_ch);
142#define V_nd6_slowtimo_ch VNET(nd6_slowtimo_ch)
143
144VNET_DEFINE(struct callout, nd6_timer_ch);
1/*-
2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 128 unchanged lines hidden (view full) ---

137 const struct sockaddr_in6 *, u_char *, uint32_t *);
138static int nd6_need_cache(struct ifnet *);
139
140
141static VNET_DEFINE(struct callout, nd6_slowtimo_ch);
142#define V_nd6_slowtimo_ch VNET(nd6_slowtimo_ch)
143
144VNET_DEFINE(struct callout, nd6_timer_ch);
145#define V_nd6_timer_ch VNET(nd6_timer_ch)
145
146static void
147nd6_lle_event(void *arg __unused, struct llentry *lle, int evt)
148{
149 struct rt_addrinfo rtinfo;
150 struct sockaddr_in6 dst;
151 struct sockaddr_dl gw;
152 struct ifnet *ifp;

--- 55 unchanged lines hidden (view full) ---

208
209 rw_init(&V_nd6_lock, "nd6");
210
211 LIST_INIT(&V_nd_prefix);
212
213 /* initialization of the default router list */
214 TAILQ_INIT(&V_nd_defrouter);
215
146
147static void
148nd6_lle_event(void *arg __unused, struct llentry *lle, int evt)
149{
150 struct rt_addrinfo rtinfo;
151 struct sockaddr_in6 dst;
152 struct sockaddr_dl gw;
153 struct ifnet *ifp;

--- 55 unchanged lines hidden (view full) ---

209
210 rw_init(&V_nd6_lock, "nd6");
211
212 LIST_INIT(&V_nd_prefix);
213
214 /* initialization of the default router list */
215 TAILQ_INIT(&V_nd_defrouter);
216
216 /* start timer */
217 /* Start timers. */
217 callout_init(&V_nd6_slowtimo_ch, 0);
218 callout_reset(&V_nd6_slowtimo_ch, ND6_SLOWTIMER_INTERVAL * hz,
219 nd6_slowtimo, curvnet);
220
218 callout_init(&V_nd6_slowtimo_ch, 0);
219 callout_reset(&V_nd6_slowtimo_ch, ND6_SLOWTIMER_INTERVAL * hz,
220 nd6_slowtimo, curvnet);
221
222 callout_init(&V_nd6_timer_ch, 0);
223 callout_reset(&V_nd6_timer_ch, hz, nd6_timer, curvnet);
224
221 nd6_dad_init();
222 if (IS_DEFAULT_VNET(curvnet)) {
223 lle_event_eh = EVENTHANDLER_REGISTER(lle_event, nd6_lle_event,
224 NULL, EVENTHANDLER_PRI_ANY);
225 iflladdr_event_eh = EVENTHANDLER_REGISTER(iflladdr_event,
226 nd6_iflladdr, NULL, EVENTHANDLER_PRI_ANY);
227 }
228}

--- 2442 unchanged lines hidden ---
225 nd6_dad_init();
226 if (IS_DEFAULT_VNET(curvnet)) {
227 lle_event_eh = EVENTHANDLER_REGISTER(lle_event, nd6_lle_event,
228 NULL, EVENTHANDLER_PRI_ANY);
229 iflladdr_event_eh = EVENTHANDLER_REGISTER(iflladdr_event,
230 nd6_iflladdr, NULL, EVENTHANDLER_PRI_ANY);
231 }
232}

--- 2442 unchanged lines hidden ---