Page MenuHomeFreeBSD

jansucan (Ján Sučan)
User

Projects

User does not belong to any projects.

User Details

User Since
Jul 24 2019, 3:40 PM (69 w, 5 d)

Recent Activity

Mar 17 2020

lwhsu renamed jansucan from sucanjan_gmail.com to jansucan.
Mar 17 2020, 11:12 PM

Feb 25 2020

jansucan added a comment to D23193: ICMP checksum test: Fix for big endian.

Just swaping the input data and testing on the same platform is not the same as testing the same input on a different platform.

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 25 2020, 9:24 AM · tests

Feb 7 2020

jansucan added a comment to D23193: ICMP checksum test: Fix for big endian.

Hello, thank you for the patch. I think I can see your point.

Feb 7 2020, 9:22 AM · tests

Nov 29 2019

jansucan added a comment to D21434: ping6: separate command line tokens parsing from processing of the option arguments.

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.

Nov 29 2019, 5:17 PM
jansucan updated the diff for D21434: ping6: separate command line tokens parsing from processing of the option arguments.

Prepare the option parsing function for parsing the compatibility
option set by using parametrization by macros.

Nov 29 2019, 5:12 PM

Nov 14 2019

jansucan added a comment to D22103: ping: Use setitimer(2) instead of obsoleted alarm(3).

I did the same for ping6. I was not sure whether to do that in this diff or in a separate one.

Nov 14 2019, 2:00 PM
jansucan updated the diff for D22103: ping: Use setitimer(2) instead of obsoleted alarm(3).

Use setitimer(2) instead of obsoleted alarm(3)

Nov 14 2019, 1:58 PM

Oct 22 2019

jansucan created D22103: ping: Use setitimer(2) instead of obsoleted alarm(3).
Oct 22 2019, 7:24 AM

Oct 20 2019

jansucan added a reviewer for D22093: ping6: Fix option names in the Examples section of the manual page: manpages.
Oct 20 2019, 7:01 PM
jansucan created D22093: ping6: Fix option names in the Examples section of the manual page.
Oct 20 2019, 7:00 PM

Sep 19 2019

jansucan added a comment to D21434: ping6: separate command line tokens parsing from processing of the option arguments.

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 19 2019, 3:48 PM

Sep 8 2019

jansucan added a comment to D21434: ping6: separate command line tokens parsing from processing of the option arguments.

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 8 2019, 8:57 PM

Sep 7 2019

jansucan added a comment to D21434: ping6: separate command line tokens parsing from processing of the option arguments.

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 7 2019, 7:03 PM

Sep 6 2019

jansucan added a comment to D21434: ping6: separate command line tokens parsing from processing of the option arguments.

The single getopt loop would have to be parametrized at runtime. How do the preprocessor directives fit into this?

Sep 6 2019, 7:51 PM

Sep 4 2019

jansucan added a comment to D21434: ping6: separate command line tokens parsing from processing of the option arguments.

Does it mean that there could be only one getopt loop with a variable getopt string for solving the compatibility problem?

Yes, exactly.

Sep 4 2019, 7:33 PM
jansucan added a comment to D21434: ping6: separate command line tokens parsing from processing of the option arguments.

I need to be sure I understand you correctly.

Sep 4 2019, 10:05 AM

Sep 3 2019

jansucan added a comment to D21434: ping6: separate command line tokens parsing from processing of the option arguments.

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.
Sep 3 2019, 8:32 PM
jansucan added inline comments to D21434: ping6: separate command line tokens parsing from processing of the option arguments.
Sep 3 2019, 6:20 PM
jansucan updated the diff for D21434: ping6: separate command line tokens parsing from processing of the option arguments.

Remove semantic check of the -c option from options.c.

Sep 3 2019, 6:19 PM

Sep 2 2019

jansucan updated the diff for D21434: ping6: separate command line tokens parsing from processing of the option arguments.

Rename struct options_processed to struct options.
Move all strto* argument conversion code to options.c.

Sep 2 2019, 7:50 AM

Sep 1 2019

