Lines Matching refs:rtm

1700 	struct rt_msghdr *rtm;
1719 if (len < sizeof(*rtm)) {
1721 len, (u_long)sizeof(*rtm));
1745 rtm = NULL;
1773 rtm = (struct rt_msghdr *)(void *)p;
1774 if (rtm->rtm_version != RTM_VERSION) {
1777 rtm->rtm_version, RTM_VERSION);
1784 if (rtm->rtm_type > RTM_RESOLVE) {
1786 rtm->rtm_type);
1789 addrs = rtm->rtm_addrs;
1790 q = (char *)(rtm + 1);
1791 if (rtm->rtm_pid == pid) {
1883 if ((rtm->rtm_flags & RTF_HOST) != 0) {
2468 rttypes(struct rt_msghdr *rtm)
2472 if (rtm->rtm_type == (f)) \
2503 rtflags(struct rt_msghdr *rtm)
2513 if (rtm->rtm_flags & (f)) \
2604 struct rt_msghdr *rtm;
2646 for (p = buf; p < lim; p += rtm->rtm_msglen) {
2647 rtm = (struct rt_msghdr *)(void *)p;
2648 rt_entry(rtm, again);
2654 rt_entry(struct rt_msghdr *rtm, int again)
2664 if ((rtm->rtm_flags & RTF_UP) == 0 || rtm->rtm_flags &
2670 if (rtm->rtm_flags & RTF_WASCLONED)
2674 if (rtm->rtm_flags & RTF_CLONED)
2678 if (!(rtm->rtm_flags & (RTF_GATEWAY|RTF_HOST|RTF_STATIC)))
2684 if (rtm->rtm_flags & RTF_DYNAMIC)
2686 rtmp = (char *)(rtm + 1);
2688 if ((rtm->rtm_addrs & RTA_DST) == 0)
2692 if (rtm->rtm_addrs & RTA_GATEWAY) {
2696 if (rtm->rtm_addrs & RTA_NETMASK) {
2700 if (rtm->rtm_addrs & RTA_GENMASK) {
2704 if (rtm->rtm_addrs & RTA_IFP) {
2727 if (aflag == 0 && (rtm->rtm_flags & RTF_STATIC))
2729 if (rtm->rtm_flags & Pflag)
2731 if ((rtm->rtm_flags & (RTF_HOST|RTF_GATEWAY)) == RTF_HOST)
2734 np->rip6_metric = rtm->rtm_rmx.rmx_hopcount;
2737 rrt->rrt_flags = rtm->rtm_flags;
2741 if (rtm->rtm_flags & RTF_HOST)
2754 rtflags(rtm));
2772 inet6_n2p(&np->rip6_dest), np->rip6_plen, rtflags(rtm));
2776 ifindex = rtm->rtm_index;
2808 rtflags(rtm));
2821 struct rt_msghdr *rtm;
2839 rtm = (struct rt_msghdr *)(void *)buf;
2840 rtm->rtm_type = RTM_ADD;
2841 rtm->rtm_version = RTM_VERSION;
2842 rtm->rtm_seq = ++seq;
2843 rtm->rtm_pid = pid;
2844 rtm->rtm_flags = rrt->rrt_flags;
2845 rtm->rtm_flags |= Qflag;
2846 rtm->rtm_addrs = RTA_DST | RTA_GATEWAY | RTA_NETMASK;
2847 rtm->rtm_rmx.rmx_hopcount = np->rip6_metric - 1;
2848 rtm->rtm_inits = RTV_HOPCOUNT;
2869 rtm->rtm_msglen = len;
2893 struct rt_msghdr *rtm;
2907 rtm = (struct rt_msghdr *)(void *)buf;
2908 rtm->rtm_type = RTM_DELETE;
2909 rtm->rtm_version = RTM_VERSION;
2910 rtm->rtm_seq = ++seq;
2911 rtm->rtm_pid = pid;
2912 rtm->rtm_flags = RTF_UP | RTF_GATEWAY;
2913 rtm->rtm_flags |= Qflag;
2915 rtm->rtm_flags |= RTF_HOST;
2916 rtm->rtm_addrs = RTA_DST | RTA_GATEWAY | RTA_NETMASK;
2935 rtm->rtm_msglen = len;
2962 struct rt_msghdr *rtm;
2965 rtm = (struct rt_msghdr *)(void *)buf;
2967 memset(rtm, 0, len);
2968 rtm->rtm_type = RTM_GET;
2969 rtm->rtm_version = RTM_VERSION;
2971 rtm->rtm_seq = myseq;
2972 rtm->rtm_addrs = RTA_DST;
2973 rtm->rtm_msglen = len;
2989 rtm = (struct rt_msghdr *)(void *)buf;
2990 } while (rtm->rtm_type != RTM_GET || rtm->rtm_seq != myseq ||
2991 rtm->rtm_pid != pid);
2993 if (rtm->rtm_addrs & RTA_DST) {
2997 if (rtm->rtm_addrs & RTA_GATEWAY) {