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  ) 
 

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