![leitner](/assets/img/avatar_default.png)
also add compat formatting routines that will output v4-mapped addresses as ipv4 addresses
14 lines
212 B
C
14 lines
212 B
C
#include "fmt.h"
|
|
#include "byte.h"
|
|
#include "ip4.h"
|
|
#include "ip6.h"
|
|
|
|
unsigned int fmt_ip6c(char *s,const char ip[16])
|
|
{
|
|
if (ip6_isv4mapped(ip))
|
|
return fmt_ip4(s,ip+12);
|
|
else
|
|
return fmt_ip6(s,ip);
|
|
}
|
|
|