NetAliasEnum or Net32AliasEnum

The NetAliasEnum API returns information about all aliases of a given type.