当前位置: 首页>>代码示例>>C++>>正文


C++ CM_CBK_DEBUG_PRINT函数代码示例

本文整理汇总了C++中CM_CBK_DEBUG_PRINT函数的典型用法代码示例。如果您正苦于以下问题:C++ CM_CBK_DEBUG_PRINT函数的具体用法?C++ CM_CBK_DEBUG_PRINT怎么用?C++ CM_CBK_DEBUG_PRINT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了CM_CBK_DEBUG_PRINT函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: crm_port_attribute_getexactrec

int32_t crm_port_attribute_getexactrec (struct cm_array_of_iv_pairs * keys_arr_p,
    struct cm_array_of_iv_pairs ** pIvPairArr)

{
  struct   cm_array_of_iv_pairs *result_iv_pairs_p = NULL;
  int32_t  return_value = OF_FAILURE;
  struct   crm_attribute_name_value_pair crm_attribute_name_value_info={};
  char     port_name[CRM_MAX_VM_NAME_LEN+1]={};
  uint64_t port_handle;

  CM_CBK_DEBUG_PRINT ("Entered");

  of_memset(port_name, 0, sizeof(port_name));
  result_iv_pairs_p =
                     (struct cm_array_of_iv_pairs *) of_calloc (1, sizeof (struct cm_array_of_iv_pairs));
  if (result_iv_pairs_p == NULL)
   {
     CM_CBK_DEBUG_PRINT ("Failed to allocate memory for result_iv_pairs_p");
     return OF_FAILURE;
   }

  of_memset (&crm_attribute_name_value_info, 0, sizeof (struct crm_attribute_name_value_pair));

  if ((crm_port_attribute_ucm_setmandparams (keys_arr_p,port_name, &crm_attribute_name_value_info, 
	      NULL)) != OF_SUCCESS)
   {
     CM_CBK_DEBUG_PRINT ("Set Mandatory Parameters Failed");
     return OF_FAILURE;
   }
   return_value = crm_get_port_handle(port_name, &port_handle);
   if (return_value != OF_SUCCESS)
    {
      CM_CBK_DEBUG_PRINT ("port does not exist with name %s",port_name);
      return OF_FAILURE;
    }

  return_value = crm_get_port_exact_attribute(port_name, crm_attribute_name_value_info.name_string);
    if (return_value != OF_SUCCESS)
     {
       CM_CBK_DEBUG_PRINT ("Unable to find  exact attribute record!");
       return OF_FAILURE;
     }

  crm_attribute_port_getparams (&crm_attribute_name_value_info, result_iv_pairs_p);
  *pIvPairArr = result_iv_pairs_p;
  return return_value;
}
开发者ID:hritham,项目名称:Freescale-OpenFlow-Controller,代码行数:47,代码来源:portattrcbk.c

示例2: of_fw4_conntemplates_addrec

int32_t of_fw4_conntemplates_addrec (void * config_trans_p,
                        struct cm_array_of_iv_pairs * pMandParams,
                        struct cm_array_of_iv_pairs * pOptParams,
                        struct cm_app_result ** result_p)
{
  struct cm_app_result *result = NULL;
  int32_t               return_value = OF_FAILURE;
  struct fw4_conn_templates_config config_info={};
  uint64_t                    conn_template_handle;
  
  CM_CBK_DEBUG_PRINT ("Entered");
  
  if((of_fw4_conntemplates_setmandparams(
                               pMandParams, 
                               &config_info, 
                               &result)) != OF_SUCCESS)
  {
    CM_CBK_DEBUG_PRINT("Set Mandatory Parameters Failed");
    fill_app_result_struct(&result, NULL, CM_GLU_SET_MAND_PARAM_FAILED);
    *result_p = result;
    return OF_FAILURE;
  }

  if((of_fw4_conntemplates_setoptparams(
                               pOptParams, 
                               &config_info, 
                               &result)) != OF_SUCCESS)
  {
    CM_CBK_DEBUG_PRINT("Set Optional Parameters Failed");
    fill_app_result_struct(&result, NULL, CM_GLU_SET_OPT_PARAM_FAILED);
    *result_p = result;
    return OF_FAILURE;
  }

