Changeset b86a32e in mainline for uspace/lib/c/generic/inet/addr.c


Ignore:
Timestamp:
2013-07-15T12:14:55Z (12 years ago)
Author:
Manuele Conti <conti.ma@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c84146d3
Parents:
87159eb8 (diff), 956d4281 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge with mainline changes.

File:
1 edited

Legend:

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

    r87159eb8 rb86a32e  
    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
     
    212217}
    213218
     219void inet_addr_naddr(const inet_addr_t *addr, uint8_t prefix,
     220    inet_naddr_t *naddr)
     221{
     222        naddr->family = addr->family;
     223        memcpy(naddr->addr6, addr->addr6, 16);
     224        naddr->prefix = prefix;
     225}
     226
    214227void inet_addr_any(inet_addr_t *addr)
    215228{
     
    234247                return (a->addr == b->addr);
    235248        case AF_INET6:
    236                 return memcmp(&a->addr6, &b->addr6, 16);
     249                return addr128_compare(a->addr6, b->addr6);
    237250        default:
    238251                return 0;
Note: See TracChangeset for help on using the changeset viewer.