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

Function carp_send_arp

freebsd/netinet/ip_carp.c:1128–1142  ·  view source on GitHub ↗

* Broadcast a gratuitous ARP request containing * the virtual router MAC address for each IP address * associated with the virtual router. */

Source from the content-addressed store, hash-verified

1126 * associated with the virtual router.
1127 */
1128static void
1129carp_send_arp(struct carp_softc *sc)
1130{
1131 struct ifaddr *ifa;
1132 struct in_addr addr;
1133
1134 NET_EPOCH_ASSERT();
1135
1136 CARP_FOREACH_IFA(sc, ifa) {
1137 if (ifa->ifa_addr->sa_family != AF_INET)
1138 continue;
1139 addr = ((struct sockaddr_in *)ifa->ifa_addr)->sin_addr;
1140 arp_announce_ifaddr(sc->sc_carpdev, addr, LLADDR(&sc->sc_addr));
1141 }
1142}
1143
1144int
1145carp_iamatch(struct ifaddr *ifa, uint8_t **enaddr)

Callers 1

carp_master_down_lockedFunction · 0.85

Calls 1

arp_announce_ifaddrFunction · 0.85

Tested by

no test coverage detected