I have a DataGramSocket and calls its receive method to get packets.
What I'm not clear yet (being new on this) is decoding the data.
I've read a bit on UDP, but what I want to know is whether, by using the .receive method it also captures the IP header and UDP header part.
I'm receiving signed bytes. Do I then perform two's complement on the negative numbers? I did this, and reading at all the bits I could not see even the source address. In my text setup, the source use the 192.168.0.x address. For 192, I would expect to see something like 11000000
Again, does the packet (when .receive is used) also capture the headers?
For example, the first byte I get is 00001000, which should correspong to IP version.
This doesn't seem to be correct, as I would think that in UDP it would be decimal 4 (for IPv4). Perhaps, I'm missing something here.
I don't know what all those bytes correspond to.
I'm sooo confused.
