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
97 if (parse_nat_args(&argc, &argv, &sel)) { in parse_nat()
118 parse_action_control_dflt(&argc, &argv, &sel.action, false, TC_ACT_OK); in parse_nat()
123 if (get_u32(&sel.index, *argv, 10)) { in parse_nat()
134 addattr_l(n, MAX_MSG, TCA_NAT_PARMS, &sel, sizeof(sel)); in parse_nat()
145 struct tc_nat *sel; in print_nat() local
161 sel = RTA_DATA(tb[TCA_NAT_PARMS]); in print_nat()
163 len = ffs(sel->mask); in print_nat()
166 fprintf(f, " nat %s %s/%d %s", sel->flags & TCA_NAT_FLAG_EGRESS ? in print_nat()
168 format_host_r(AF_INET, 4, &sel->old_addr, buf1, sizeof(buf1)), in print_nat()
170 format_host_r(AF_INET, 4, &sel->new_addr, buf2, sizeof(buf2))); in print_nat()
171 print_action_control(f, " ", sel->action, ""); in print_nat()