5 size_t strlcpy(char *d
, const char *s
, size_t bufsize
)
7 size_t len
= strlen(s
);
18 // not really random :(
19 u_int32_t
arc4random()
21 static int did_srand
= 0;
29 ret
= rand() << 10 ^ rand();
34 int inet_aton(const char *cp
, struct in_addr
*inp
)
35 /* inet_addr code from ROS, slightly modified. */
37 ULONG Octets
[4] = {0,0,0,0};
54 if(c
< '0' || c
> '9')
58 Octets
[i
] += (c
- '0');
64 inp
->S_un
.S_addr
= (Octets
[3] << 24) + (Octets
[2] << 16) + (Octets
[1] << 8) + Octets
[0];