void upmib_setMib(UPMIB_T * upmib_array,unsigned short index)
{
	char def=0;//default setting
	char i=0,j=0;
	char defBuffer[32]={0};
	char buffer[16]={0};
	char hwBuffer[16]={0};
	unsigned char valueTmp[UPMIB_VALUE_MAX]={0};
	apmib_save_wlanIdx();
	if(!strncmp(upmib_array[index].name,"DEF_",strlen("DEF_")))
		def=1;		
	for(i=0;i<NUM_WLAN_INTERFACE;i++)
	{
		sprintf(buffer,"WLAN%d_",i);
		sprintf(defBuffer,"DEF_WLAN%d_",i);
		sprintf(hwBuffer,"HW_WLAN%d_",i);
		if(!strncmp(upmib_array[index].name,buffer,strlen(buffer))
		 ||!strncmp(upmib_array[index].name,defBuffer,strlen(defBuffer))
		 ||!strncmp(upmib_array[index].name,hwBuffer,strlen(hwBuffer)))
		{
			wlan_idx=i;
#ifdef AEI_WECB
            vwlan_idx = 0;//default is for root ap
#endif
			for(j=0;j<NUM_VWLAN;j++)
			{
				sprintf(buffer,"WLAN%d_VAP%d_",i,j);
				sprintf(defBuffer,"DEF_WLAN%d_VAP%d_",i,j);
				if(!strncmp(upmib_array[index].name,buffer,strlen(buffer))
				 ||!strncmp(upmib_array[index].name,defBuffer,strlen(defBuffer)))
				{
					vwlan_idx=j+1;
					break;
				}
			}
		}		
	}

	strcpy(valueTmp,upmib_array[index].value);
	if(def)
		apmib_setDef(upmib_array[index].id,strToValue(valueTmp,upmib_array[index].type));
	else
		apmib_set(upmib_array[index].id,strToValue(valueTmp,upmib_array[index].type));
	apmib_recov_wlanIdx();	
}
Пример #2
0
void main(){
	double a = strToValue("13m");
	printf("%g", a);
}