Lines Matching refs:loc
55 static void dump_u32_style(struct rtnl_pktloc *loc, uint32_t value) in dump_u32_style() argument
57 if (loc->align > 4) in dump_u32_style()
60 if (loc->layer == TCF_LAYER_LINK) in dump_u32_style()
64 if (loc->shift > 0) in dump_u32_style()
68 align_txt[loc->align], in dump_u32_style()
69 value, loc->mask ? loc->mask : align_mask[loc->align], in dump_u32_style()
70 loc->layer == TCF_LAYER_TRANSPORT ? "nexthdr+" : "", in dump_u32_style()
71 loc->offset); in dump_u32_style()
74 static char *get_align_txt(struct rtnl_pktloc *loc) in get_align_txt() argument
78 if (loc->align <= 4) in get_align_txt()
79 strcpy(buf, align_txt[loc->align]); in get_align_txt()
81 snprintf(buf, sizeof(buf), "%u", loc->align); in get_align_txt()
86 static void dump_loc(struct rtnl_pktloc *loc) in dump_loc() argument
89 loc->name, get_align_txt(loc), layer_txt[loc->layer], in dump_loc()
90 loc->offset, loc->mask, loc->shift); in dump_loc()
93 static void list_cb(struct rtnl_pktloc *loc, void *arg) in list_cb() argument
96 loc->name, get_align_txt(loc), layer_txt[loc->layer], in list_cb()
97 loc->offset, loc->mask, loc->shift, loc->refcnt); in list_cb()
111 struct rtnl_pktloc *loc; in main() local
146 if ((err = rtnl_pktloc_lookup(argv[optind++], &loc)) < 0) in main()
151 dump_u32_style(loc, uvalue); in main()
153 dump_loc(loc); in main()