Lines Matching refs:rtm

74 	struct rtmsg *rtm = NLMSG_DATA(nlh);  in dn_fib_rtm_delrule()  local
80 rtm->rtm_src_len == r->r_src_len && in dn_fib_rtm_delrule()
81 rtm->rtm_dst_len == r->r_dst_len && in dn_fib_rtm_delrule()
86 (!rtm->rtm_type || rtm->rtm_type == r->r_action) && in dn_fib_rtm_delrule()
89 (!rtm->rtm_table || (r && rtm->rtm_table == r->r_table))) { in dn_fib_rtm_delrule()
122 struct rtmsg *rtm = NLMSG_DATA(nlh); in dn_fib_rtm_newrule() local
126 if (rtm->rtm_src_len > 16 || rtm->rtm_dst_len > 16) in dn_fib_rtm_newrule()
132 if (rtm->rtm_type == RTN_NAT) in dn_fib_rtm_newrule()
135 table_id = rtm->rtm_table; in dn_fib_rtm_newrule()
138 if (rtm->rtm_type == RTN_UNICAST) { in dn_fib_rtm_newrule()
153 new_r->r_src_len = rtm->rtm_src_len; in dn_fib_rtm_newrule()
154 new_r->r_dst_len = rtm->rtm_dst_len; in dn_fib_rtm_newrule()
155 new_r->r_srcmask = dnet_make_mask(rtm->rtm_src_len); in dn_fib_rtm_newrule()
156 new_r->r_dstmask = dnet_make_mask(rtm->rtm_dst_len); in dn_fib_rtm_newrule()
161 new_r->r_action = rtm->rtm_type; in dn_fib_rtm_newrule()
162 new_r->r_flags = rtm->rtm_flags; in dn_fib_rtm_newrule()
304 struct rtmsg *rtm; in dn_fib_fill_rule() local
309 nlh = NLMSG_PUT(skb, NETLINK_CREDS(cb->skb)->pid, cb->nlh->nlmsg_seq, RTM_NEWRULE, sizeof(*rtm)); in dn_fib_fill_rule()
310 rtm = NLMSG_DATA(nlh); in dn_fib_fill_rule()
311 rtm->rtm_family = AF_DECnet; in dn_fib_fill_rule()
312 rtm->rtm_dst_len = r->r_dst_len; in dn_fib_fill_rule()
313 rtm->rtm_src_len = r->r_src_len; in dn_fib_fill_rule()
314 rtm->rtm_tos = 0; in dn_fib_fill_rule()
319 rtm->rtm_table = r->r_table; in dn_fib_fill_rule()
320 rtm->rtm_protocol = 0; in dn_fib_fill_rule()
321 rtm->rtm_scope = 0; in dn_fib_fill_rule()
322 rtm->rtm_type = r->r_action; in dn_fib_fill_rule()
323 rtm->rtm_flags = r->r_flags; in dn_fib_fill_rule()