tcpdump mailing list archives
Re: Sharing code between print-icmp.c and print-icmp6.c
From: Bill Fenner <fenner () gmail com>
Date: Mon, 26 Feb 2024 19:06:05 -0800
On Sat, Feb 24, 2024 at 1:40 PM Guy Harris <gharris () sonic net> wrote:
On Feb 5, 2024, at 9:38 AM, Bill Fenner <fenner () gmail com> wrote:Is this a reasonable way to proceed?Yes. Perhaps have a file icmp-common.c or print-icmp-common.c with code and data structures common to ICMP(v4) and ICMPv6?
There's a bunch of stuff that would have to move to print-icmp-common.c; for now if it's ok I'd rather stick with the code living in print-icmp.c. Once someone implements RFC4884 for IPv6 (and hopefully updates the implementation for IPv4 to match the RFC), it may make more sense to move the code since there will be more shared code. (Basically, the RFC8335 code calls print_icmp_multipart_ext_object(), and I don't want to move that until there's a reason to - and it doesn't really make sense for print-icmp-common.c to call into print-icmp.c) My current proposal is the second commit in https://github.com/the-tcpdump-group/tcpdump/pull/1131/ - right now it's https://github.com/the-tcpdump-group/tcpdump/pull/1131/commits/a362775645ac012eeda9d4f66c47b595cee36e77 but that may change if I need to make any changes. Bill _______________________________________________ tcpdump-workers mailing list -- tcpdump-workers () lists tcpdump org To unsubscribe send an email to tcpdump-workers-leave () lists tcpdump org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
Current thread:
- Sharing code between print-icmp.c and print-icmp6.c Bill Fenner (Feb 24)
- Re: Sharing code between print-icmp.c and print-icmp6.c Guy Harris (Feb 24)
- Re: Sharing code between print-icmp.c and print-icmp6.c Bill Fenner (Feb 26)
- Re: Sharing code between print-icmp.c and print-icmp6.c Guy Harris (Feb 24)
