Lines Matching refs:sel
44 parse_nat_args(int *argc_p, char ***argv_p,struct tc_nat *sel) in parse_nat_args() argument
54 sel->flags |= TCA_NAT_FLAG_EGRESS; in parse_nat_args()
63 sel->old_addr = addr.data[0]; in parse_nat_args()
64 sel->mask = htonl(~0u << (32 - addr.bitlen)); in parse_nat_args()
71 sel->new_addr = addr.data[0]; in parse_nat_args()
87 struct tc_nat sel; in parse_nat() local
94 memset(&sel, 0, sizeof(sel)); in parse_nat()
99 if (parse_nat_args(&argc, &argv, &sel)) { in parse_nat()
122 sel.action = TC_ACT_RECLASSIFY; in parse_nat()
126 sel.action = TC_ACT_PIPE; in parse_nat()
131 sel.action = TC_ACT_SHOT; in parse_nat()
135 sel.action = TC_ACT_UNSPEC; in parse_nat()
139 sel.action = TC_ACT_OK; in parse_nat()
148 if (get_u32(&sel.index, *argv, 10)) { in parse_nat()
159 addattr_l(n, MAX_MSG, TCA_NAT_PARMS, &sel, sizeof(sel)); in parse_nat()
170 struct tc_nat *sel; in print_nat() local
186 sel = RTA_DATA(tb[TCA_NAT_PARMS]); in print_nat()
188 len = ffs(sel->mask); in print_nat()
191 fprintf(f, " nat %s %s/%d %s %s", sel->flags & TCA_NAT_FLAG_EGRESS ? in print_nat()
193 format_host(AF_INET, 4, &sel->old_addr, buf1, sizeof(buf1)), in print_nat()
195 format_host(AF_INET, 4, &sel->new_addr, buf2, sizeof(buf2)), in print_nat()
196 action_n2a(sel->action, buf3, sizeof (buf3))); in print_nat()