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

Architecture specific uIP functions
[The uIP TCP/IP stack]


Detailed Description

The functions in the architecture specific module implement the IP check sum and 32-bit additions.

아키텍쳐에 의존적인 모듈의 함수들은 IP 체크섬을 하고 32-bit를 추가한다.


The IP checksum calculation is the most computationally expensive operation in the TCP/IP stack and it therefore pays off to implement this in efficient assembler. The purpose of the uip-arch module is to let the checksum functions to be implemented in architecture specific assembler.

IP 체크섬 계산은 TCP/IP에서 대부분 비용이 많이 드는 연산이다. 그래서 어셈블러로 구현한다. uip-arch 모듈의 목적은 체크섬을 아키텍쳐 의존적인 어셈블러로 구현하는 것이다.



Files

file  uip_arch.h
 Declarations of architecture specific functions.
아키텍처 의존적인 함수 선언.


Functions

void uip_add32 (u8_t *op32, u16_t op16)
 Carry out a 32-bit addition.
32-bit 추가.

u16_t uip_chksum (u16_t *buf, u16_t len)
 Calculate the Internet checksum over a buffer.
인터넷 체크섬 계산.

u16_t uip_ipchksum (void)
 Calculate the IP header checksum of the packet header in uip_buf.
uip_buf에 있는 패킷 헤더의 IP헤더 체크섬 계산.

u16_t uip_tcpchksum (void)
 Calculate the TCP checksum of the packet in uip_buf and uip_appdata.
uip_buf와 uip_apdata에 있는 패킷의 TCP 체크섬 계산.


Variables

volatile u8_t uip_acc32 [4]
 4-byte array used for the 32-bit sequence number calculations.
32-비트 시퀀스 번호 계산을 위해 사용되는 4-바이트 배열.


Function Documentation

void uip_add32 (  u8_t *  op32,
u16_t  op16
) 
 

Carry out a 32-bit addition.

32-비트 추가.


Because not all architectures for which uIP is intended has native 32-bit arithmetic, uIP uses an external C function for doing the required 32-bit additions in the TCP protocol processing. This function should add the two arguments and place the result in the global variable uip_acc32.

uIP의 모든 아키텍처가 32-비트가 아니기 때문에, uIP는 TCP 프로토콜 처리에서 필요한 32-비트 추가를 하기 위해 확장 C함수를 사용한다. 이 함수는 두개의 인자를 추가하고 전역 변수인 uip_acc32에 결과를 저장한다.


Note:
The 32-bit integer pointed to by the op32 parameter and the result in the uip_acc32 variable are in network byte order (big endian).

Op32 파라메터와 uip_acc32변수 결과에 의해 포인팅되는 32-비트 정수는 네트워크 바이트 순서(big endian)이다.
Parameters:
op32 A pointer to a 4-byte array representing a 32-bit integer in network byte order (big endian).
네트워크 바이트 순서의 32-비트 정수를 나타내는 4-바이트 배열 포인터.
op16 A 16-bit integer in host byte order.
호스트 바이트 순서의 16-비트 정수.

u16_t uip_chksum (  u16_t *  buf,
u16_t  len
) 
 

Calculate the Internet checksum over a buffer.

인터넷 체크섬 계산.


The Internet checksum is the one's complement of the one's complement sum of all 16-bit words in the buffer.

See RFC1071.

RFC1071 참고.


Note:
This function is not called in the current version of uIP, but future versions might make use of it.

이 함수는 현재 uIP버전에서는 호출되지 않고 상위 버전에서 사용될 것이다.
Parameters:
buf A pointer to the buffer over which the checksum is to be computed.
체크섬이 계산될 버퍼 포인터.
len The length of the buffer over which the checksum is to be computed.
체크섬이 계산될 버퍼 길이.
Returns:
The Internet checksum of the buffer.
버퍼의 인터넷 체크섬.

u16_t uip_ipchksum (  void   ) 
 

Calculate the IP header checksum of the packet header in uip_buf.

uip_buf에 있는 패킷 헤더의 IP헤더 체크섬 계산.


The IP header checksum is the Internet checksum of the 20 bytes of the IP header.

IP 헤더 체크섬은 IP헤더의 20바이트 인터넷 체크섬이다.


Returns:
The IP header checksum of the IP header in the uip_buf buffer.
uip_buf에 있는 패킷 헤더의 IP헤더 체크섬.

u16_t uip_tcpchksum (  void   ) 
 

Calculate the TCP checksum of the packet in uip_buf and uip_appdata.

uip_buf와 uip_apdata에 있는 패킷의 TCP 체크섬 계산


The TCP checksum is the Internet checksum of data contents of the TCP segment, and a pseudo-header as defined in RFC793.

TCP 체크섬은 TCP세그먼트의 상수 데이터의 인터넷 체크섬이다.


Note:
The uip_appdata pointer that points to the packet data may point anywhere in memory, so it is not possible to simply calculate the Internet checksum of the contents of the uip_buf buffer.

패킷 데이터를 가리키는 uip_appdata 포인터는 메모리 어떤곳이든 가리킨다. 그래서 uip_buf 버퍼의 인터넷 체크섬을 간단히 계산하는 것은 가능하지 않다.
Returns:
The TCP checksum of the TCP segment in uip_buf and pointed to by uip_appdata.

uip_buf에 TCP세그먼트의 TCP체크섬.


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