Lines Matching refs:rtm

1815 	struct rtmsg *rtm;
1820 err = nlmsg_parse_deprecated(nlh, sizeof(*rtm), tb, RTA_MAX,
1826 rtm = nlmsg_data(nlh);
1828 if (rtm->rtm_family != AF_MPLS) {
1832 if (rtm->rtm_dst_len != 20) {
1836 if (rtm->rtm_src_len != 0) {
1840 if (rtm->rtm_tos != 0) {
1844 if (rtm->rtm_table != RT_TABLE_MAIN) {
1855 if (rtm->rtm_scope != RT_SCOPE_UNIVERSE) {
1860 if (rtm->rtm_type != RTN_UNICAST) {
1865 if (rtm->rtm_flags != 0) {
1871 cfg->rc_protocol = rtm->rtm_protocol;
1997 struct rtmsg *rtm;
1999 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*rtm), flags);
2003 rtm = nlmsg_data(nlh);
2004 rtm->rtm_family = AF_MPLS;
2005 rtm->rtm_dst_len = 20;
2006 rtm->rtm_src_len = 0;
2007 rtm->rtm_tos = 0;
2008 rtm->rtm_table = RT_TABLE_MAIN;
2009 rtm->rtm_protocol = rt->rt_protocol;
2010 rtm->rtm_scope = RT_SCOPE_UNIVERSE;
2011 rtm->rtm_type = RTN_UNICAST;
2012 rtm->rtm_flags = 0;
2040 rtm->rtm_flags |= RTNH_F_LINKDOWN;
2042 rtm->rtm_flags |= RTNH_F_DEAD;
2087 rtm->rtm_flags |= RTNH_F_LINKDOWN;
2089 rtm->rtm_flags |= RTNH_F_DEAD;
2116 struct rtmsg *rtm;
2119 if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*rtm))) {
2124 rtm = nlmsg_data(nlh);
2125 if (rtm->rtm_dst_len || rtm->rtm_src_len || rtm->rtm_tos ||
2126 rtm->rtm_table || rtm->rtm_scope || rtm->rtm_type ||
2127 rtm->rtm_flags) {
2132 if (rtm->rtm_protocol) {
2133 filter->protocol = rtm->rtm_protocol;
2138 err = nlmsg_parse_deprecated_strict(nlh, sizeof(*rtm), tb, RTA_MAX,
2312 struct rtmsg *rtm;
2315 if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*rtm))) {
2322 return nlmsg_parse_deprecated(nlh, sizeof(*rtm), tb, RTA_MAX,
2325 rtm = nlmsg_data(nlh);
2326 if ((rtm->rtm_dst_len && rtm->rtm_dst_len != 20) ||
2327 rtm->rtm_src_len || rtm->rtm_tos || rtm->rtm_table ||
2328 rtm->rtm_protocol || rtm->rtm_scope || rtm->rtm_type) {
2332 if (rtm->rtm_flags & ~RTM_F_FIB_MATCH) {
2338 err = nlmsg_parse_deprecated_strict(nlh, sizeof(*rtm), tb, RTA_MAX,
2343 if ((tb[RTA_DST] || tb[RTA_NEWDST]) && !rtm->rtm_dst_len) {
2377 struct rtmsg *rtm, *r;
2388 rtm = nlmsg_data(in_nlh);
2411 if (rtm->rtm_flags & RTM_F_FIB_MATCH) {