/*(--找出SOCKET用的是哪一个IP(专门针对一个网卡上配置了多个ip的情况)--)*/
void getMacIpNetmask(char *resultbuf,char *aa,char *bb)
{
char macbuf[30]="";
char temp1[100]="";
char temp2[100]="";
getMatchValue(macbuf,aa,"mac");
while(strstr(aa,"ip")!=NULL)
{
aa=strstr(aa,"ip");
getMatchValue(temp1,aa,"ip");
if(strcmp(temp1,bb)==0)
{
getMatchValue(temp2,aa,"netmask");
strcat(resultbuf,"mac=");
strcat(resultbuf,macbuf);
strcat(resultbuf,",");
strcat(resultbuf,"ip=");
strcat(resultbuf,temp1);
strcat(resultbuf,",");
strcat(resultbuf,"netmask=");
strcat(resultbuf,temp2);
break;
}
aa=strstr(aa,"netmask");
memset(temp1,0,100);
memset(temp2,0,100);
}
}