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

int rtnl_addr_get_prefixlen ( struct rtnl_addr *  addr  ) 

Get prefix length of address object.

  • addr Address object.
    Returns:
    Prefix length or a negative number if not set.

Definition at line 851 of file addr.c.

{
      if (addr->a_mask & ADDR_ATTR_PREFIXLEN)
            return addr->a_prefixlen;
      else
            return -1;
}


Generated by  Doxygen 1.6.0   Back to index