아키텍쳐에 의존적인 모듈의 함수들은 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-바이트 배열. | |
|
||||||||||||
|
Carry out a 32-bit addition. 32-비트 추가.
uIP의 모든 아키텍처가 32-비트가 아니기 때문에, uIP는 TCP 프로토콜 처리에서 필요한 32-비트 추가를 하기 위해 확장 C함수를 사용한다. 이 함수는 두개의 인자를 추가하고 전역 변수인 uip_acc32에 결과를 저장한다.
|
|
||||||||||||
|
Calculate the Internet checksum over a buffer. 인터넷 체크섬 계산.
See RFC1071. RFC1071 참고.
|
|
|
Calculate the IP header checksum of the packet header in uip_buf. uip_buf에 있는 패킷 헤더의 IP헤더 체크섬 계산.
IP 헤더 체크섬은 IP헤더의 20바이트 인터넷 체크섬이다.
|
|
|
Calculate the TCP checksum of the packet in uip_buf and uip_appdata. uip_buf와 uip_apdata에 있는 패킷의 TCP 체크섬 계산
TCP 체크섬은 TCP세그먼트의 상수 데이터의 인터넷 체크섬이다.
|
1.3.3