forked from osmocom/wireshark
Add missing const to inet_ipv6.h
Make it simpler too. Change-Id: I97dc79d7ac536089c1fa6ec2c20f19754d47a9d4 Reviewed-on: https://code.wireshark.org/review/15866 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
This commit is contained in:
parent
72af485d4e
commit
90fa55ddd2
|
@ -30,30 +30,22 @@ struct e_in6_addr {
|
|||
* Unicast Scope
|
||||
* Note that we must check topmost 10 bits only, not 16 bits (see RFC2373).
|
||||
*/
|
||||
#if 0 /* XXX Currently unused */
|
||||
static inline gboolean in6_is_addr_link_local(struct e_in6_addr *a) {
|
||||
if ((a->bytes[0] == 0xfe) && ((a->bytes[1] & 0xc0) == 0x80)) {
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
static inline gboolean in6_is_addr_linklocal(const struct e_in6_addr *a)
|
||||
{
|
||||
return (a->bytes[0] == 0xfe) && ((a->bytes[1] & 0xc0) == 0x80);
|
||||
}
|
||||
|
||||
static inline gboolean in6_is_addr_sitelocal(struct e_in6_addr *a) {
|
||||
if ((a->bytes[0] == 0xfe) && ((a->bytes[1] & 0xc0) == 0xc0)) {
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
static inline gboolean in6_is_addr_sitelocal(const struct e_in6_addr *a)
|
||||
{
|
||||
return (a->bytes[0] == 0xfe) && ((a->bytes[1] & 0xc0) == 0xc0);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Multicast
|
||||
*/
|
||||
static inline gboolean in6_is_addr_multicast(struct e_in6_addr *a) {
|
||||
if (a->bytes[0] == 0xff) {
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
static inline gboolean in6_is_addr_multicast(const struct e_in6_addr *a)
|
||||
{
|
||||
return a->bytes[0] == 0xff;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue