Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void build_packet(unsigned char *buf, unsigned short len)
- {
- unsigned int i;
- unsigned int sum;
- unsigned char tmp;
- unsigned char tmp1;
- unsigned char tmp2;
- unsigned char tmp3;
- unsigned char tmp4;
- unsigned char tmp5;
- unsigned char tmp6;
- unsigned char packet[64];
- sum = 0x0;
- i = 0x6;
- /* 38 is 32 + 6 we count 32 starting from 6 */
- while (i <= 38) {
- sum += buf[i];
- i += 1;
- }
- buf[0] = 0x12;
- buf[1] = 0xc5;
- buf[5] = 0x20;
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement