Changeset 19a4f73 in mainline for uspace/lib/c/include


Ignore:
Timestamp:
2013-06-20T15:21:48Z (12 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a2e3ee6
Parents:
3e66428
Message:

udp: use new network address infrastructure (towards IPv6 support)

Location:
uspace/lib/c/include
Files:
4 edited

Legend:

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

    r3e66428 r19a4f73  
    3838#include <stdint.h>
    3939#include <net/in.h>
     40#include <inet/addr.h>
    4041
    4142#define INET2_ADDR_SIZE  16
     
    8485
    8586extern int inet2_addr_compare(inet2_addr_t *, inet2_addr_t *);
    86 extern int inet2_addr_is_empty(inet2_addr_t *);
     87extern int inet2_addr_is_any(inet2_addr_t *);
     88
     89extern void inet_inet2(inet_addr_t *, inet2_addr_t *);
     90extern void inet2_inet(inet2_addr_t *, inet_addr_t *);
    8791
    8892#endif
  • uspace/lib/c/include/inet/inet.h

    r3e66428 r19a4f73  
    3737
    3838#include <inet/addr.h>
     39#include <inet/addr2.h>
    3940#include <sys/types.h>
    4041
     
    6061extern int inet_send(inet_dgram_t *, uint8_t, inet_df_t);
    6162extern int inet_get_srcaddr(inet_addr_t *, uint8_t, inet_addr_t *);
     63extern int inet2_get_srcaddr(inet2_addr_t *, uint8_t, inet2_addr_t *);
    6264
    6365#endif
  • uspace/lib/c/include/net/in.h

    r3e66428 r19a4f73  
    4747#define INADDR_ANY 0
    4848
    49 /** Type definition of the INET address.
    50  * @see in_addr
    51  */
    52 typedef struct in_addr in_addr_t;
    53 
    54 /** Type definition of the INET socket address.
    55  * @see sockaddr_in
    56  */
    57 typedef struct sockaddr_in      sockaddr_in_t;
    58 
    5949/** INET address. */
    60 struct in_addr {
     50typedef struct in_addr {
    6151        /** 4 byte IP address. */
    6252        uint32_t s_addr;
    63 };
     53} in_addr_t;
    6454
    6555/** INET socket address.
    6656 * @see sockaddr
    6757 */
    68 struct sockaddr_in {
     58typedef struct sockaddr_in {
    6959        /** Address family. Should be AF_INET. */
    7060        uint16_t sin_family;
     
    7262        uint16_t sin_port;
    7363        /** Internet address. */
    74         struct in_addr sin_addr;
     64        in_addr_t sin_addr;
    7565        /** Padding to meet the sockaddr size. */
    7666        uint8_t sin_zero[8];
    77 };
     67} sockaddr_in_t;
    7868
    7969#endif
  • uspace/lib/c/include/net/ip_protocols.h

    r3e66428 r19a4f73  
    4444/*@{*/
    4545
    46 #define IPPROTO_ICMP    1
    47 #define IPPROTO_TCP     6
    48 #define IPPROTO_UDP     17
     46#define IPPROTO_ICMP    1
     47#define IPPROTO_TCP     6
     48#define IPPROTO_UDP     17
     49#define IPPROTO_ICMPV6  58
    4950
    5051/*@}*/
Note: See TracChangeset for help on using the changeset viewer.