Lines Matching defs:ro
704 struct route *ro = NULL;
764 ro = &sav->sah->sa_route;
765 dst4 = (struct sockaddr_in *)(void *)&ro->ro_dst;
766 if (ro->ro_rt) {
767 RT_LOCK(ro->ro_rt);
769 if (ro->ro_rt != NULL &&
770 (ro->ro_rt->generation_id != route_generation ||
771 !(ro->ro_rt->rt_flags & RTF_UP) ||
773 RT_UNLOCK(ro->ro_rt);
774 rtfree(ro->ro_rt);
775 ro->ro_rt = NULL;
777 if (ro->ro_rt == NULL) {
781 rtalloc(ro);
782 if (ro->ro_rt) {
783 RT_LOCK(ro->ro_rt);
791 if (ro->ro_rt->rt_flags & RTF_GATEWAY) {
792 dst4 = (struct sockaddr_in *)(void *)ro->ro_rt->rt_gateway;
794 RT_UNLOCK(ro->ro_rt);
795 route_copyout(&ro_copy, ro, sizeof(ro_copy));
860 ro = &sav->sah->sa_route;
861 dst6 = (struct sockaddr_in6 *)(void *)&ro->ro_dst;
862 if (ro->ro_rt) {
863 RT_LOCK(ro->ro_rt);
865 if (ro->ro_rt != NULL &&
866 (ro->ro_rt->generation_id != route_generation ||
867 !(ro->ro_rt->rt_flags & RTF_UP) ||
869 RT_UNLOCK(ro->ro_rt);
870 rtfree(ro->ro_rt);
871 ro->ro_rt = NULL;
873 if (ro->ro_rt == NULL) {
878 rtalloc(ro);
879 if (ro->ro_rt) {
880 RT_LOCK(ro->ro_rt);
888 if (ro->ro_rt->rt_flags & RTF_GATEWAY) {
889 dst6 = (struct sockaddr_in6 *)(void *)ro->ro_rt->rt_gateway;
891 RT_UNLOCK(ro->ro_rt);
892 route_copyout(&ro_copy, ro, sizeof(ro_copy));
946 route_copyin(&ro_copy, ro, sizeof(*ro));