User Details
- User Since
- Jul 24 2019, 3:40 PM (277 w, 3 d)
Mar 17 2020
Feb 25 2020
I understand that those are two different strategies testing different properties of the algorithm or its implementation. We have to wait for a FreeBSD developer to choose an approach that will be accepted.
Feb 7 2020
Hello, thank you for the patch. I think I can see your point.
Nov 29 2019
I implemented the parametrization by macros. The primary purpose of this change is to initiate discussion about the compatibility options for ping6 and to get feedback.
Prepare the option parsing function for parsing the compatibility
option set by using parametrization by macros.
Nov 14 2019
I did the same for ping6. I was not sure whether to do that in this diff or in a separate one.
Use setitimer(2) instead of obsoleted alarm(3)
Oct 22 2019
Oct 20 2019
Sep 19 2019
The parametrization using macros is possible. However, it probably means having the loop defined in a header file and not using an include guard in it so it can be included twice in a single source file. The single parametrized loop would contain cases for options of the two loops (new and compat). If some new options are added in the future, it would be more clear to a reader to have two separate loops at a source level.
Sep 8 2019
I would like to stick with C, but after some basic experiments it seems that it's not possible to use a C preprocessor to parametrize function names. I'm going to do some research on this.
Sep 7 2019
Aha, to me it's similar to C++ templates. So there would be only one getopt loop at a source level, and two getopt loops at an object level. The two getopt loops (for the ping6's new option set and for the old one) would be called from a single source file like this:
if (strcmp(argv[0], "ping6") == 0) parse_old_options(); else parse_new_options();
so the name of the parse function would also need to be parametrized to avoid conflicts of symbols at the object level.
Sep 6 2019
The single getopt loop would have to be parametrized at runtime. How do the preprocessor directives fit into this?
Sep 4 2019
Does it mean that there could be only one getopt loop with a variable getopt string for solving the compatibility problem?
Yes, exactly.
I need to be sure I understand you correctly.
Sep 3 2019
Well, I'm not sure yet. I see two solutions:
- to have two different copies of options_parse. A drawback is that even those parts of the getopt loop that don't need to be duplicated would be duplicated.
- to have another getoptloop only for translating/replacing option names. This loop would be called first when the program is executed in compatibility mode. Then, the options would be processed by the main getop loop. This solution is possible because the sets of options have the same size and there is only renaming of the options.
Remove semantic check of the -c option from options.c.
Sep 2 2019
Rename struct options_processed to struct options.
Move all strto* argument conversion code to options.c.
Sep 1 2019
Yes, it's intended. When a pointer to an argument was an output from the getopt loop, it contained information about the value and whether the user provided the argument (there were basically two variables: the pointer itself and data which it was pointing to). When a number is the output, the information about providing an argument is contained in the boolean flag. Another solution would be to restrict range of values returned by strtoul (or use a wider data type) so it's possible to differentiate between return value of strtoul and a value (outside that range) to which the variable is initialized by default.
Aug 31 2019
Sort SRCS in the Makefile alphabetically.
Move string-to-number conversion for -b option to options.c.
Aug 30 2019
Aug 29 2019
Aug 28 2019
Aug 27 2019
Add copyright information to options.c and options.h.
Use appropriate data types for each option of struct options_processed.
I would also like to ask for help with copyright. What should I use if some code is not mine (mainly the #define directives) and some is?
Aug 24 2019
Add entries to UPDATING and ObsoleteFiles.inc.
Remove ping6 from tools/build/mk/OptionalObsoleteFiles.inc.
msg.msg_controllen must be initialized for CMSG_FIRSTHDR().
D21406 should fix it.
No ping6 in the usage message.
Aug 23 2019
Rebase to the git master branch.
Data type of variable n for return value of pselect doesn't need to be changed.
Sort options in the manual page alphabetically.
It will take me some time to find out why. On my system it builds. Could you please send me your main.c? It's interesting that there are double definitions of the functions.
Use better wording in the manual page.
Keep the history in chronological order.
Fix typos in the manual page.
Add missing articles in the manual page.
Update rescue/rescue/Makefile.
Fix typos in comments in ping.c and ping6.c.
Delete ping6 directory with its remaining content.
The default behavior has been unified in D21364. This revision is no longer needed and can be abandoned.
Aug 22 2019
Update date in the manual page.
Sort options in the SYNOPSIS section of the manual page alphabetically.
Use -m for hoplimit.
Change -w to -y.
Sort the getopt string alphabetically.
Sort options in the usage message alphabetically.
Reflect change of the -X option name to the test.
Add an article in the manual page.
Add a copyright header with a $FreeBSD$ tag to ping6_test.sh.
The copyright header and the tag are going to be added.
Add a copyright header with a $FreeBSD$ tag to ping_test.sh.
Maybe the title of this revision is not completely exact. The F_NUMERIC option flag has been cleared by default so it's more like ping was intended to do reverse lookups by default.
Rebase.
Send only one packet.
Filter out TTL value.
Specify packet size on the command line.
Add -X 1 option to reduce time of waiting for the reply.
Add -u option to diff. This makes the result file more readable in case of an error.
Rebase.
Send only one packet.
Add -t 1 option to reduce time of waiting for the reply.
Aug 21 2019
Change data type of the variable for recvmsg's return value from int to ssize_t.
D21356 adds -H option to ping . Eventually I decided to keep the default behavior in ping and ping6.
Yes, the TTL will be filtered out. Both ping and ping6 tests will be sending only one packet.
OK. I will keep -H in ping6 and add it to ping. It will be default in both of them.
I suppose I should've said "make ping use pr_addr when it prints the "bytes from" on line 1170", rather than "implement -H" for ping.
Filter out TTL value.
Specify packet size on the command line.
Add -u option to diff. This makes the result file more readable in case of an error.
Use MIN() instead of a custom conditional expression.
Aug 20 2019
I'm not sure if I understand you correctly.
Set WARNS to 6 explicitly for tests.
Correct unaligned data buffer size.
Add an entry to etc/mtree/BSD.tests.dist.
Remove 'H' from the getopt() option string.
Fix the warning about signed and unsigned type in conditional
expression.
Aug 19 2019
If the line 1144 is this line