17 stralloc addresstemp = {0};
19 char hexvalue[3] = {0, 0, 0};
26 if (
ip6_scan(addresstemp.s,ip6) == 0)
return 0;
30 for (i=0; i<16; i++) {
31 bytetohex((
unsigned char)ip6[i],hexvalue);
33 if (!((i+1)%2) && (i+1)<16)
int stralloc_cats(stralloc *, const char *)
void bytetohex(unsigned char decimal, char hex[3])
unsigned int ip6_scan(const char *src, char *ip)
int stralloc_catb(stralloc *, const char *, unsigned int)
int stralloc_copys(stralloc *, const char *)
unsigned int ip6_expandaddr(char *src, stralloc *destination)