Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/inet/addr.h

    r26de91a r83781a22  
    3939#include <net/in.h>
    4040#include <net/in6.h>
    41 #include <net/socket.h>
    4241
    4342typedef uint32_t addr32_t;
     
    4544typedef uint8_t addr128_t[16];
    4645
    47 typedef enum {
    48         /** Any IP protocol version */
    49         ip_any,
    50         /** IPv4 */
    51         ip_v4,
    52         /** IPv6 */
    53         ip_v6
    54 } ip_ver_t;
    55 
    5646/** Node address */
    5747typedef struct {
    58         /** IP version */
    59         ip_ver_t version;
     48        uint16_t family;
    6049        union {
    6150                addr32_t addr;
     
    6655/** Network address */
    6756typedef struct {
    68         /** IP version */
    69         ip_ver_t version;
     57        /** Address family */
     58        uint16_t family;
    7059       
    7160        /** Address */
     
    7968} inet_naddr_t;
    8069
    81 extern const addr32_t addr32_broadcast_all_hosts;
    8270extern const addr48_t addr48_broadcast;
    8371
     
    10290    uint16_t, uint16_t, uint16_t, uint16_t, uint8_t);
    10391
     92extern int inet_addr_family(const char *, uint16_t *);
    10493extern void inet_naddr_addr(const inet_naddr_t *, inet_addr_t *);
    10594extern void inet_addr_naddr(const inet_addr_t *, uint8_t, inet_naddr_t *);
     
    120109extern int inet_naddr_format(const inet_naddr_t *, char **);
    121110
    122 extern ip_ver_t inet_addr_get(const inet_addr_t *, addr32_t *, addr128_t *);
    123 extern ip_ver_t inet_naddr_get(const inet_naddr_t *, addr32_t *, addr128_t *,
     111extern uint16_t inet_addr_get(const inet_addr_t *, addr32_t *, addr128_t *);
     112extern uint16_t inet_naddr_get(const inet_naddr_t *, addr32_t *, addr128_t *,
    124113    uint8_t *);
    125114
     
    135124    sockaddr_in6_t *);
    136125
    137 extern ip_ver_t ipver_from_af(int af);
    138 extern int inet_addr_sockaddr(const inet_addr_t *, uint16_t, sockaddr_t **,
    139     socklen_t *);
    140 
    141126#endif
    142127
Note: See TracChangeset for help on using the changeset viewer.