+++ /dev/null
-#include "packet.h"
-
-unsigned short toShort(char * data) {
- return (((unsigned short) data[0]) << 8) | ((unsigned short) data[1]);
-}
-
-struct packet genPacket(char * data, int length) {
-
- struct packet pck;
- //(*((unsigned long*)&dns_server_ip[0]))
-
-
- pck.packetId = toShort(&data[0]);
- pck.packetLen = toShort(&data[2]);
-
-
-
- pck.data = 0;
-
- return pck;
-}
+++ /dev/null
-
-
-struct packet genPacket(char * data, int length);
-
-struct packet {
- unsigned short packetId;
- unsigned short packetLen;
- char myMac[6];
-
- char devMac[6];
-
- unsigned char * data;
-};