/*
- * Copyright (c) 2000-2013 Apple Inc. All rights reserved.
+ * Copyright (c) 2000-2016 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
* gateway rather than the ultimate destination.
*/
+#define NRTT_HIST 10
/*
* Kernel routing entry structure.
*/
(struct rtentry *, struct ifnet_llreach_info *);
void (*rt_llinfo_purge)(struct rtentry *); /* llinfo purge fn */
void (*rt_llinfo_free)(void *); /* link level info free function */
+ void (*rt_llinfo_refresh) (struct rtentry *); /* expedite llinfo refresh */
struct rt_metrics rt_rmx; /* metrics used by rx'ing protocols */
#define rt_use rt_rmx.rmx_pksent
struct rtentry *rt_gwroute; /* implied entry for gatewayed routes */
uint64_t rt_expire; /* expiration time in uptime seconds */
uint64_t base_calendartime; /* calendar time upon entry creation */
uint64_t base_uptime; /* uptime upon entry creation */
+ u_int32_t rtt_hist[NRTT_HIST]; /* RTT history sample by TCP connections */
+ u_int32_t rtt_min; /* minimum RTT computed from history */
+ u_int32_t rtt_expire_ts; /* RTT history expire timestamp */
+ u_int8_t rtt_index; /* Index into RTT history */
};
/*
};
#ifdef PRIVATE
+struct kev_netevent_apnfallbk_data {
+ pid_t epid; /* effective PID */
+ uuid_t euuid; /* effective UUID */
+};
+
/*
* Route reachability info.
*/
#define RTM_DELETE 0x2 /* Delete Route */
#define RTM_CHANGE 0x3 /* Change Metrics or flags */
#define RTM_GET 0x4 /* Report Metrics */
-#define RTM_LOSING 0x5 /* Kernel Suspects Partitioning */
+#define RTM_LOSING 0x5 /* RTM_LOSING is no longer generated by xnu
+ and is deprecated */
#define RTM_REDIRECT 0x6 /* Told to use different route */
#define RTM_MISS 0x7 /* Lookup failed on this address */
#define RTM_LOCK 0x8 /* fix specified metrics */
#define RTV_SSTHRESH 0x20 /* init or lock _ssthresh */
#define RTV_RTT 0x40 /* init or lock _rtt */
#define RTV_RTTVAR 0x80 /* init or lock _rttvar */
+#ifdef PRIVATE
+#define RTV_REFRESH_HOST 0x100 /* init host route to expedite refresh */
+#endif
/*
* Bitmask values for rtm_addrs.
extern const char *rtm2str(int);
extern void route_copyin(struct route *, struct route *, size_t);
extern void route_copyout(struct route *, const struct route *, size_t);
+extern boolean_t rt_ifa_is_dst(struct sockaddr *, struct ifaddr *);
+extern struct sockaddr *sa_copy(struct sockaddr *, struct sockaddr_storage *,
+ unsigned int *);
#endif /* BSD_KERNEL_PRIVATE */
#endif /* _NET_ROUTE_H_ */