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

uIP conversion functions
[The uIP TCP/IP stack]


Detailed Description

These functions can be used for converting between different data formats used by uIP.

이들 함수들은 uIP에의해 사용되는 서로 다른 데이터 포맷 사이의 변환을 위해 사용된다.



Defines

#define uip_ipaddr(addr, addr0, addr1, addr2, addr3)
 Pack an IP address into a 4-byte array which is used by uIP to represent IP addresses.
IP 주소를 uIP에 의해 사용되는 4-바이트 배열로 묶는다.

#define HTONS(n)
 Convert 16-bit quantity from host byte order to network byte order.
호스트 바이트 순서의 16-비트 데이터를 네트워크 바이트로 변환한다.


Functions

u16_t htons (u16_t val)
 Convert 16-bit quantity from host byte order to network byte order.
호스트 바이트 순서의 16-비트 데이터를 네트워크 바이트로 변환한다.


Define Documentation

#define HTONS (  n   ) 
 

Convert 16-bit quantity from host byte order to network byte order.

호스트 바이트 순서의 16-비트 데이터를 네트워크 바이트로 변환한다.


This macro is primarily used for converting constants from host byte order to network byte order. For converting variables to network byte order, use the htons() function instead.

이 매크로는 호스트 바이트 순서의 상수 데이터를 네트워크 바이트 순서로 변환하는데 사용된다. 변수를 네트워크 바이트 순서로 변환하려면 htons()함수를 사용해야 한다.

#define uip_ipaddr (  addr,
addr0,
addr1,
addr2,
addr3   ) 
 

Pack an IP address into a 4-byte array which is used by uIP to represent IP addresses.

IP 주소를 uIP에 의해 사용되는 4-바이트 배열로 묶는다.


Example:

 u16_t ipaddr[2];

 uip_ipaddr(&ipaddr, 192,168,1,2); 

Parameters:
addr A pointer to a 4-byte array that will be filled in with the IP addres.
IP주소로 채워질 4-바이트 배열 포인터.
addr0 The first octet of the IP address.
첫번째 IP 주소.
addr1 The second octet of the IP address.
두번째 IP 주소.
addr2 The third octet of the IP address.
세번째 IP 주소.
addr3 The forth octet of the IP address.
네번째 IP 주소.


Function Documentation

u16_t htons (  u16_t  val  ) 
 

Convert 16-bit quantity from host byte order to network byte order.

호스트 바이트 순서의 16-비트 데이터를 네트워크 바이트로 변환한다.


This function is primarily used for converting variables from host byte order to network byte order. For converting constants to network byte order, use the HTONS() macro instead.

이 함수는 호스트 바이트 순서의 변수 데이터를 네트워크 바이트 순서로 변환하는데 사용된다. 상수를 네트워크 바이트 순서로 변환하려면 HTONS() 매크로를 사용해야 한다.


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