Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals

uIP hostname resolver functions
[The uIP TCP/IP stack]


Detailed Description

The uIP DNS resolver functions are used to lookup a hostname and map it to a numerical IP address. It maintains a list of resolved hostnames that can be queried with the resolv_lookup() function. New hostnames can be resolved using the resolv_query() function.

uIP DNS resolver는 hostname을 찾거나 IP주소를 매핑시켜주는 역할을 한다. resolv_lookup() 함수로 리스트에 있는 호스트네임을 찾고, resolv_query() 함수로 새로운 호스트네임을 리스트로 만들수있다.


When a hostname has been resolved (or found to be non-existant), the resolver code calls a callback function called resolv_found() that must be implemented by the module that uses the resolver.

호스트네임이 리스트에 있을때(또는 존재하지 않는 경우), resolver의 코드는 resolv_found()라는 콜백함수를 호출한다. 따라서 resulver를 사용하는 모듈에서 이 함수에 대한 처리를 구현해야 한다.



Files

file  resolv.c
 DNS host name to IP address resolver.
DNS호스트 이름을 IP로 변환

file  resolv.h
 DNS resolver code header file.
DNS resolver 헤더 파일


Functions

void resolv_found (char *name, u16_t *ipaddr)
 Callback function which is called when a hostname is found.
호스트네임을 찾았을때 호출되는 콜백함수.

void resolv_conf (u16_t *dnsserver)
 Configure which DNS server to use for queries.
DNS서버를 지정한다.

u16_t * resolv_getserver (void)
 Obtain the currently configured DNS server.
현재 지정된 DNS서버의 IP주소를 얻어온다.

void resolv_init (void)
 Initalize the resolver.
초기화.

u16_t * resolv_lookup (char *name)
 Look up a hostname in the array of known hostnames.
알려진 호스트네임 배열에서 호스트네임을 찾는다.

void resolv_query (char *name)
 Queues a name so that a question for the name will be sent out.
네트워크에서 호스트네임을 찾아온다.


Function Documentation

void resolv_conf (  u16_t *  dnsserver  ) 
 

Configure which DNS server to use for queries.

DNS서버를 지정 한다.


Parameters:
dnsserver A pointer to a 4-byte representation of the IP address of the DNS server to be configured.
DNS서버의 4바이트 IP를 넣어준다.

Here is the call graph for this function:

void resolv_found (  char *  name,
u16_t *  ipaddr
) 
 

Callback function which is called when a hostname is found.

호스트네임을 찾았을 때 호출되는 콜백함수.


This function must be implemented by the module that uses the DNS resolver. It is called when a hostname is found, or when a hostname was not found.

호스트네임을 찾았거나, 못 찾았을 때 콜백함수를 호출하기 때문에 DNS resover를 사용하는 모듈에서는 이 함수를 꼭 구현해줘야 한다.


Parameters:
name A pointer to the name that was looked up.
찾을 호스트네임의 배열 포인터.
ipaddr A pointer to a 4-byte array containing the IP address of the hostname, or NULL if the hostname could not be found.
IP주소를 담을 배열, 만약 NULL이면 첫번째 파라미터의 호스트네임을 못찾은것이다.

u16_t* resolv_getserver (  void   ) 
 

Obtain the currently configured DNS server.

현재 사용되는 DNS서버의 IP주소를 알아온다.


Returns:
A pointer to a 4-byte representation of the IP address of the currently configured DNS server or NULL if no DNS server has been configured.
현재 사용되고 있는 DNS서버의 IP주소를 리턴한다. 만약 DNS서버가 없다면 NULL.

u16_t* resolv_lookup (  char *  name  ) 
 

Look up a hostname in the array of known hostnames.

알려진 호스트네임을 가지고있는 배열에서 호스트네임을 찾는함수.


Note:
This function only looks in the internal array of known hostnames, it does not send out a query for the hostname if none was found. The function resolv_query() can be used to send a query for a hostname.

이 함수는 단지 커널 내부 테이블만 찾아본다. 호스트네임을 네트워크에서 찾아오는 함수는 resolv_query()이다.


Returns:
A pointer to a 4-byte representation of the hostname's IP address, or NULL if the hostname was not found in the array of hostnames.
호스트네임 테이블을 뒤져서 만약 찾았다면, 해당 IP주소를, 못 찾았다면 NULL을 리턴한다.

void resolv_query (  char *  name  ) 
 

Queues a name so that a question for the name will be sent out.

네트워크에서 호스트네임을 찾아온다.


Parameters:
name The hostname that is to be queried.
쿼리된 호스트네임.


Generated on Tue Oct 7 15:51:51 2003 for uIP 0.9 by doxygen 1.3.3