Lines Matching defs:argv
340 int parse_args(int argc, const char** argv, netdump_options_t* options) {
342 if (!strncmp(argv[0], "-c", strlen("-c"))) {
343 argv++;
349 options->packet_count = strtol(argv[0], &endptr, 10);
353 argv++;
355 } else if (!strcmp(argv[0], "-e")) {
356 argv++;
359 } else if (!strcmp(argv[0], "-p")) {
360 argv++;
363 } else if (!strcmp(argv[0], "-w")) {
364 argv++;
369 options->dumpfile = open(argv[0], O_WRONLY | O_CREAT);
371 fprintf(stderr, "Error: Could not output to file: %s\n", argv[0]);
374 argv++;
376 } else if (!strcmp(argv[0], "-v")) {
377 argv++;
380 } else if (!strncmp(argv[0], "-vv", sizeof("-vv"))) {
382 argv++;
385 } else if (!strcmp(argv[0], "--raw")) {
386 argv++;
396 } else if (!strcmp(argv[0], "--help")) {
400 options->device = argv[0];
404 int main(int argc, const char** argv) {
408 if (parse_args(argc - 1, argv + 1, &options)) {