- *(uint32_t *)(ip.pckt + 12) = data->srcAddr;
- *(uint32_t *)(ip.pckt + 16) = data->dstAddr;
- *(uint16_t *)(ip.pckt + 20) = data->srcPort;
- *(uint16_t *)(ip.pckt + 22) = data->dstPort;*/
- ip.header.ipHeader.ip_v = 4;
- ip.header.ipHeader.ip_hl = 5;
- ip.header.ipHeader.ip_p = data->proto;
- ip.dataLen = ntohl(data->octets);
- ip.header.ipHeader.ip_src.s_addr = data->srcAddr;
- ip.header.ipHeader.ip_dst.s_addr = data->dstAddr;
- ip.header.sPort = data->srcPort;
- ip.header.dPort = data->dstPort;
+ ip.rawPacket.header.ipHeader.ip_src.s_addr = data->srcAddr;
+ ip.rawPacket.header.ipHeader.ip_dst.s_addr = data->dstAddr;
+ ip.rawPacket.header.sPort = data->srcPort;
+ ip.rawPacket.header.dPort = data->dstPort;