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

struct nl_addr* nl_addr_alloc ( size_t  maxsize  )  [read]

Allocate new abstract address object.

  • maxsize Maximum size of the binary address.
    Returns:
    Newly allocated address object or NULL

Definition at line 164 of file addr.c.

Referenced by nl_addr_build(), and nl_addr_parse().

{
      struct nl_addr *addr;
      
      addr = calloc(1, sizeof(*addr) + maxsize);
      if (!addr)
            return NULL;

      addr->a_refcnt = 1;
      addr->a_maxsize = maxsize;

      return addr;
}


Generated by  Doxygen 1.6.0   Back to index