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