Right,
I am attempting to parse a DNS reply, an IPv6 one specifically. The ip is split up into its segments with two bytes used to represent each segment. I have a pointer to the data, currently an unsigned char *c. I have tried simply setting an int to equal the value at the pointer but only the first byte is taken into consideration. I have experimented with short ints but can't get a variable to equal the value of the first two bytes :(
To clarify. I have two bytes something like 00000001 00000010. I have a pointer pointing to the first byte. I want to make an int that would equal 258 in this case, but I can only make them equal 1 or 2.
Any help would be greatly appriciated.
E1