Logo Search packages:      
Sourcecode: libnl version File versions  Download package

struct nl_addr* nl_addr_clone ( struct nl_addr *  addr  )  [read]

Clone existing abstract address object.

  • addr Abstract address object.
    Returns:
    Newly allocated abstract address object being a duplicate of the specified address object or NULL if a failure occured.

Definition at line 406 of file addr.c.

References nl_addr_build().

{
      struct nl_addr *new;

      new = nl_addr_build(addr->a_family, addr->a_addr, addr->a_len);
      if (new)
            new->a_prefixlen = addr->a_prefixlen;

      return new;
}


Generated by  Doxygen 1.6.0   Back to index