Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef struct {
- int len;
- char payload[MSGSIZE];
- } msg;
- typedef struct {
- char crc;
- int type;
- int order;
- char buffer[MSGSIZE - 9];
- } pkt;
- am asa doua structuri.
- Cand trimit, practic, bag a 2-a structura in payload-ul msg-ului, ok?
- Acum, daca eu fac crc doar pe buffer-ul din pkt, practic, testele imi pot corupe type si/sau order si eu nu am cum
- sa stiu de asta, ceea ce e rau.
- Cum fac sa fac crc si pe ele? sau sa le protejez cumva?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement