rxtimestamp.c (9b031c86506cef9acae45e61339fcf9deaabb793) | rxtimestamp.c (955cbe91bcf782c09afe369c95a20f0a4b6dcc3c) |
---|---|
1#include <errno.h> 2#include <error.h> 3#include <getopt.h> 4#include <stdbool.h> 5#include <stdio.h> 6#include <stdlib.h> 7#include <string.h> 8#include <unistd.h> --- 101 unchanged lines hidden (view full) --- 110 111static struct option long_options[] = { 112 { "list_tests", no_argument, 0, 'l' }, 113 { "test_num", required_argument, 0, 'n' }, 114 { "op_size", required_argument, 0, 's' }, 115 { "tcp", no_argument, 0, 't' }, 116 { "udp", no_argument, 0, 'u' }, 117 { "ip", no_argument, 0, 'i' }, | 1#include <errno.h> 2#include <error.h> 3#include <getopt.h> 4#include <stdbool.h> 5#include <stdio.h> 6#include <stdlib.h> 7#include <string.h> 8#include <unistd.h> --- 101 unchanged lines hidden (view full) --- 110 111static struct option long_options[] = { 112 { "list_tests", no_argument, 0, 'l' }, 113 { "test_num", required_argument, 0, 'n' }, 114 { "op_size", required_argument, 0, 's' }, 115 { "tcp", no_argument, 0, 't' }, 116 { "udp", no_argument, 0, 'u' }, 117 { "ip", no_argument, 0, 'i' }, |
118 { NULL, 0, NULL, 0 }, |
|
118}; 119 120static int next_port = 19999; 121static int op_size = 10 * 1024; 122 123void print_test_case(struct test_case *t) 124{ 125 int f = 0; --- 197 unchanged lines hidden (view full) --- 323} 324 325int main(int argc, char **argv) 326{ 327 bool all_protocols = true; 328 bool all_tests = true; 329 int arg_index = 0; 330 int failures = 0; | 119}; 120 121static int next_port = 19999; 122static int op_size = 10 * 1024; 123 124void print_test_case(struct test_case *t) 125{ 126 int f = 0; --- 197 unchanged lines hidden (view full) --- 324} 325 326int main(int argc, char **argv) 327{ 328 bool all_protocols = true; 329 bool all_tests = true; 330 int arg_index = 0; 331 int failures = 0; |
331 int s, t; 332 char opt; | 332 int s, t, opt; |
333 334 while ((opt = getopt_long(argc, argv, "", long_options, 335 &arg_index)) != -1) { 336 switch (opt) { 337 case 'l': 338 for (t = 0; t < ARRAY_SIZE(test_cases); t++) { 339 printf("%d\t", t); 340 print_test_case(&test_cases[t]); --- 50 unchanged lines hidden --- | 333 334 while ((opt = getopt_long(argc, argv, "", long_options, 335 &arg_index)) != -1) { 336 switch (opt) { 337 case 'l': 338 for (t = 0; t < ARRAY_SIZE(test_cases); t++) { 339 printf("%d\t", t); 340 print_test_case(&test_cases[t]); --- 50 unchanged lines hidden --- |