-pub(crate) fn list_interfaces() -> Result<HashMap<IfIndex, Interface>, Error> {
- let addrs = getifaddrs().map_err(|_| Error::Internal)?;
+pub(crate) fn list_interfaces() -> Result<List, Error> {
+ let addrs = getifaddrs().map_err(|e| Error::Getifaddrs(e.to_string()))?;