A
aki
i am receiving a packet from network and it contains many fields ,
starting from code, idetifier
...., i want to read the code field which is of size 1 byte.
checking the code value i need to go ahed of my logic...
i am receving packet in buffer variable like.
function(*buffer)
{
char*p =(ntohs)buffer;// changin bufferfrom network byte order to
host order
switch(*p) // will it decode to some integer value...if not then how
can i do it...
case 1:
--
break;
case 2:
---
--
}
can i do type conversion..?
any comments are welcome...
thanks
akhi
starting from code, idetifier
...., i want to read the code field which is of size 1 byte.
checking the code value i need to go ahed of my logic...
i am receving packet in buffer variable like.
function(*buffer)
{
char*p =(ntohs)buffer;// changin bufferfrom network byte order to
host order
switch(*p) // will it decode to some integer value...if not then how
can i do it...
case 1:
--
break;
case 2:
---
--
}
can i do type conversion..?
any comments are welcome...
thanks
akhi