  return_value = fw4_add_conn_templates(
                                  &config_info,  
                                  &conn_template_handle);
  if (return_value != OF_SUCCESS)
  {
    CM_CBK_DEBUG_PRINT ("connection template  add record Failed");
    fill_app_result_struct (&result, NULL, CM_GLU_CONN_TEMPLATE_ADD_FAILED);
    *result_p = result;
    return OF_FAILURE;
  }
  CM_CBK_DEBUG_PRINT ("connection template record added successfully");
  return OF_SUCCESS;
}
开发者ID:Open-SFC,项目名称:ondir-platform,代码行数:47,代码来源:conntemplatescbk.c

示例3: UCMDP_DelRecord

int32_t UCMDP_DelRecord(uint32_t uiAppId,void * config_trans_p,
			struct cm_array_of_iv_pairs * keys_arr_p,
			struct cm_app_result ** result_p)
{
	 char *pTempBuf;;
	 int32_t iTotalLen=0,return_value;
	 uint32_t uiLen=0;
	 struct cm_app_result *app_result_p=NULL;
	 ucmcommmsg_t CommMsg={};

	 pTempBuf=CommMsg.cntlreqmsg.msg;
	 CM_CBK_DEBUG_PRINT(" Entry uiAppId=%d",uiAppId);


#if defined(_LP64)
	 pTempBuf= of_mbuf_put_64(pTempBuf, (unsigned long)config_trans_p);
#else
	 pTempBuf= of_mbuf_put_32(pTempBuf, (uint32_t) config_trans_p);
#endif
	 iTotalLen+=sizeof(long);
	 if(cm_je_copy_ivpair_arr_to_buffer(keys_arr_p,pTempBuf,&uiLen)!=OF_SUCCESS)
	 {
			CM_CBK_DEBUG_PRINT("cm_je_copy_ivpair_arr_to_buffer Failed");
			return OF_FAILURE;
	 }
	 pTempBuf+=uiLen;
	 iTotalLen+=uiLen;

	 app_result_p = (struct cm_app_result *)of_calloc(1,sizeof(struct cm_app_result));
	 if(!app_result_p)
	 {
			CM_CBK_DEBUG_PRINT("memory allocation failed");
			return OF_FAILURE;
	 }  

	 CM_CNTRL_PREPARE_CNTRL_CFG_REQUEST(CommMsg.cntlreqmsg, uiAppId, 0, CM_CPDP_APPL_DEL_CMD, sizeof(long), iTotalLen);
	 return_value=UCMCntrlCommHandler(&CommMsg,app_result_p);

	 if(return_value == OF_SUCCESS)
	 {
			of_free(app_result_p);
			return OF_SUCCESS;
	 }

	 *result_p = app_result_p;
	 return return_value;
}
开发者ID:Open-SFC,项目名称:ondir-platform,代码行数:47,代码来源:dpcbk.c

示例4: crm_port_attribute_setrec

int32_t crm_port_attribute_setrec (void * config_trans_p,
		  		     struct cm_array_of_iv_pairs * pMandParams,
			             struct cm_array_of_iv_pairs * pOptParams,
			             struct cm_app_result ** result_p)
{
  struct   cm_app_result *attribute_result = NULL;
  struct   crm_attribute_name_value_pair crm_attribute_name_value_info={};
  char port_name[CRM_MAX_VM_NAME_LEN+1];

  uint64_t port_handle;
  int32_t  return_value = OF_FAILURE,result;

  CM_CBK_DEBUG_PRINT ("Entered");

  of_memset (&crm_attribute_name_value_info, 0, sizeof (struct crm_attribute_name_value_pair));

