[Top][All Lists]

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

[lwip-devel] [bug #24132] Cross-dependency between ip_addr.h and inet.h

From: Luca Ceresoli
Subject: [lwip-devel] [bug #24132] Cross-dependency between ip_addr.h and inet.h
Date: Mon, 25 Aug 2008 10:51:29 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv: Gecko/2008070208 Firefox/3.0.1


                 Summary: Cross-dependency between ip_addr.h and inet.h
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: lucaceresoli
            Submitted on: lun 25 ago 2008 10:51:27 GMT
                Category: None
                Severity: 3 - Normal
              Item Group: Compiler Warning
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 
            lwIP version: 1.3.0



ip_addr.h defines:
> #define ip4_addr1(ipaddr) ((u16_t)(ntohl((ipaddr)->addr) >> 24) & 0xff)
and other macros which use ntohl().

This generates compiler warnings: ip_addr.h should include inet.h, where
ntohl() is.

But inet.h already includes ip_addr.h (for using struct in_addr)!

Idea 1: mode ntohl() and related to a new file :-(

Idea 2: reimplement ip4_addr1() without using ntohl :-S such as:
#define ip4_addr1(ipaddr) ((u16_t)((char*)((ipaddr)->addr)[0]) & 0xff)
or similar


Reply to this item at:


  Messaggio inviato con/da Savannah

reply via email to

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