Ninet_addr
Description
µµÆ® ¹æ½ÄÀÇ ¹®ÀÚ¿·Î Ç¥ÇöµÇ¾î ÀÖ´Â ÀÎÅÍ³Ý ÁÖ¼Ò¸¦ ³»ºÎ ÀÎÅÍ³Ý ÁÖ¼ÒÀÇ °ªÀ¸·Î ¹Ù²ã¼ ¹ÝȯÇÑ´Ù.
Syntax
U32 Ninet_addr(S8 *dotted)
Parameters
dotted µµÆ® ¹æ½ÄÀÇ ¹®ÀÚ¿·Î Ç¥ÇöµÇ¾î ÀÖ´Â ÀÎÅÍ³Ý ÁÖ¼Ò
Returns
-1 | ¿¡·¯ |
internet address | º¯È¯µÈ ÀÎÅÍ³Ý ÁÖ¼Ò |
Comments
ÀÎÅÍ³Ý ÁÖ¼Ò´Â ÀϹÝÀûÀ¸·Î NgethostbynameNgethostbyname_r() ÇÔ¼ö¸¦ ÀÌ¿ëÇÏ¿© ±¸ÇÒ ¼ö ÀÖ´Ù.
See Also
Ngethostbyname, Ngethostbyname_r
Example
struct sockaddr_in socka;
...
socka.sin_addr.s_addr = Ninet_addr("210.124.240.11");
socka.sin_port = Nhtons(1100);
rc = Nconnect(s, (struct sockaddr *)&socka, sizeof(socka));
if ( rc < 0 )
/* process error */