PERFORCE change 128310 for review
Kip Macy
kmacy at FreeBSD.org
Mon Oct 29 16:32:59 PDT 2007
http://perforce.freebsd.org/chv.cgi?CH=128310
Change 128310 by kmacy at kmacy:storage:toestack on 2007/10/29 23:32:33
make arp_update into a more generic route_event
fix signature for arp_ifinit_internal
Affected files ...
.. //depot/projects/toestack/sys/net/if_arp.h#3 edit
.. //depot/projects/toestack/sys/net/route.h#4 edit
.. //depot/projects/toestack/sys/netinet/if_ether.c#7 edit
Differences ...
==== //depot/projects/toestack/sys/net/if_arp.h#3 (text+ko) ====
@@ -108,9 +108,6 @@
#define IFP2AC(ifp) ((struct arpcom *)(ifp->if_l2com))
#define AC2IFP(ac) ((ac)->ac_ifp)
-typedef void (*arpupdate_fn)(struct rtentry *);
-EVENTHANDLER_DECLARE(arp_update, arpupdate_fn);
-
#endif
#endif /* !_NET_IF_ARP_H_ */
==== //depot/projects/toestack/sys/net/route.h#4 (text+ko) ====
@@ -364,6 +364,15 @@
struct sockaddr *, struct sockaddr *, int, struct rtentry **);
int rtrequest1(int, struct rt_addrinfo *, struct rtentry **);
int rt_check(struct rtentry **, struct rtentry **, struct sockaddr *);
+
+
+#include <sys/eventhandler.h>
+#define RTEVENT_ARP_UPDATE 1
+typedef void (*rtevent_fn)(void *, int, struct rtentry *);
+EVENTHANDLER_DECLARE(route_event, rtevent_fn);
+
+
+
#endif
#endif
==== //depot/projects/toestack/sys/netinet/if_ether.c#7 (text+ko) ====
@@ -415,7 +415,7 @@
sdl->sdl_family == AF_LINK && sdl->sdl_alen != 0) {
bcopy(LLADDR(sdl), desten, sdl->sdl_alen);
- EVENTHANDLER_INVOKE(arp_update, rt);
+ EVENTHANDLER_INVOKE(route_event, RTEVENT_ARP_UPDATE, rt);
/*
* If entry has an expiry time and it is approaching,
@@ -941,7 +941,7 @@
}
}
-static __inline
+static __inline void
arp_ifinit_internal(struct ifnet *ifp, struct ifaddr *ifa, u_char *enaddr)
{
if (ntohl(IA_SIN(ifa)->sin_addr.s_addr) != INADDR_ANY)
More information about the p4-projects
mailing list