  of_memset(port_name, 0, sizeof(port_name));
  if ((crm_port_attribute_ucm_setmandparams (pMandParams, 
	      port_name, &crm_attribute_name_value_info, 
	      &attribute_result)) != OF_SUCCESS)
  {
    CM_CBK_DEBUG_PRINT ("Set Mandatory Parameters Failed");
    fill_app_result_struct (&attribute_result, NULL, CM_GLU_SET_MAND_PARAM_FAILED);
    *result_p = attribute_result;
    return OF_FAILURE;
  }

  return_value = crm_get_port_handle(port_name, &port_handle);
  if (return_value != OF_SUCCESS)
  {
    CM_CBK_DEBUG_PRINT ("port does not exist with name %s",port_name);
    fill_app_result_struct (&attribute_result, NULL, CM_GLU_VM_NAME_NULL);
    *result_p = attribute_result;
    return OF_FAILURE;
  }
  return_value = crm_add_attribute_to_port(port_name, &crm_attribute_name_value_info);
  if (return_value != OF_SUCCESS)
  {
    CM_CBK_DEBUG_PRINT ("Attribute modification failed");
    fill_app_result_struct (&attribute_result, NULL, CM_GLU_ATTRIBUTE_ADD_FAILED);
    *result_p = attribute_result;
    return OF_FAILURE;
  }
  CM_CBK_DEBUG_PRINT ("Attribute modifed succesfully");
  return OF_SUCCESS;

}
开发者ID:hritham,项目名称:Freescale-OpenFlow-Controller,代码行数:47,代码来源:portattrcbk.c

示例5: dprm_datapath_get_first_asyncmsgcfg

int32_t dprm_datapath_get_first_asyncmsgcfg (struct cm_array_of_iv_pairs * key_iv_pairs_p,
    struct cm_array_of_iv_pairs ** result_iv_pairs_pp)
{
  int32_t return_value = OF_FAILURE;

  CM_CBK_DEBUG_PRINT ("Entered");
  return return_value;
}
开发者ID:Open-SFC,项目名称:ond-of-driver,代码行数:8,代码来源:asyncmsgcfgcbk.c

示例6: nsrm_appliance_init

int32_t nsrm_appliance_init (void)
{
  CM_CBK_DEBUG_PRINT ("Entry");
  if (cm_register_app_callbacks (CM_ON_DIRECTOR_NSRM_SERVICE_APPL_ID, &nsrm_appliance_callbacks) != OF_SUCCESS)
    return OF_FAILURE;

  return OF_SUCCESS;
}
开发者ID:Open-SFC,项目名称:ond-of-driver,代码行数:8,代码来源:appliancecbk.c

示例7: nsrm_bypassrule_verifycfg

int32_t nsrm_bypassrule_verifycfg (struct cm_array_of_iv_pairs *key_iv_pairs_p,
                        uint32_t command_id, struct cm_app_result ** result_p)
{
  struct cm_app_result *of_bypassrule_result = NULL;
  int32_t return_value = OF_FAILURE;

  CM_CBK_DEBUG_PRINT ("Entered");
  return_value = nsrm_bypassrule_ucm_validatemandparams(key_iv_pairs_p, &of_bypassrule_result);
  if (return_value != OF_SUCCESS)
  {
    CM_CBK_DEBUG_PRINT ("Validate Mandatory Parameters Failed");
    return OF_FAILURE;
  }
  *result_p = of_bypassrule_result;
  return OF_SUCCESS;

}
开发者ID:Open-SFC,项目名称:ond-of-driver,代码行数:17,代码来源:bypassrule.c

示例8: of_action_verifycfg

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Function Name:
 * Description:
 * Input:
 * Output:
 * Result:
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
int32_t of_action_verifycfg (struct cm_array_of_iv_pairs * key_iv_pairs,
		uint32_t command_id, struct cm_app_result ** result_pp)
{
	struct cm_app_result *of_action_result = NULL;
	int32_t return_value = OF_FAILURE;

	CM_CBK_DEBUG_PRINT ("Entered");

	return_value = of_action_ucm_validate_mand_params (key_iv_pairs, &of_action_result);
	if (return_value != OF_SUCCESS)
	{
		CM_CBK_DEBUG_PRINT ("Validate Mandatory Parameters Failed");
	        *result_pp = of_action_result;
		return OF_FAILURE;
	}
	return OF_SUCCESS;
}
开发者ID:Open-SFC,项目名称:ondir-platform,代码行数:24,代码来源:actioncbk.c

