This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Added missing ICMPv6 flags and option
- From: Dan LÃdtke <maildanrl at gmail dot com>
- To: "Carlos O'Donell" <carlos at redhat dot com>
- Cc: Florian Weimer <fweimer at redhat dot com>, libc-alpha at sourceware dot org, Dan Luedtke <danrl at danrl dot de>
- Date: Wed, 12 Feb 2014 22:30:00 +0100
- Subject: Re: [PATCH] Added missing ICMPv6 flags and option
- Authentication-results: sourceware.org; auth=none
- References: <1392230153-23499-1-git-send-email-danrl at danrl dot de> <52FBC7DD dot 8020309 at redhat dot com> <CAAfuxnK0eAA1mA_fxhO4Oz9hWiV4yJ6FrZOGDC4j+1uv0OXHFQ at mail dot gmail dot com> <52FBD8BC dot 4020805 at redhat dot com> <52FBDEFE dot 9050302 at redhat dot com> <52FBE440 dot 2090705 at redhat dot com>
>> I looked a bit around and it seems the BSDs already have these
>> constants under slightly different names, ND_RA_FLAG_RTPREF_LOW etc.,
>> plus _MASK and _RSV constants. This might be sufficient reason to
>> include these constants.
Done.
> Right, we need a standard set of defines.
Yes we do. I have more in the queue. See my next patch which includes
the options I need for my software to work.
> Do these constants exist in the Linux kernel?
They look a bit different there.
include/uapi/linux/icmpv6.h:
82 #define ICMPV6_ROUTER_PREF_LOW 0x3
83 #define ICMPV6_ROUTER_PREF_MEDIUM 0x0
84 #define ICMPV6_ROUTER_PREF_HIGH 0x1
85 #define ICMPV6_ROUTER_PREF_INVALID 0x2
> Would a sensible person reading the RFCs come up with the same constant names?
I consider myself sensible and I read a lot of IPv6-related RFCs :)
So, yes, given that there are no constants in the RFC. First come,
first define? It is a bit of a mess at the moment when writing
portable IPv6 software right now.
For example, this one always gives me a headache and needs custom
defines to work around:
glibc:
#define ND_RA_FLAG_HOME_AGENT 0x20
BSD(?):
#define ND_RA_FLAG_HA 0x20
--
Dan Luedtke
http://www.danrl.de