2003-09-19 19:08:13 +00:00
|
|
|
#include "scan.h"
|
2001-11-25 23:50:09 +00:00
|
|
|
|
|
|
|
unsigned int scan_ip6_flat(const char *s,char ip[16])
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
for (i=0; i<16; i++) {
|
|
|
|
int tmp;
|
2003-09-19 19:08:13 +00:00
|
|
|
tmp=scan_fromhex(*s++);
|
2001-11-25 23:50:09 +00:00
|
|
|
if (tmp<0) return 0;
|
|
|
|
ip[i]=tmp << 4;
|
2003-09-19 19:08:13 +00:00
|
|
|
tmp=scan_fromhex(*s++);
|
2001-11-25 23:50:09 +00:00
|
|
|
if (tmp<0) return 0;
|
|
|
|
ip[i]+=tmp;
|
|
|
|
}
|
|
|
|
return 32;
|
|
|
|
}
|