jansucan added a comment to D21434: ping6: separate command line tokens parsing from processing of the option arguments.

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.

Sep 1 2019, 5:12 AM

Aug 31 2019

jansucan added inline comments to D21434: ping6: separate command line tokens parsing from processing of the option arguments.
Aug 31 2019, 7:23 PM
jansucan added a comment to D21434: ping6: separate command line tokens parsing from processing of the option arguments.

Sort SRCS in the Makefile alphabetically.
Move string-to-number conversion for -b option to options.c.

Aug 31 2019, 7:22 PM
jansucan added inline comments to D21434: ping6: separate command line tokens parsing from processing of the option arguments.
Aug 31 2019, 11:02 AM

Aug 30 2019

jansucan added inline comments to D21434: ping6: separate command line tokens parsing from processing of the option arguments.
Aug 30 2019, 8:13 AM

Aug 29 2019

jansucan added inline comments to D21434: ping6: separate command line tokens parsing from processing of the option arguments.
Aug 29 2019, 6:15 PM
jansucan added inline comments to D21434: ping6: separate command line tokens parsing from processing of the option arguments.
Aug 29 2019, 2:56 PM

Aug 28 2019

jansucan added inline comments to D21434: ping6: separate command line tokens parsing from processing of the option arguments.
Aug 28 2019, 4:54 PM

Aug 27 2019

jansucan added inline comments to D21434: ping6: separate command line tokens parsing from processing of the option arguments.
Aug 27 2019, 8:28 PM
jansucan added a comment to D21434: ping6: separate command line tokens parsing from processing of the option arguments.

Add copyright information to options.c and options.h.
Use appropriate data types for each option of struct options_processed.

Aug 27 2019, 8:26 PM
jansucan added a comment to D21434: ping6: separate command line tokens parsing from processing of the option arguments.

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 27 2019, 12:51 PM
jansucan created D21434: ping6: separate command line tokens parsing from processing of the option arguments.
Aug 27 2019, 12:48 PM

Aug 24 2019

jansucan added a comment to D21377: ping: merge ping6 to ping.

Add entries to UPDATING and ObsoleteFiles.inc.
Remove ping6 from tools/build/mk/OptionalObsoleteFiles.inc.

Aug 24 2019, 8:33 PM
jansucan added a comment to D21406: ping: use CMSG_FIRSTHDR() for accessing ancillary data.

msg.msg_controllen must be initialized for CMSG_FIRSTHDR().

Aug 24 2019, 5:26 PM
jansucan added a comment to D21405: ping: raise WARNS level to 6.

D21406 should fix it.

Aug 24 2019, 4:36 PM
jansucan created D21406: ping: use CMSG_FIRSTHDR() for accessing ancillary data.
Aug 24 2019, 4:31 PM
jansucan created D21405: ping: raise WARNS level to 6.
Aug 24 2019, 1:07 PM
jansucan added a comment to D21377: ping: merge ping6 to ping.

No ping6 in the usage message.

Aug 24 2019, 6:43 AM

Aug 23 2019

jansucan added inline comments to D21377: ping: merge ping6 to ping.
Aug 23 2019, 9:07 PM
jansucan added a comment to D21327: ping: fix alignment errors.

Rebase to the git master branch.

Aug 23 2019, 8:50 PM
jansucan added inline comments to D21377: ping: merge ping6 to ping.
Aug 23 2019, 8:38 PM
jansucan added inline comments to D21327: ping: fix alignment errors.
Aug 23 2019, 8:24 PM
jansucan added a comment to D21327: ping: fix alignment errors.

Data type of variable n for return value of pselect doesn't need to be changed.

Aug 23 2019, 8:24 PM
jansucan added a comment to D21377: ping: merge ping6 to ping.

Sorry, my bad. It's a side effect of arcanist. If you apply a patch, revert the directory, and reapply the patch, any newly created file gets doubled. You need to rm newly created files after "svn revert". I forgot to do that.

