Y
yezi
HI :
The following code is
typedef struct nlpPkt
{
int source:4;
int destin:4;
unsigned int control:1;
unsigned int contype:5;
int length:10;
int checksum:16;
char nlpData[1500];
} NLPPKT; //same size
typedef struct tlpPkt
{
int sequence:7;
int ack:8;
int lenghth:10;
int blankbit:5;
int End:1;
char tlpData[1469];
} TLPPKT;
What I want to realize it to pack the whole TLPPKT into the NLPPKT
->nlpData [1500],
what confused me is the TLPPKT is a structure and includes different
type of variable.So how to put all these infor to just one char
*nlpData ?
Thanks for any comments.
bin YE
The following code is
typedef struct nlpPkt
{
int source:4;
int destin:4;
unsigned int control:1;
unsigned int contype:5;
int length:10;
int checksum:16;
char nlpData[1500];
} NLPPKT; //same size
typedef struct tlpPkt
{
int sequence:7;
int ack:8;
int lenghth:10;
int blankbit:5;
int End:1;
char tlpData[1469];
} TLPPKT;
What I want to realize it to pack the whole TLPPKT into the NLPPKT
->nlpData [1500],
what confused me is the TLPPKT is a structure and includes different
type of variable.So how to put all these infor to just one char
*nlpData ?
Thanks for any comments.
bin YE