patchlwIP - A Lightweight TCP/IP stack - Patches: patch #7912, Add a macro for introspecting the...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #7912: Add a macro for introspecting the IPv6 loopback address.

Submitter:  Grant Erickson <marathon96>
Submitted:  Thu 03 Jan 2013 07:35:13 PM UTC
   
 
Category:  IPv6 Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  goldsimon Open/Closed:  Closed
Planned Release:  None

Thu 16 Jan 2014 08:51:20 PM UTC, comment #1: 

Done, slightly modified, thanks.

Simon Goldschmidt <goldsimon>
Group administrator
Thu 03 Jan 2013 07:35:13 PM UTC, original submission:  

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))
 

Grant Erickson <marathon96>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #27195:  ip6-addr-isloopback-0001.0.patch added by marathon96 (1KiB - application/octet-stream - Add a macro for introspecting the IPv6 loopback address.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Updated the item)
  • -email is unavailable- added by marathon96 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-01-16 goldsimon StatusNone Done
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
    2013-01-15 goldsimon CategoryNone IPv6
    2013-01-03 marathon96 Attached File- Added ip6-addr-isloopback-0001.0.patch, #27195

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code