컴퓨터

inet_addr

sayyesdoit 2019. 2. 26. 11:35


기능
Dotted-Decimal Notation을 (ex. 255.255.255.255) Big-Endian 32비트 값으로 (ex. 0x12345678) 변환해준다.


문법

unsigned long inet_addr(const char *string); 


매개변수
Dotted-Decimal Notation 문자열의 포인터


반환값
성공 시 Big_Endian 32비트 값, 오류 발생 시 INADDR_NONE