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

Function vxlan_setup_multicast_interface

freebsd/net/if_vxlan.c:1448–1471  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1446}
1447
1448static int
1449vxlan_setup_multicast_interface(struct vxlan_softc *sc)
1450{
1451 struct ifnet *ifp;
1452
1453 ifp = ifunit_ref(sc->vxl_mc_ifname);
1454 if (ifp == NULL) {
1455 if_printf(sc->vxl_ifp, "multicast interface %s does "
1456 "not exist\n", sc->vxl_mc_ifname);
1457 return (ENOENT);
1458 }
1459
1460 if ((ifp->if_flags & IFF_MULTICAST) == 0) {
1461 if_printf(sc->vxl_ifp, "interface %s does not support "
1462 "multicast\n", sc->vxl_mc_ifname);
1463 if_rele(ifp);
1464 return (ENOTSUP);
1465 }
1466
1467 sc->vxl_mc_ifp = ifp;
1468 sc->vxl_mc_ifindex = ifp->if_index;
1469
1470 return (0);
1471}
1472
1473static int
1474vxlan_setup_multicast(struct vxlan_softc *sc)

Callers 1

vxlan_setup_multicastFunction · 0.85

Calls 3

ifunit_refFunction · 0.85
if_printfFunction · 0.85
if_releFunction · 0.85

Tested by

no test coverage detected