2001-02-05 21:55:25 +00:00
|
|
|
#include "ip6.h"
|
2001-11-24 20:11:41 +00:00
|
|
|
#include "haveinline.h"
|
2014-03-14 19:42:54 +00:00
|
|
|
#include "fmt.h"
|
2001-02-05 21:55:25 +00:00
|
|
|
|
2014-03-14 19:42:54 +00:00
|
|
|
size_t fmt_ip6_flat(char *s,const char ip[16])
|
2001-02-05 21:55:25 +00:00
|
|
|
{
|
|
|
|
int i;
|
|
|
|
if (!s) return 32;
|
|
|
|
for (i=0; i<16; i++) {
|
2014-03-14 19:42:54 +00:00
|
|
|
*s++=fmt_tohex((char)((unsigned char)ip[i] >> 4));
|
|
|
|
*s++=fmt_tohex((unsigned char)ip[i] & 15);
|
2001-02-05 21:55:25 +00:00
|
|
|
}
|
|
|
|
return 32;
|
|
|
|
}
|