| 1 | #ifndef _NETINET_IN_SELSRC_H |
| 2 | #define _NETINET_IN_SELSRC_H |
| 3 | |
| 4 | #define IN_SELECTSRC_LEN 128 |
| 5 | #define IN_SCORE_SRC_MAX 8 |
| 6 | |
| 7 | typedef int (*in_score_src_t)(const struct in_addr *src, |
| 8 | int preference, int idx, |
| 9 | const struct in_addr *dst); |
| 10 | |
| 11 | struct in_ifselsrc { |
| 12 | uint32_t iss_seqno; |
| 13 | in_score_src_t iss_score_src[IN_SCORE_SRC_MAX]; |
| 14 | }; |
| 15 | |
| 16 | struct in_ifsysctl { |
| 17 | struct ifnet *isc_ifp; |
| 18 | struct sysctllog *isc_log; |
| 19 | struct in_ifselsrc *isc_selsrc; |
| 20 | }; |
| 21 | |
| 22 | enum in_category { |
| 23 | IN_CATEGORY_LINKLOCAL = 0, |
| 24 | IN_CATEGORY_PRIVATE, |
| 25 | IN_CATEGORY_OTHER |
| 26 | }; |
| 27 | |
| 28 | struct ifaddr *in_getifa(struct ifaddr *, const struct sockaddr *); |
| 29 | |
| 30 | void *in_selsrc_domifattach(struct ifnet *ifp); |
| 31 | void in_selsrc_domifdetach(struct ifnet *ifp, void *aux); |
| 32 | |
| 33 | #endif /* _NETINET_IN_SELSRC_H */ |
| 34 | |