Changeset 671b546 in mainline


Ignore:
Timestamp:
2013-07-12T15:27:15Z (11 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f5f79cd
Parents:
08ed137
Message:

addr128_t comparison operator

Location:
uspace/lib/c
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/inet/addr.c

    r08ed137 r671b546  
    7070{
    7171        memcpy(dst, src, 16);
     72}
     73
     74int addr128_compare(const addr128_t a, const addr128_t b)
     75{
     76        return memcmp(a, b, 16);
    7277}
    7378
     
    234239                return (a->addr == b->addr);
    235240        case AF_INET6:
    236                 return memcmp(&a->addr6, &b->addr6, 16);
     241                return addr128_compare(a->addr6, b->addr6);
    237242        default:
    238243                return 0;
  • uspace/lib/c/include/inet/addr.h

    r08ed137 r671b546  
    7373extern void addr128(const addr128_t, addr128_t);
    7474
     75extern int addr128_compare(const addr128_t, const addr128_t);
     76
    7577extern void host2addr128_t_be(const addr128_t, addr128_t);
    7678extern void addr128_t_be2host(const addr128_t, addr128_t);
Note: See TracChangeset for help on using the changeset viewer.