ReactOS
0.4.16-dev-981-g80eb313
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Variables
_
c
d
e
f
g
h
i
l
m
n
o
p
s
t
u
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
_
a
b
c
d
f
i
l
m
o
p
s
t
w
x
Enumerator
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
x
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
iputils.c
Go to the documentation of this file.
1
#include <
headers.h
>
2
#include <
datatypes.h
>
3
#include <options.h>
4
#include <
utils.h
>
5
6
int
split_ip
(
char
*
text
,
u8b
*
dest
,
int
place
)
7
{
8
int
dotcount;
9
10
/* Don't touch this, unless you like pointer aritmethic */
11
12
*
dest
= 0;
13
14
if
( !
text
)
15
return
-1;
16
17
for
( dotcount = 0; (dotcount <
place
) && (
text
);
text
++ )
18
if
( *
text
==
'.'
)
19
dotcount++;
20
21
if
( !
text
)
22
return
-2;
23
24
while
(( *
text
!=
'.'
) && ( *
text
!=
'\0'
))
25
{
26
*
dest
*= 10;
27
*
dest
+= (
u8b
)(*
text
-48);
28
/* 48 is not a hack, is just the code of 0 */
29
text
++;
30
}
31
32
return
0;
33
}
34
35
int
get_ip
(
char
*
text
,
u32b
*
dest
)
36
{
37
/* Don't touch this, unless you like pointer aritmethic */
38
39
*
dest
= 0;
40
41
if
( !
text
)
42
return
-1;
43
44
while
( *
text
!=
'\0'
)
45
{
46
if
( *
text
==
'.'
)
47
{
48
*
dest
= *
dest
<< 8;
49
text
++;
50
continue
;
51
}
52
*
dest
*= 10;
53
*
dest
+= (
u8b
)(*
text
-48);
54
/* 48 is not a hack, is just the code of 0 */
55
text
++;
56
}
57
58
return
0;
59
}
datatypes.h
u32b
unsigned int u32b
Definition:
datatypes.h:6
u8b
unsigned char u8b
Definition:
datatypes.h:4
text
const WCHAR * text
Definition:
package.c:1794
headers.h
get_ip
int get_ip(char *text, u32b *dest)
Definition:
iputils.c:35
split_ip
int split_ip(char *text, u8b *dest, int place)
Definition:
iputils.c:6
dest
static char * dest
Definition:
rtl.c:135
place
static char * place
Definition:
getopt.c:55
utils.h
modules
rosapps
applications
net
dhcpd
src
utils
iputils.c
Generated on Wed Apr 16 2025 06:06:32 for ReactOS by
1.9.6