lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] [task #7410] Don't include internal headers in apiheade


From: bockham
Subject: Re: [lwip-devel] [task #7410] Don't include internal headers in apiheader files
Date: Wed, 7 Nov 2007 23:33:34 +0800

>Another question (like posted on irc already): Wouldn't it make sense to 
>split inet.h into 'real' inet.h-like functions and checksum-functions? As it 
>is now, sockets.h includes pbuf.h just because inet.h includes the checksum 
>functions (when sockets.h only needs inet_addr() and htonl()). 
>
I'm quite agree! This makes the filename clear and module independent
Maybe name them inet.c/h and inet_chksum.c/h

inet.c :

u32_t inet_addr(const char *cp); 
s8_t inet_aton(const char *cp, struct in_addr *addr); 

u16_t htons(u16_t n); 
u16_t ntohs(u16_t n); 
u32_t htonl(u32_t n); 
u32_t ntohl(u32_t n);

inet_chksum.c :

u16_t inet_chksum(void *data, u16_t len); 
u16_t inet_chksum_pbuf(struct pbuf *p); 
u16_t inet_chksum_pseudo(struct pbuf *p, 
       struct ip_addr *src, struct ip_addr *dest, 
       u8_t proto, u32_t proto_len);

reply via email to

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