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

uIP Address Resolution Protocol
[The uIP TCP/IP stack]


Detailed Description

The Address Resolution Protocol ARP is used for mapping between IP addresses and link level addresses such as the Ethernet MAC addresses. ARP uses broadcast queries to ask for the link level address of a known IP address and the host which is configured with the IP address for which the query was meant, will respond with its link level address.

ARP (주소 결정 프로토콜)은 IP 주소와 이더넷 MAC 주소와 같은 링크레벨 주소와의 매핑을 위해서 사용된다. ARP는 알려진 IP 주소의 링크레벨 주소를 요청하기 위한 쿼리를 브로트캐스트로 사용하고 쿼리에 요청된 IP 주소로 설정된 호스트는 링크레벨 주소를 응답할 것이다.


Note:
This ARP implementation only supports Ethernet.

이 ARP는 오직 이더넷만을 지원하게 구현되었다.


Files

file  uip_arp.c
 Implementation of the ARP Address Resolution Protocol.
ARP(주소 결정 프로토콜)의 구현.

file  uip_arp.h
 Macros and definitions for the ARP module.
ARP 모듈을 위한 매크로와 정의.


Data Structures

struct  uip_eth_addr
 Representation of a 48-bit Ethernet address.
48-bit 이더넷 주소의 표현. More...

struct  uip_eth_hdr
 The Ethernet header.
이더넷 헤더 More...


Functions

void uip_arp_init (void)
 Initialize the ARP module.
ARP 모듈의 초기화.

void uip_arp_ipin (void)
 ARP processing for incoming IP packets.
들어오는 IP 패킷에 대한 ARP 처리.

void uip_arp_arpin (void)
 ARP processing for incoming ARP packets.
들어오는 ARP 패킷에 대한 ARP 처리

void uip_arp_out (void)
 Prepend Ethernet header to an outbound IP packet and see if we need to send out an ARP request.
나가는 IP 패킷에 대한 이더넷 헤더의 삽입과 ARP 요청 전송이 필요할 경우 본다.

void uip_arp_timer (void)
 Periodic ARP processing function.
주기적 ARP 처리 함수.


Function Documentation

void uip_arp_arpin (  void   ) 
 

ARP processing for incoming ARP packets.

들어오는 ARP 패킷에대한 ARP 프로세싱


This function should be called by the device driver when an ARP packet has been received. The function will act differently depending on the ARP packet type: if it is a reply for a request that we previously sent out, the ARP cache will be filled in with the values from the ARP reply. If the incoming ARP packet is an ARP request for our IP address, an ARP reply packet is created and put into the uip_buf[] buffer.

이 함수는 ARP 패킷을 받았을때 디바이스 드라이버에 의해서 호출된다. 이 함수는 ARP 패킷 타입에 따라서 다르게 동작할 것이다. 만약 앞서 전송된 요청에 대한 응답일 경우 ARP 캐쉬는 ARP 응답에 대한 값으로 채워질 것이다. 만약 들어오는 ARP 패킷이 우리의 IP 주소에 대한 ARP 요청일경우 ARP 응답 패킷이 생성되고 uip_buf[] 버퍼에 채워진다.


When the function returns, the value of the global variable uip_len indicates whether the device driver should send out a packet or not. If uip_len is zero, no packet should be sent. If uip_len is non-zero, it contains the length of the outbound packet that is present in the uip_buf[] buffer.

함수가 리턴될 경우 전역 변수 uip_len의 값은 디바이스 드라이버가 패킷을 보냈는지 아닌지를 가르킨다. 만약 uip_len이 0이면 패킷은 전송되지 않았다. 만약 uip_len이 0이 아니면 그것은 uip_buf[] 버퍼에 존재하는 외부로 전송된 패킷의 길이를 포함한다.


This function expects an ARP packet with a prepended Ethernet header in the uip_buf[] buffer, and the length of the packet in the global variable uip_len.

이 함수는 uip_buf 버퍼에 이더넷 헤더를 추가한 ARP 패킷과 전역 변수 uip_len에는 패킷의 길이를 요구한다.

void uip_arp_ipin (  void   ) 
 

ARP processing for incoming IP packets.

들어오는 IP 패킷을 위한 ARP 처리.


This function should be called by the device driver when an IP packet has been received. The function will check if the address is in the ARP cache, and if so the ARP cache entry will be refreshed. If no ARP cache entry was found, a new one is created.

이 함수는 IP 패킷이 주어 졌을때 디바이스 드라이버에 의해 호출되어야 합니다. 그 주소가 ARP 캐시에 있는지 검사 합니다. 있다면 ARP 캐시를 Refresh합니다.


This function expects an IP packet with a prepended Ethernet header in the uip_buf[] buffer, and the length of the packet in the global variable uip_len.

이 함수는 uip_buf[] 버퍼, 그리고 전역 변수 uip_len에 있는 패킷의 길이에서 이더넷 헤더를 잘라낼 IP 패킷을 기다립니다.

void uip_arp_out (  void   ) 
 

Prepend Ethernet header to an outbound IP packet and see if we need to send out an ARP request.

외부로 나가는 패킷에 이더넷 헤더를 추가하고 나가는 ARP 요청이 필요할경우 본다.


This function should be called before sending out an IP packet. The function checks the destination IP address of the IP packet to see what Ethernet MAC address that should be used as a destination MAC address on the Ethernet.

이 함수는 IP 패킷을 전송하기 전에 호출되어야 한다. 함수는 이더넷 목적지 MAC 주소로 사용될 이더넷 MAC 주소를 보기 위한 IP 패킷의 목적지 IP 주소를 체크한다.


If the destination IP address is in the local network (determined by logical ANDing of netmask and our IP address), the function checks the ARP cache to see if an entry for the destination IP address is found. If so, an Ethernet header is prepended and the function returns. If no ARP cache entry is found for the destination IP address, the packet in the uip_buf[] is replaced by an ARP request packet for the IP address. The IP packet is dropped and it is assumed that they higher level protocols (e.g., TCP) eventually will retransmit the dropped packet.

만약 목적지 IP 주소가 로컬 네트워크(논리 넷마스크의 ANDing과 우리의 IP 주소에 의해서 결정)이면 함수는 목적지 IP 주소의 엔틀가 발견될 경우 ARP 캐쉬를 체크한다. 만약 이더넷 헤더가 추가되면 함수는 리턴한다. 만약 ARP 캐쉬 엔트리가 목적지 IP주소를 위해서 발견되지 않으면 uip_buf[]에 패킷은 IP address를 위한 ARP 요청 패킷에 의해서 교체된다. IP 패킷은 드랍되고 결국은 더 상위 레벨의 프로토콜( TCP와 같은)에서 드랍된 패킷을 재전송 할 것이다.


If the destination IP address is not on the local network, the IP address of the default router is used instead.

만약 목적지 IP 주소가 로컬 네트워크에 있지 않으면 기본 라우터의 IP 주소가 대신 사용된다.


When the function returns, a packet is present in the uip_buf[] buffer, and the length of the packet is in the global variable uip_len.

함수가 리턴될때 패킷은 uip_buf[] 버퍼에 존재하고 패킷의 길이는 전역 변수 uip_len에 존재한다.

void uip_arp_timer (  void   ) 
 

Periodic ARP processing function.

주기적인 ARP 처리 함수


This function performs periodic timer processing in the ARP module and should be called at regular intervals. The recommended interval is 10 seconds between the calls.

이 함수는 ARP 모듈의 주기적인 타이머 프로세싱을 수행하고 정기적인 간격에 의해서 호출되어야 한다. 호출되는 시간의 권장 간격은 10초이다.


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