Use this function with slapi_mod_get_first_value() to iterate through the attribute values in a Slapi_Mod.