示例9: crm_nwport_attribute_verifycfg

int32_t crm_nwport_attribute_verifycfg (struct cm_array_of_iv_pairs * keys_arr_p,
			uint32_t command_id, struct cm_app_result ** result_p)
{
  struct cm_app_result *attribute_result = NULL;
  int32_t return_value = OF_FAILURE;

  CM_CBK_DEBUG_PRINT ("Entered");

  return_value = crm_nwport_attribute_ucm_validatemandparams (keys_arr_p, &attribute_result);
  if (return_value != OF_SUCCESS)
  {
    CM_CBK_DEBUG_PRINT ("Validate Mandatory Parameters Failed");
    return OF_FAILURE;
  }
  *result_p = attribute_result;
  return OF_SUCCESS;
}
开发者ID:Open-SFC,项目名称:ond-of-driver,代码行数:17,代码来源:nwportattrcbk.c

示例10: nsrm_bypassrule_init

int32_t nsrm_bypassrule_init (void)
{
  CM_CBK_DEBUG_PRINT ("Entry");
  if (cm_register_app_callbacks (CM_ON_DIRECTOR_NSRM_CHAIN_BYPASSRULE_APPL_ID, &nsrm_bypassrule_callbacks) != OF_SUCCESS)
    return OF_FAILURE;

  return OF_SUCCESS;
}
开发者ID:Open-SFC,项目名称:ond-of-driver,代码行数:8,代码来源:bypassrule.c

示例11: nsrm_selection_rule_attribute_appl_ucmcbk_init

int32_t nsrm_selection_rule_attribute_appl_ucmcbk_init (void)
{
    CM_CBK_DEBUG_PRINT ("Entry");
    if(cm_register_app_callbacks (CM_ON_DIRECTOR_NSRM_CHAINSET_CHAINSELRULE_CHAINSELECTIONATTRIBUTE_APPL_ID, &nsrm_selection_rule_attribute_ucm_callbacks) != OF_SUCCESS)
        return OF_FAILURE;

    return OF_SUCCESS;
}
开发者ID:Open-SFC,项目名称:ondir-platform,代码行数:8,代码来源:sruleattrcbk.c

示例12: of_bindstats_getexactrec

int32_t of_bindstats_getexactrec (struct cm_array_of_iv_pairs * pKeysArr,
    struct cm_array_of_iv_pairs ** pIvPairArr)
{

  CM_CBK_DEBUG_PRINT ("Entered");
  return OF_FAILURE;

}
开发者ID:Open-SFC,项目名称:ondir-platform,代码行数:8,代码来源:bindstats.c

示例13: of_flow_actionset_setrec

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Function Name:
 * Description:
 * Input:
 * Output:
 * Result:
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
int32_t of_flow_actionset_setrec (void * config_trans_p,
		struct cm_array_of_iv_pairs * mand_iv_pairs,
		struct cm_array_of_iv_pairs * opt_iv_pairs,
		struct cm_app_result ** result_pp)
{
	struct cm_app_result *of_flow_actionset_result = NULL;
	int32_t return_value = OF_SUCCESS;
	struct flow_trans *trans_rec=config_trans_p;
  struct ofi_flow_action flow_action_info = {};
  struct ofi_flow_mod_info flow_info = {};


	CM_CBK_DEBUG_PRINT ("Entered");
  if(of_flow_actionset_ucm_setmandparams(mand_iv_pairs, NULL, &flow_info, 
                                         &flow_action_info, 
                                         &of_flow_actionset_result) != OF_SUCCESS)
  {
    CM_CBK_DEBUG_PRINT ("Set Mandatory Parameters Failed");
    *result_pp=of_flow_actionset_result;
    return OF_FAILURE;
  }

