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

Function rt_makeifannouncemsg

freebsd/net/rtsock.c:1988–2007  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1986}
1987
1988static struct mbuf *
1989rt_makeifannouncemsg(struct ifnet *ifp, int type, int what,
1990 struct rt_addrinfo *info)
1991{
1992 struct if_announcemsghdr *ifan;
1993 struct mbuf *m;
1994
1995 if (V_route_cb.any_count == 0)
1996 return NULL;
1997 bzero((caddr_t)info, sizeof(*info));
1998 m = rtsock_msg_mbuf(type, info);
1999 if (m != NULL) {
2000 ifan = mtod(m, struct if_announcemsghdr *);
2001 ifan->ifan_index = ifp->if_index;
2002 strlcpy(ifan->ifan_name, ifp->if_xname,
2003 sizeof(ifan->ifan_name));
2004 ifan->ifan_what = what;
2005 }
2006 return m;
2007}
2008
2009/*
2010 * This is called to generate routing socket messages indicating

Callers 2

rt_ieee80211msgFunction · 0.85
rt_ifannouncemsgFunction · 0.85

Calls 3

bzeroFunction · 0.85
rtsock_msg_mbufFunction · 0.85
strlcpyFunction · 0.50

Tested by

no test coverage detected