int pqos_l2ca_get(const unsigned l2id, const unsigned max_num_ca, unsigned *num_ca, struct pqos_l2ca *ca) { int ret; if (num_ca == NULL || ca == NULL || max_num_ca == 0) return PQOS_RETVAL_PARAM; _pqos_api_lock(); ret = _pqos_check_init(1); if (ret != PQOS_RETVAL_OK) { _pqos_api_unlock(); return ret; } if (m_interface == PQOS_INTER_MSR) ret = hw_l2ca_get(l2id, max_num_ca, num_ca, ca); else { #ifdef __linux__ ret = os_l2ca_get(l2id, max_num_ca, num_ca, ca); #else LOG_INFO("OS interface not supported!\n"); ret = PQOS_RETVAL_RESOURCE; #endif } _pqos_api_unlock(); return ret; }
int pqos_l2ca_get(const unsigned l2id, const unsigned max_num_ca, unsigned *num_ca, struct pqos_l2ca *ca) { int ret; _pqos_api_lock(); ret = _pqos_check_init(1); if (ret != PQOS_RETVAL_OK) { _pqos_api_unlock(); return ret; } ret = hw_l2ca_get(l2id, max_num_ca, num_ca, ca); _pqos_api_unlock(); return ret; }