[LTP] [RESEND 2/2] network/lib6/asapi_02: Convert into new api
Petr Vorel
pvorel@suse.cz
Mon Apr 17 16:54:44 CEST 2023
...
> > +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
> ...
...
More information about the ltp
mailing list