MCPcopy Create free account
hub / github.com/F-Stack/f-stack / garp_timer_start

Function garp_timer_start

freebsd/netinet/if_ether.c:1418–1430  ·  view source on GitHub ↗

* Start the GARP retransmit timer. * * A single GARP is always transmitted when an IPv4 address is added * to an interface and that is usually sufficient. However, in some * circumstances, such as when a shared address is passed between * cluster nodes, this single GARP may occasionally be dropped or * lost. This can lead to neighbors on the network link working with a * stale ARP cache and

Source from the content-addressed store, hash-verified

1416 * retransmission intervals are: {1, 2, 4, 8, 16, ...} (seconds).
1417 */
1418static void
1419garp_timer_start(struct ifaddr *ifa)
1420{
1421 struct in_ifaddr *ia = (struct in_ifaddr *) ifa;
1422
1423 IF_ADDR_WLOCK(ia->ia_ifa.ifa_ifp);
1424 ia->ia_garp_count = 0;
1425 if (callout_reset(&ia->ia_garp_timer, (1 << ia->ia_garp_count) * hz,
1426 garp_rexmit, ia) == 0) {
1427 ifa_ref(ifa);
1428 }
1429 IF_ADDR_WUNLOCK(ia->ia_ifa.ifa_ifp);
1430}
1431
1432void
1433arp_ifinit(struct ifnet *ifp, struct ifaddr *ifa)

Callers 1

arp_ifinitFunction · 0.85

Calls 1

ifa_refFunction · 0.85

Tested by

no test coverage detected