printf("HPS Server : read %d bytes from \t %s \n",nread,inet_ntoa(cli.sin_addr));
if (!nread)
exit(1);
if (VerifyData) {
/* Verify the first block of data for correctness outside the loop */
for (j=0; j< (NUMHPSBLOCKS*BUFCNT); j++)
for (k=0; k< HPSBLOCKSIZE; k++)
if (cp[j*HPSBLOCKSIZE+k] != CLI_CHAR + j + recv_data)
{
printf("*** ERROR Found in received data. Got %x Expected (%x) at BlockNumber:%d, Iteration:%d, Index in 4K block:%d\n",cp[j*HPSBLOCKSIZE+k], CLI_CHAR+j+i,j,i,k);
printf("HPS Server : read %d bytes from \t %s \n",nread, inet_ntoa(cli.sin_addr));
}
if (!nread)
break;
if (VerifyData) {
for (j=0; j< (NUMHPSBLOCKS*BUFCNT); j++)
for (k=0; k< HPSBLOCKSIZE; k++)
if (cp[j*HPSBLOCKSIZE+k] != CLI_CHAR + j + recv_data)
{
printf("*** ERROR Found in received data. Got %x Expected (%x) at BlockNumber:%d, Iteration:%d, Index in 4K block:%d\n",cp[j*HPSBLOCKSIZE+k], CLI_CHAR+j+i,j,i,k);