| 1986 | } |
| 1987 | |
| 1988 | static struct mbuf * |
| 1989 | rt_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 |
no test coverage detected