Aug 23 2019, 8:15 PM
jansucan added inline comments to D21377: ping: merge ping6 to ping.
Aug 23 2019, 8:11 PM
jansucan added a comment to D21377: ping: merge ping6 to ping.

Sort options in the manual page alphabetically.

Aug 23 2019, 8:10 PM
jansucan added a comment to D21377: ping: merge ping6 to ping.

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.

Aug 23 2019, 7:16 PM
jansucan added inline comments to D21377: ping: merge ping6 to ping.
Aug 23 2019, 5:38 PM
jansucan added a comment to D21377: ping: merge ping6 to ping.

Use better wording in the manual page.
Keep the history in chronological order.

Aug 23 2019, 5:38 PM
jansucan added inline comments to D21377: ping: merge ping6 to ping.
Aug 23 2019, 5:10 PM
jansucan added a comment to D21377: ping: merge ping6 to ping.

Fix typos in the manual page.

Aug 23 2019, 5:10 PM
jansucan added inline comments to D21377: ping: merge ping6 to ping.
Aug 23 2019, 5:05 PM
jansucan added a comment to D21377: ping: merge ping6 to ping.

Add missing articles in the manual page.

Aug 23 2019, 5:05 PM
jansucan added inline comments to D21377: ping: merge ping6 to ping.
Aug 23 2019, 4:53 PM
jansucan added a comment to D21377: ping: merge ping6 to ping.

Update rescue/rescue/Makefile.
Fix typos in comments in ping.c and ping6.c.

Aug 23 2019, 4:53 PM
jansucan added a comment to D21377: ping: merge ping6 to ping.

Delete ping6 directory with its remaining content.

Aug 23 2019, 2:12 PM
jansucan created D21377: ping: merge ping6 to ping.
Aug 23 2019, 2:09 PM
jansucan created D21374: ping: fix include guard symbol name to reflect the header file name.
Aug 23 2019, 7:03 AM
jansucan added a comment to D21338: ping6: make lookup of symbolic names in the reply default.

The default behavior has been unified in D21364. This revision is no longer needed and can be abandoned.

Aug 23 2019, 6:22 AM

Aug 22 2019

jansucan added inline comments to D21345: ping6: Rename options for unifying option parsing with ping.
Aug 22 2019, 7:45 PM
jansucan added a comment to D21345: ping6: Rename options for unifying option parsing with ping.

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.

Aug 22 2019, 7:42 PM
jansucan added inline comments to D21364: ping: do numeric-only output by default.
Aug 22 2019, 6:27 PM
jansucan added a comment to D21364: ping: do numeric-only output by default.

Add an article in the manual page.

Aug 22 2019, 6:26 PM
jansucan added a comment to D21292: ping6: add a basic test of ping6's functionality.

Add a copyright header with a $FreeBSD$ tag to ping6_test.sh.

Aug 22 2019, 2:59 PM
jansucan added a comment to D21292: ping6: add a basic test of ping6's functionality.

The copyright header and the tag are going to be added.

Aug 22 2019, 2:50 PM
jansucan added a comment to D21289: ping: add a basic test of ping's functionality.

Add a copyright header with a $FreeBSD$ tag to ping_test.sh.

Aug 22 2019, 2:45 PM
jansucan created D21364: ping: do numeric-only output by default.
Aug 22 2019, 8:42 AM
jansucan added a comment to D21351: ping: do reverse DNS lookup for a reply by default.

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.

Aug 22 2019, 8:13 AM
jansucan added a comment to D21292: ping6: add a basic test of ping6's functionality.

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.

Aug 22 2019, 6:46 AM
jansucan added a comment to D21289: ping: add a basic test of ping's functionality.

Rebase.
Send only one packet.
Add -t 1 option to reduce time of waiting for the reply.

Aug 22 2019, 6:25 AM

Aug 21 2019

jansucan added a comment to D21327: ping: fix alignment errors.

Change data type of the variable for recvmsg's return value from int to ssize_t.

Aug 21 2019, 9:04 PM
jansucan added a comment to D21338: ping6: make lookup of symbolic names in the reply default.

