Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4755 → Rev 4756

/branches/network/uspace/srv/net/include/inet.h
52,10 → 52,10
typedef struct addrinfo addrinfo_t;
 
/** Prints the address into the character buffer.
* @param family The address family. Input parameter.
* @param data The address data. Input parameter.
* @param address The character buffer to be filled. Output parameter.
* @param length The buffer length. Input parameter.
* @param[in] family The address family.
* @param[in] data The address data.
* @param[out] address The character buffer to be filled.
* @param[in] length The buffer length.
* @returns EOK on success.
* @returns EINVAL if the data or address parameter is NULL.
* @returns ENOMEM if the character buffer is not long enough.
65,9 → 65,9
 
/** Parses the character string into the address.
* If the string is shorter than the full address, zero bytes are added.
* @param family The address family. Input parameter.
* @param address The character buffer to be parsed. Input parameter.
* @param data The address data to be filled. Output parameter.
* @param[in] family The address family.
* @param[in] address The character buffer to be parsed.
* @param[out] data The address data to be filled.
* @returns EOK on success.
* @returns EINVAL if the data parameter is NULL.
* @returns ENOENT if the address parameter is NULL.
87,25 → 87,25
uint8_t sa_data[ 14 ];
};
 
/** Address information.
* \todo
*/
struct addrinfo{
int ai_flags; // AI_PASSIVE, AI_CANONNAME, etc.
uint16_t ai_family; // AF_INET, AF_INET6, AF_UNSPEC
int ai_socktype; // SOCK_STREAM, SOCK_DGRAM
int ai_protocol; // use 0 for "any"
size_t ai_addrlen; // size of ai_addr in bytes
struct sockaddr * ai_addr; // struct sockaddr_in or _in6
char * ai_canonname; // full canonical hostname
struct addrinfo * ai_next; // linked list, next node
};
// TODO define address information
// /** Address information.
// * \todo
// */
//struct addrinfo{
// int ai_flags; // AI_PASSIVE, AI_CANONNAME, etc.
// uint16_t ai_family; // AF_INET, AF_INET6, AF_UNSPEC
// int ai_socktype; // SOCK_STREAM, SOCK_DGRAM
// int ai_protocol; // use 0 for "any"
// size_t ai_addrlen; // size of ai_addr in bytes
// struct sockaddr * ai_addr; // struct sockaddr_in or _in6
// char * ai_canonname; // full canonical hostname
// struct addrinfo * ai_next; // linked list, next node
//};
 
/*int getaddrinfo(const char *node, // e.g. "www.example.com" or IP
const char *service, // e.g. "http" or port number
const struct addrinfo *hints,
struct addrinfo **res);
 
getnameinfo
*/