lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [patch #7912] Add a macro for introspecting the IPv6 loopba


From: Grant Erickson
Subject: [lwip-devel] [patch #7912] Add a macro for introspecting the IPv6 loopback address.
Date: Thu, 03 Jan 2013 19:35:14 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/536.26.17 (KHTML, like Gecko) Version/6.0.2 Safari/536.26.17

URL:
  <http://savannah.nongnu.org/patch/?7912>

                 Summary: Add a macro for introspecting the IPv6 loopback
address.
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: marathon96
            Submitted on: Thu 03 Jan 2013 07:35:13 PM GMT
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:

diff --git a/src/include/ipv6/lwip/ip6_addr.h
b/src/include/ipv6/lwip/ip6_addr.h
index 89b5b81..7ac4856 100644
--- a/src/include/ipv6/lwip/ip6_addr.h
+++ b/src/include/ipv6/lwip/ip6_addr.h
@@ -170,6 +170,11 @@ Little-endian version, stored in network order (no
htonl). */
                              ((ip6addr)->addr[2] == 0) && \
                              ((ip6addr)->addr[3] == 0)))
 
+#define ip6_addr_isloopback(ip6addr) (((ip6addr) == NULL) || \
+                             (((ip6addr)->addr[0] == 0UL) && \
+                             ((ip6addr)->addr[1] == 0UL) && \
+                             ((ip6addr)->addr[2] == 0UL) && \
+                             ((ip6addr)->addr[3] ==
PP_HTONL(0x00000001UL))))
 
 #define ip6_addr_isglobal(ip6addr) (((ip6addr)->addr[0] &
PP_HTONL(0xe0000000UL)) == PP_HTONL(0x20000000UL))
 




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Thu 03 Jan 2013 07:35:13 PM GMT  Name: ip6-addr-isloopback-0001.0.patch 
Size: 1kB   By: marathon96
Add a macro for introspecting the IPv6 loopback address.
<http://savannah.nongnu.org/patch/download.php?file_id=27195>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?7912>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]