+ /*
+ * Touch a file to indicate that all events except one were
+ * generated.
+ */
+ char *before_last_event_file_path_touch = NULL;
+ /* Touch file when we are exiting */
+ char *before_exit_file_path_touch = NULL;
+ /* Wait on file before exiting */
+ char *before_exit_file_path = NULL;
+
+ for (i = 0; i < 3; i++) {
+ net_values[i] = htonl(net_values[i]);
+ }
+
+ while ((option = getopt_long(argc, argv, "i:w:a:b:c:d:",
+ long_options, &option_index)) != -1) {
+ switch (option) {
+ case 'a':
+ after_first_event_file_path = strdup(optarg);
+ break;
+ case 'b':
+ before_last_event_file_path = strdup(optarg);
+ break;
+ case 'c':
+ before_last_event_file_path_touch = strdup(optarg);
+ break;
+ case 'd':
+ before_exit_file_path = strdup(optarg);
+ break;
+ case 'e':
+ before_exit_file_path_touch = strdup(optarg);
+ break;
+ case 'i':
+ nr_iter = atoi(optarg);
+ break;
+ case 'w':
+ nr_usec = atoi(optarg);
+ break;
+ case '?':
+ /* getopt_long already printed an error message. */
+ default:
+ ret = -1;
+ goto end;
+ }
+ }
+
+ if (optind != argc) {
+ fprintf(stderr, "Error: takes long options only.\n");