Code:
while (readIP()) {
printf("IP: %s -> ",ip);
if (strstr(ip,"10.99.137.42")!=NULL) strcpy(ip,"APLIC_2_4_05"); // Prosa
else if (strstr,(ip,"10.99.138.25")!=NULL) strcpy(ip,"APLIC_3_13"); // SICOSS
else if (strstr,(ip,"10.99.138.28")!=NULL) strcpy(ip,"APLIC_3_13"); // SICOSS
else if (strstr,(ip,"10.99.138.3")!=NULL) strcpy(ip,"APLIC_3_13"); // SICOSS
else if (strstr,(ip,"10.99.178.6")!=NULL) strcpy(ip,"APLIC_3_18"); // PLANIFICADOR
else if (strstr,(ip,"10.99.178.7")!=NULL) strcpy(ip,"APLIC_3_18"); // PLANIFICADOR
else if (strstr,(ip,"10.99.1.189")!=NULL) strcpy(ip,"SOFTW_7_08"); // LOTUS NOTES
else if (strstr,(ip,"10.99.1.244")!=NULL) strcpy(ip,"SOFTW_7_08"); // LOTUS NOTES
else if (strstr,(ip,"10.99.145.11")!=NULL) strcpy(ip,"APLIC_3_15"); // CRM
else if (strstr,(ip,"10.99.145.21")!=NULL) strcpy(ip,"APLIC_3_15"); // CRM
else if (strstr,(ip,"10.99.1.203")!=NULL) strcpy(ip,"HARDW_7_05"); // SERVIDORES DE FICHERO E IMPRESION
else if (strstr,(ip,"10.99.177.146")!=NULL) strcpy(ip,"HARDW_7_11"); // COMUNICACIONES
else if (strstr,(ip,"10.99.138.7")!=NULL) strcpy(ip,"HARDW_5_05"); // HOST
else if (strstr,(ip,"10.99.138.75")!=NULL) strcpy(ip,"HARDW_5_05"); // HOST
else if (strstr,(ip,"10.99.147.44")!=NULL) strcpy(ip,"RED_7_09"); // RED
else if (strstr,(ip,"10.99.133.84")!=NULL) strcpy(ip,"BBDD_5_30"); // BBDD PROSA
else if (strstr,(ip,"10.99.30.230")!=NULL) strcpy(ip,"BBDD_5_18"); // BBDD REMESAS RED
else if (strstr,(ip,"10.99.186.2")!=NULL) strcpy(ip,"BBDD_5_16"); // BBDD Q+
else if (strstr,(ip,"10.99.147.36")!=NULL) strcpy(ip,"APLIC_2_4_04"); // PORTAL INTRANET
else if (strstr,(ip,"10.99.137.133")!=NULL) strcpy(ip,"APLIC_2_4_03"); // JACADA
else {printf("IP No reconocida -> %s\n",ip);continue;}
printf("%s\n",ip);
}
And I am getting this output: