tcpdump mailing list archives
Sharing code between print-icmp.c and print-icmp6.c
From: Bill Fenner <fenner () gmail com>
Date: Mon, 5 Feb 2024 09:38:23 -0800
Hi, I'm working on RFC8335 (PROBE) support for tcpdump - I've already submitted the pull request for IPv4. I'm working on IPv6 support, and it looks like this is the first case that the packet format is identical between ICMP and ICMPv6 but complex enough that it's worth reusing code. My commit https://github.com/fenner/tcpdump/commit/8590ce9d7c06f3db88f27a63a608484f9b2c04ae is a first try at reusing code appropriately: it makes some "struct tok"'s global, as well as the ICMP Extension Object parser, and puts them in a new "icmp.h" (for which I took the "print-icmp.c" copyright statement, since the code came from print-icmp.c). Is this a reasonable way to proceed? Thanks, 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)