mirror of
https://github.com/yarrick/iodine.git
synced 2025-04-07 11:07:03 +00:00
---
This commit is contained in:
parent
2c4a6491ee
commit
bcb9767130
1 changed files with 11 additions and 0 deletions
11
src/common.c
11
src/common.c
|
@ -367,7 +367,18 @@ void inet6_addr_add(struct in6_addr *addr, uint8_t amount) {
|
|||
}
|
||||
|
||||
char inet6_addr_equals(struct in6_addr *a, struct in6_addr *b) {
|
||||
printf("a: ");
|
||||
char i;
|
||||
for (i = 0; i < 8; ++i)
|
||||
printf("%04x%s", ntohs((*a).__in6_u.__u6_addr16[i]), i < 7 ? ":"
|
||||
: "\n");
|
||||
|
||||
printf("a: ");
|
||||
for (i = 0; i < 8; ++i)
|
||||
printf("%04x%s", ntohs((*b).__in6_u.__u6_addr16[i]), i < 7 ? ":"
|
||||
: "\n");
|
||||
|
||||
// char i;
|
||||
for (i = 4; i >= 0; --i)
|
||||
if(a->__in6_u.__u6_addr32[i] != b->__in6_u.__u6_addr32[i])
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue