lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] sockaddr structure


From: brivero
Subject: [lwip-users] sockaddr structure
Date: Tue, 24 Apr 2007 15:23:31 +0200


Hello to everybody,

I have decided to ask for your helpful advice once again. This time my question deals with the sockaddr structure, more concretely with the sockaddr_in:

struct sockaddr_in {                (from sockets.h, where lwip/ip_addr.h is included)
  u8_t sin_len;
  u8_t sin_family;
  u16_t sin_port;
  struct in_addr sin_addr;
  char sin_zero[8];
};

I would like to use this structure with both ipv4 and ipv6, and the problem is that I see that the in_addr is declared in the ip_addr.h belonging to the ipv4 folder, but I find no in_addr declaration in the ip_addr.h inside the ipv6 folder. In this file, there is declared a structure named ip_addr that should be the same, but I do not see where the name translation takes place. I suppose that they must be the same because they are very similar:

struct in_addr {                (ipv4)                struct ip_addr {                 (ipv6)
  u32_t s_addr;                                    u32_t addr[4];
};                                        };

What am I losing here???

Thank you very much for your answer.
reply via email to

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