25 for (seg=0 ; seg<4 ; seg++) {
27 for (nch=0 ; nch<4; nch++) {
29 if ( (ch==
NULLCH) || (ch ==
'.') ) {
39 if ( (ch<
'0') || (ch>
'9') ) {
43 val = 10*val + (ch-
'0');
49 ipaddr = (ipaddr << 8) | val;
55 if ( (seg != 3) || (ch !=
NULLCH) ) {
uint32 dot2ip(char *dotted, uint32 *result)
int int32
符号あり32ビット整数(int)
unsigned int uint32
符号なし32ビット整数(unsigned int)
#define NULLCH
NULL文字(NULL終端)