Changeset 257feec in mainline for uspace/lib
- Timestamp:
- 2013-06-27T12:48:32Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9f391e9
- Parents:
- 679ee84
- Location:
- uspace/lib/c/include/net
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/net/in.h
r679ee84 r257feec 45 45 #define INET_ADDRSTRLEN (4 * 3 + 3 + 1) 46 46 47 #define INADDR_ANY 047 #define INADDR_ANY 0 48 48 49 49 /** INET address. */ -
uspace/lib/c/include/net/in6.h
r679ee84 r257feec 43 43 44 44 /** INET6 string address maximum length. */ 45 #define INET6_ADDRSTRLEN (8 * 4 + 7 + 1) 46 47 /** Type definition of the INET6 address. 48 * @see in6_addr 49 */ 50 typedef struct in6_addr in6_addr_t; 51 52 /** Type definition of the INET6 socket address. 53 * @see sockaddr_in6 54 */ 55 typedef struct sockaddr_in6 sockaddr_in6_t; 45 #define INET6_ADDRSTRLEN (8 * 4 + 7 + 1) 56 46 57 47 /** INET6 address. */ 58 struct in6_addr {48 typedef struct in6_addr { 59 49 /** 16 byte IPv6 address. */ 60 u nsigned chars6_addr[16];61 } ;50 uint8_t s6_addr[16]; 51 } in6_addr_t; 62 52 63 53 /** INET6 socket address. 64 54 * @see sockaddr 65 55 */ 66 struct sockaddr_in6 {56 typedef struct sockaddr_in6 { 67 57 /** Address family. Should be AF_INET6. */ 68 58 uint16_t sin6_family; … … 75 65 /** Scope identifier. */ 76 66 uint32_t sin6_scope_id; 77 } ;67 } sockaddr_in6_t; 78 68 79 69 #endif -
uspace/lib/c/include/net/inet.h
r679ee84 r257feec 41 41 #include <byteorder.h> 42 42 43 /** Type definition of the socket address.44 * @see sockaddr45 */46 typedef struct sockaddr sockaddr_t;47 48 43 /** Type definition of the address information. 49 44 * @see addrinfo 50 45 */ 51 typedef struct addrinfo 46 typedef struct addrinfo addrinfo_t; 52 47 53 48 /** Socket address. */ 54 struct sockaddr {49 typedef struct sockaddr { 55 50 /** Address family. @see socket.h */ 56 51 uint16_t sa_family; 57 52 /** 14 byte protocol address. */ 58 53 uint8_t sa_data[14]; 59 } ;54 } sockaddr_t; 60 55 61 56 extern int inet_ntop(uint16_t, const uint8_t *, char *, size_t); -
uspace/lib/c/include/net/socket_codes.h
r679ee84 r257feec 46 46 enum { 47 47 AF_NONE = 0, 48 AF_INET, 49 AF_INET6 48 AF_INET, /* IPv4 address */ 49 AF_INET6 /* IPv6 address */ 50 50 }; 51 51 … … 53 53 54 54 /** @name Protocol families definitions 55 * 55 * Same as address families. 56 56 */ 57 57 /*@{*/ 58 58 59 #define PF_INET 60 #define PF_INET6 59 #define PF_INET AF_INET 60 #define PF_INET6 AF_INET6 61 61 62 62 /*@}*/
Note:
See TracChangeset
for help on using the changeset viewer.