From: Petr Vorel <pvorel@suse.cz>
To: Yang Xu <xuyang2018.jy@fujitsu.com>, ltp@lists.linux.it
Subject: Re: [LTP] [RESEND 2/2] network/lib6/asapi_02: Convert into new api
Date: Mon, 17 Apr 2023 16:54:44 +0200 [thread overview]
Message-ID: <20230417145444.GA2423297@pevik> (raw)
In-Reply-To: <20230417144758.GA2380745@pevik>
...
> > +static struct tcase {
> > + char *tname;
> > + unsigned char send_type;
> > + unsigned char filter_type;
> > + enum filter_macro test_macro;
> > + int pass_packet;
> > +} tcases[] = {
> > + {"ICMP6_FILTER_SETPASS send type 20 filter type 20", 20, 20, T_SETPASS, 1},
> First, I wonder what are these cryptic numbers 20, 21, 22.
> It'd be great to replace numbers with constants.
https://man.openbsd.org/icmp6 claims: "Suitable values are defined in
<netinet/icmp6.h>.", but I see none in their header:
http://fxr.watson.org/fxr/source/netinet/icmp6.h?v=OPENBSD;im=3
Kind regards,
Petr
> For maybe one of these:
> $ grep -E -e define.*[[:space:]]20$ -e define.*0x14 include/net*
> include/netinet/igmp.h:#define IGMP_PIM 0x14
> include/netinet/in.h:#define IP_ORIGDSTADDR 20
> include/netinet/in.h:#define IP_MAX_MEMBERSHIPS 20
> include/netinet/in.h:#define IPV6_JOIN_GROUP 20
> ...
> $ grep -E -e define.*[[:space:]]21$ -e define.*0x15 include/net*
> include/netinet/igmp.h:#define IGMP_TRACE 0x15
> include/netinet/in.h:#define IP_MINTTL 21
> include/netinet/in.h:#define IPV6_LEAVE_GROUP 21
> ...
> $ grep -E -e define.*[[:space:]]22$ -e define.*0x16 include/net*
> include/netinet/igmp.h:#define IGMP_V2_MEMBERSHIP_REPORT 0x16
> include/netinet/in.h:#define IPPROTO_IDP 22
> include/netinet/in.h:#define IP_NODEFRAG 22
> include/netinet/in.h:#define IPV6_ROUTER_ALERT 22
> ...
...
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2023-04-17 14:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-12 2:59 [LTP] [RESEND 1/2] network/lib6/asapi_02: Fix T_WILLBLOCK/T_WILLPASS no FAIL/PASS bug Yang Xu
2023-04-12 2:59 ` [LTP] [RESEND 2/2] network/lib6/asapi_02: Convert into new api Yang Xu
2023-04-17 14:47 ` Petr Vorel
2023-04-17 14:54 ` Petr Vorel [this message]
2023-04-18 2:56 ` Yang Xu (Fujitsu)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230417145444.GA2423297@pevik \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
--cc=xuyang2018.jy@fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.