  return_value = of_flow_actionset_ucm_setoptparams(opt_iv_pairs, 
                                                    &flow_action_info, 
                                                    &of_flow_actionset_result);
  if (return_value != OF_SUCCESS)
  {
     CM_CBK_DEBUG_PRINT ("Error: flow does not exist with flow id %d",flow_info.flow_id);
     fill_app_result_struct (&of_flow_actionset_result, NULL, CM_GLU_VLAN_FAILED);
     *result_pp =of_flow_actionset_result;
     return OF_FAILURE;
  }

  return_value = of_flow_update_actionset(trans_rec->datapath_handle,
                                          flow_info.flow_id,
                                          &flow_action_info); 
  if (return_value != OF_SUCCESS)
  {
     CM_CBK_DEBUG_PRINT ("Error: failed to update inst in flow table id=%d",flow_info.flow_id);
     fill_app_result_struct(&of_flow_actionset_result, NULL, CM_GLU_VLAN_FAILED);
     *result_pp =of_flow_actionset_result;
     return OF_FAILURE;
  }

  return return_value;
}
开发者ID:Open-SFC,项目名称:ondir-platform,代码行数:53,代码来源:flowactioncbk.c

示例14: of_flow_setrec

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Function Name:
 * Description:
 * Input:
 * Output:
 * Result:
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
int32_t of_flow_setrec (void * config_trans_p,
		struct cm_array_of_iv_pairs * mand_iv_pairs,
		struct cm_array_of_iv_pairs * opt_iv_pairs,
		struct cm_app_result ** result_pp)
{
	struct cm_app_result *flow_result = NULL;
	int32_t return_value = OF_FAILURE;
	struct ofi_flow_mod_info flow_info = { };
	struct dprm_datapath_general_info datapath_info={};
	uint64_t datapath_handle;

	CM_CBK_DEBUG_PRINT ("Entered");
   	return OF_SUCCESS;
	memset (&flow_info, 0, sizeof (struct ofi_flow_mod_info));

	if ((of_flow_ucm_setmandparams (mand_iv_pairs,&datapath_info, &flow_info, &flow_result)) !=
			OF_SUCCESS)
	{
		CM_CBK_DEBUG_PRINT ("Set Mandatory Parameters Failed");
		*result_pp=flow_result;
		return OF_FAILURE;
	}

	return_value=dprm_get_datapath_handle(datapath_info.dpid, &datapath_handle);
	if (return_value != OF_SUCCESS)
	{
		CM_CBK_DEBUG_PRINT ("Datapath does not exist with id %llx",datapath_info.dpid);
		fill_app_result_struct (&flow_result, NULL, CM_GLU_GROUP_DATAPATH_DOESNOT_EXIST);
		*result_pp = flow_result;
		return OF_FAILURE;
	}

    #if 0 //need to check with atmaram
	return_value = of_group_unregister_buckets(datapath_handle, flow_info.flow_id);
	if (return_value != OF_SUCCESS)
	{
		CM_CBK_DEBUG_PRINT ("Flow does not exist with name %d",flow_info.flow_id);
		fill_app_result_struct (&flow_result, NULL, CM_GLU_FLOW_DOESNOT_EXIST);
		*result_pp =flow_result;
		return OF_FAILURE;
	}
    #endif


	return OF_SUCCESS;
}
开发者ID:Open-SFC,项目名称:ondir-platform,代码行数:53,代码来源:flowmodcbk.c

示例15: of_action_getnextnrecs

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Function Name:
 * Description:
 * Input:
 * Output:
 * Result:
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
int32_t of_action_getnextnrecs (struct cm_array_of_iv_pairs * key_iv_pairs,
		struct cm_array_of_iv_pairs *pPrevRecordKey, uint32_t * pCount,
		struct cm_array_of_iv_pairs ** pNextNRecordData_p)
{
	CM_CBK_DEBUG_PRINT ("no next records");
	*pCount=0;
	return OF_FAILURE;
}
开发者ID:Open-SFC,项目名称:ondir-platform,代码行数:15,代码来源:actioncbk.c


注:本文中的CM_CBK_DEBUG_PRINT函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。