hwaddr_type


Description:


[ Version ( deprecated = true ) ]
public int hwaddr_type (int len)

Warning: hwaddr_type is deprecated.

Returns the type (either ARPHRD_ETHER or ARPHRD_INFINIBAND) of the raw address given its length.

Note:

This could not be extended to cover other types, since there is not a one-to-one mapping between types and lengths.

This was mostly only used to get a type to pass to hwaddr_ntoa or hwaddr_aton when you only had a length; but you can just use hwaddr_ntoa_len or hwaddr_aton_len now instead.

Parameters:

len

the length of hardware address in bytes

Returns:

the type, either ARPHRD_ETHER or ARPHRD_INFINIBAND. If the length is unexpected, return -1 (unsupported type/length).


Namespace: NM.Utils
Package: libnm-util