Home | History | Annotate | Download | only in ip

Lines Matching full:argv

46 static int vti_parse_opt(struct link_util *lu, int argc, char **argv,
116 if (!matches(*argv, "key")) {
120 if (strchr(*argv, '.'))
121 uval = get_addr32(*argv);
123 if (get_unsigned(&uval, *argv, 0) < 0) {
125 "Invalid value for \"key\": \"%s\"; it should be an unsigned integer\n", *argv);
132 } else if (!matches(*argv, "ikey")) {
136 if (strchr(*argv, '.'))
137 uval = get_addr32(*argv);
139 if (get_unsigned(&uval, *argv, 0) < 0) {
140 fprintf(stderr, "invalid value for \"ikey\": \"%s\"; it should be an unsigned integer\n", *argv);
146 } else if (!matches(*argv, "okey")) {
150 if (strchr(*argv, '.'))
151 uval = get_addr32(*argv);
153 if (get_unsigned(&uval, *argv, 0) < 0) {
154 fprintf(stderr, "invalid value for \"okey\": \"%s\"; it should be an unsigned integer\n", *argv);
160 } else if (!matches(*argv, "remote")) {
162 if (!strcmp(*argv, "any")) {
163 fprintf(stderr, "invalid value for \"remote\": \"%s\"\n", *argv);
166 daddr = get_addr32(*argv);
168 } else if (!matches(*argv, "local")) {
170 if (!strcmp(*argv, "any")) {
171 fprintf(stderr, "invalid value for \"local\": \"%s\"\n", *argv);
174 saddr = get_addr32(*argv);
176 } else if (!matches(*argv, "dev")) {
178 link = if_nametoindex(*argv);
181 *argv);
186 argc--; argv++;
248 static void vti_print_help(struct link_util *lu, int argc, char **argv,