D21356 adds -H option to ping . Eventually I decided to keep the default behavior in ping and ping6.

Aug 21 2019, 8:39 PM
jansucan created D21356: ping: add -H option for enabling reverse DNS lookup.
Aug 21 2019, 8:34 PM
jansucan added a comment to D21292: ping6: add a basic test of ping6's functionality.

Yes, the TTL will be filtered out. Both ping and ping6 tests will be sending only one packet.

Aug 21 2019, 7:55 PM
jansucan added a comment to D21338: ping6: make lookup of symbolic names in the reply default.

OK. I will keep -H in ping6 and add it to ping. It will be default in both of them.

Aug 21 2019, 6:02 PM
jansucan added inline comments to D21327: ping: fix alignment errors.
Aug 21 2019, 5:59 PM
jansucan added inline comments to D21345: ping6: Rename options for unifying option parsing with ping.
Aug 21 2019, 2:15 PM
jansucan added a comment to D21338: ping6: make lookup of symbolic names in the reply default.

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.

Aug 21 2019, 2:03 PM
jansucan created D21351: ping: do reverse DNS lookup for a reply by default.
Aug 21 2019, 1:57 PM
jansucan added a comment to D21289: ping: add a basic test of ping's functionality.

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.

Aug 21 2019, 1:42 PM
jansucan added inline comments to D21289: ping: add a basic test of ping's functionality.
Aug 21 2019, 1:30 PM
jansucan added inline comments to D21327: ping: fix alignment errors.
Aug 21 2019, 7:52 AM
jansucan added a comment to D21327: ping: fix alignment errors.

Use MIN() instead of a custom conditional expression.

Aug 21 2019, 7:33 AM
jansucan added inline comments to D21327: ping: fix alignment errors.
Aug 21 2019, 7:03 AM

Aug 20 2019

jansucan added a comment to D21338: ping6: make lookup of symbolic names in the reply default.

I'm not sure if I understand you correctly.

Aug 20 2019, 5:46 PM
jansucan added inline comments to D21340: ping: add tests of the Internet checksum function.
Aug 20 2019, 5:36 PM
jansucan added a comment to D21340: ping: add tests of the Internet checksum function.

Set WARNS to 6 explicitly for tests.

Aug 20 2019, 5:35 PM
jansucan added inline comments to D21340: ping: add tests of the Internet checksum function.
Aug 20 2019, 4:37 PM
jansucan added a comment to D21340: ping: add tests of the Internet checksum function.

Correct unaligned data buffer size.

Aug 20 2019, 4:34 PM
jansucan added inline comments to D21340: ping: add tests of the Internet checksum function.
Aug 20 2019, 4:22 PM
jansucan added a comment to D21340: ping: add tests of the Internet checksum function.

Add an entry to etc/mtree/BSD.tests.dist.

Aug 20 2019, 4:21 PM
jansucan created D21345: ping6: Rename options for unifying option parsing with ping.
Aug 20 2019, 4:11 PM
jansucan added a comment to D21338: ping6: make lookup of symbolic names in the reply default.

Remove 'H' from the getopt() option string.

Aug 20 2019, 3:42 PM
jansucan created D21340: ping: add tests of the Internet checksum function.
Aug 20 2019, 1:20 PM
jansucan created D21338: ping6: make lookup of symbolic names in the reply default.
Aug 20 2019, 12:26 PM
jansucan added inline comments to D21289: ping: add a basic test of ping's functionality.
Aug 20 2019, 7:21 AM
jansucan added inline comments to D21289: ping: add a basic test of ping's functionality.
Aug 20 2019, 7:18 AM
jansucan added a comment to D21327: ping: fix alignment errors.

Fix the warning about signed and unsigned type in conditional
expression.

Aug 20 2019, 6:23 AM

Aug 19 2019

jansucan added a comment to D21327: ping: fix alignment errors.

If the line 1144 is this line

Aug 19 2019, 7:26 PM
jansucan created D21327: ping: fix alignment errors.
Aug 19 2019, 6:45 PM