]> rtime.felk.cvut.cz Git - lisovros/iproute2_canprio.git/blobdiff - tc/m_xt_old.c
Convert to use rta_getattr_ functions
[lisovros/iproute2_canprio.git] / tc / m_xt_old.c
index 7ed7ecc7a5e68e3e3af4eaec0f3924f57febe79b..554e4ed47af1656ec9cfd68c7e59c5c8fc658786 100644 (file)
@@ -367,7 +367,7 @@ print_ipt(struct action_util *au,FILE * f, struct rtattr *arg)
                fprintf(f, "[NULL ipt table name ] assuming mangle ");
        } else {
                fprintf(f, "tablename: %s ",
-                       (char *) RTA_DATA(tb[TCA_IPT_TABLE]));
+                       rta_getattr_str(tb[TCA_IPT_TABLE]));
        }
 
        if (tb[TCA_IPT_HOOK] == NULL) {
@@ -375,7 +375,7 @@ print_ipt(struct action_util *au,FILE * f, struct rtattr *arg)
                return -1;
        } else {
                __u32 hook;
-               hook = *(__u32 *) RTA_DATA(tb[TCA_IPT_HOOK]);
+               hook = rta_getattr_u32(tb[TCA_IPT_HOOK]);
                fprintf(f, " hook: %s \n", ipthooks[hook]);
        }
 
@@ -406,7 +406,7 @@ print_ipt(struct action_util *au,FILE * f, struct rtattr *arg)
                        fprintf(f, " [NULL ipt target index ]\n");
                } else {
                        __u32 index;
-                       index = *(__u32 *) RTA_DATA(tb[TCA_IPT_INDEX]);
+                       index = rta_getattr_u32(tb[TCA_IPT_INDEX]);
                        fprintf(f, " \n\tindex %d", index);
                }