Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat https://www.fefe.de/libowfat/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
327 B

#include "scan.h"
#include "ip4.h"
unsigned int scan_ip4(const char *s,char ip[4])
unsigned int len;
unsigned long u;
int i;
len = 0;
for (i=0; i<4; ++i) {
register unsigned int j;
if (!j) return 0;
ip[i]=u; s+=j;
if (*s!='.') return 0; ++s;
return len-1;