I need to combine two bits in the same array so that I can display the TCP source and destination. With my code I pull in all the information from the packet and go to work on all of the individual parts.
Here is my TCP section
TCP_source = eth_buffer + 34;
TCP_dest = eth_buffer + 36;
for (i = 34; i < 36; i++)
{
TCP_source[i-34] = eth_buffer[i];
}
for (i = 36; i < 38; i++)
{
TCP_dest[i-36] = eth_buffer[i];
}
I can get the TCP source to work because on the example packet I have the two source bits are 00 and 50. I can get the port 80 to print out, but the destination bits are 98 and 63 and I need them to get together so I can print out port 39011 for the destination port. Any help would be greatly appreciated.