Lines Matching refs:sockaddr
91 #define SA(p) ((struct sockaddr *)(p))
166 static void rt_maskedcopy(struct sockaddr *,
167 struct sockaddr *, struct sockaddr *);
171 static struct rtentry *rtalloc1_common_locked(struct sockaddr *, int, u_long,
173 static int rtrequest_common_locked(int, struct sockaddr *,
174 struct sockaddr *, struct sockaddr *, int, struct rtentry **,
177 static inline void sa_set_ifscope(struct sockaddr *, unsigned int);
178 static struct sockaddr *sin_copy(struct sockaddr_in *, struct sockaddr_in *,
180 static struct sockaddr *mask_copy(struct sockaddr *, struct sockaddr_in *,
182 static struct radix_node *node_lookup(struct sockaddr *, struct sockaddr *,
187 const struct sockaddr *, const struct sockaddr *, unsigned int);
236 * For looking up the non-scoped default route (sockaddr instead
239 static struct sockaddr sin_def = {
262 rt_inet_default(struct rtentry *rt, struct sockaddr *dst)
289 sa_set_ifscope(struct sockaddr *sa, unsigned int ifscope)
301 sa_get_ifscope(struct sockaddr *sa)
312 static struct sockaddr *
324 static struct sockaddr *
325 mask_copy(struct sockaddr *src, struct sockaddr_in *dst, unsigned int ifscope)
327 /* We know dst is at least the size of sockaddr{_in} */
332 * The length of the mask sockaddr would need to be adjusted
336 * of the sockaddr, as a side effect. This is okay, as any
461 rtalloc1_locked(struct sockaddr *dst, int report, u_long ignflags)
467 rtalloc1_scoped_locked(struct sockaddr *dst, int report, u_long ignflags,
478 rtalloc1_common_locked(struct sockaddr *dst, int report, u_long ignflags,
557 rtalloc1(struct sockaddr *dst, int report, u_long ignflags)
802 rtredirect(struct ifnet *ifp, struct sockaddr *dst, struct sockaddr *gateway,
803 struct sockaddr *netmask, int flags, struct sockaddr *src,
943 const struct sockaddr *dst,
944 const struct sockaddr *gateway)
956 ifa_ifwithroute_locked(int flags, const struct sockaddr *dst,
957 const struct sockaddr *gateway)
964 ifa_ifwithroute_scoped_locked(int flags, const struct sockaddr *dst,
965 const struct sockaddr *gateway, unsigned int ifscope)
976 ifa_ifwithroute_common_locked(int flags, const struct sockaddr *dst,
977 const struct sockaddr *gateway, unsigned int ifscope)
987 * Just in case the sockaddr passed in by the caller
1022 rt = rtalloc1_scoped_locked((struct sockaddr *)(size_t)dst,
1050 !equal(ifa->ifa_addr, (struct sockaddr *)(size_t)gateway)) &&
1051 (rt = rtalloc1_scoped_locked((struct sockaddr *)(size_t)gateway,
1085 rtrequest_locked(int req, struct sockaddr *dst, struct sockaddr *gateway,
1086 struct sockaddr *netmask, int flags, struct rtentry **ret_nrt)
1093 rtrequest_scoped_locked(int req, struct sockaddr *dst,
1094 struct sockaddr *gateway, struct sockaddr *netmask, int flags,
1122 rtrequest_common_locked(int req, struct sockaddr *dst0,
1123 struct sockaddr *gateway, struct sockaddr *netmask, int flags,
1131 struct sockaddr *ndst, *dst = dst0;
1372 (struct sockaddr *)rt_key(rt2),
1463 struct sockaddr *dst,
1464 struct sockaddr *gateway,
1465 struct sockaddr *netmask,
1494 (struct sockaddr *)0, rt_mask(rt),
1568 rt_setgate(struct rtentry *rt, struct sockaddr *dst, struct sockaddr *gate)
1689 rt->rt_gateway = (struct sockaddr *)(new + dlen);
1725 rt_maskedcopy(struct sockaddr *src, struct sockaddr *dst,
1726 struct sockaddr *netmask)
1749 node_lookup(struct sockaddr *dst, struct sockaddr *netmask,
1816 rt_lookup(boolean_t lookup_only, struct sockaddr *dst, struct sockaddr *netmask,
1959 struct sockaddr *dst;
1960 struct sockaddr *deldst;
1982 deldst = mtod(m, struct sockaddr *);