Changeset f023251 in mainline for uspace/lib/c/include/inet/addr.h


Ignore:
Timestamp:
2013-09-29T21:06:10Z (11 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e948fde
Parents:
13be2583
Message:

HelenOS internet address version should not be based on BSD sockets definition.

File:
1 edited

Legend:

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

    r13be2583 rf023251  
    4444typedef uint8_t addr128_t[16];
    4545
     46typedef enum {
     47        /** Any IP protocol version */
     48        ip_any,
     49        /** IPv4 */
     50        ip_v4,
     51        /** IPv6 */
     52        ip_v6
     53} ip_ver_t;
     54
    4655/** Node address */
    4756typedef struct {
    48         uint16_t family;
     57        /** IP version */
     58        ip_ver_t version;
    4959        union {
    5060                addr32_t addr;
     
    5565/** Network address */
    5666typedef struct {
    57         /** Address family */
    58         uint16_t family;
     67        /** IP version */
     68        ip_ver_t version;
    5969       
    6070        /** Address */
     
    91101    uint16_t, uint16_t, uint16_t, uint16_t, uint8_t);
    92102
    93 extern int inet_addr_family(const char *, uint16_t *);
    94103extern void inet_naddr_addr(const inet_naddr_t *, inet_addr_t *);
    95104extern void inet_addr_naddr(const inet_addr_t *, uint8_t, inet_naddr_t *);
     
    110119extern int inet_naddr_format(const inet_naddr_t *, char **);
    111120
    112 extern uint16_t inet_addr_get(const inet_addr_t *, addr32_t *, addr128_t *);
    113 extern uint16_t inet_naddr_get(const inet_naddr_t *, addr32_t *, addr128_t *,
     121extern ip_ver_t inet_addr_get(const inet_addr_t *, addr32_t *, addr128_t *);
     122extern ip_ver_t inet_naddr_get(const inet_naddr_t *, addr32_t *, addr128_t *,
    114123    uint8_t *);
    115124
Note: See TracChangeset for help on using the changeset viewer.