Lines Matching defs:rt
84 struct rtentry *rt;
87 rt = (struct rtentry *)rn;
88 i += rt->rt_rmx.rmx_weight;
95 rt_mpath_matchgate(struct rtentry *rt, struct sockaddr *gate)
99 if (!gate || !rt->rt_gateway)
103 rn = (struct radix_node *)rt;
105 rt = (struct rtentry *)rn;
112 if (rt->rt_gateway->sa_family == AF_LINK) {
113 if (!memcmp(rt->rt_ifa->ifa_addr, gate, gate->sa_len))
122 if (rt->rt_gateway->sa_len == gate->sa_len &&
123 !memcmp(rt->rt_gateway, gate, gate->sa_len))
131 * go through the chain and unlink "rt" from the list
132 * the caller will free "rt"
135 rt_mpath_deldup(struct rtentry *headrt, struct rtentry *rt)
139 if (!headrt || !rt)
144 if (tt == (struct radix_node *)rt) {
159 * Assume @rt rt_key host bits are cleared according to @netmask
162 rt_mpath_conflict(struct radix_node_head *rnh, struct rtentry *rt,
168 rn = (struct radix_node *)rt;
169 rn1 = rnh->rnh_lookup(rt_key(rt), netmask, rnh);
182 if (rt1->rt_ifa->ifa_addr->sa_len != rt->rt_ifa->ifa_addr->sa_len ||
183 bcmp(rt1->rt_ifa->ifa_addr, rt->rt_ifa->ifa_addr,
187 if (rt1->rt_gateway->sa_len != rt->rt_gateway->sa_len ||
188 bcmp(rt1->rt_gateway, rt->rt_gateway,
205 struct rtentry *rt;
232 for (weight = abs((int32_t)hash), rt = ro->ro_rt;
233 weight >= rt->rt_rmx.rmx_weight && rn;
234 weight -= rt->rt_rmx.rmx_weight) {
240 rt = (struct rtentry *)rn;
250 if (ro->ro_rt != rt) {