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


Ignore:
Timestamp:
2013-10-05T11:53:43Z (12 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
cbfc8b7
Parents:
408424e (diff), 3e896e1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

File:
1 edited

Legend:

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

    r408424e rc42f50d  
    3939#include <net/in.h>
    4040#include <net/in6.h>
     41#include <net/socket.h>
    4142
    4243typedef uint32_t addr32_t;
     
    4445typedef uint8_t addr128_t[16];
    4546
     47typedef enum {
     48        /** Any IP protocol version */
     49        ip_any,
     50        /** IPv4 */
     51        ip_v4,
     52        /** IPv6 */
     53        ip_v6
     54} ip_ver_t;
     55
    4656/** Node address */
    4757typedef struct {
    48         uint16_t family;
     58        /** IP version */
     59        ip_ver_t version;
    4960        union {
    5061                addr32_t addr;
     
    5566/** Network address */
    5667typedef struct {
    57         /** Address family */
    58         uint16_t family;
     68        /** IP version */
     69        ip_ver_t version;
    5970       
    6071        /** Address */
     
    91102    uint16_t, uint16_t, uint16_t, uint16_t, uint8_t);
    92103
    93 extern int inet_addr_family(const char *, uint16_t *);
    94104extern void inet_naddr_addr(const inet_naddr_t *, inet_addr_t *);
    95105extern void inet_addr_naddr(const inet_addr_t *, uint8_t, inet_naddr_t *);
     
    110120extern int inet_naddr_format(const inet_naddr_t *, char **);
    111121
    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 *,
     122extern ip_ver_t inet_addr_get(const inet_addr_t *, addr32_t *, addr128_t *);
     123extern ip_ver_t inet_naddr_get(const inet_naddr_t *, addr32_t *, addr128_t *,
    114124    uint8_t *);
    115125
     
    125135    sockaddr_in6_t *);
    126136
     137extern ip_ver_t ipver_from_af(int af);
     138extern int inet_addr_sockaddr(const inet_addr_t *, uint16_t, sockaddr_t **,
     139    socklen_t *);
     140
    127141#endif
    128142
Note: See TracChangeset for help on using the changeset viewer.