From: Maxim Mamontov Date: Mon, 20 Dec 2010 12:15:02 +0000 (+0200) Subject: Виправлено помилки компіляції з новою структурою raw_ip_packet X-Git-Tag: 2.407-rc3~228 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/d52fc229670f4758390a46052250c11af263dab1 Виправлено помилки компіляції з новою структурою raw_ip_packet --- diff --git a/projects/stargazer/plugins/capture/cap_nf/cap_nf.cpp b/projects/stargazer/plugins/capture/cap_nf/cap_nf.cpp index 11a96ef1..4ef1ee8e 100644 --- a/projects/stargazer/plugins/capture/cap_nf/cap_nf.cpp +++ b/projects/stargazer/plugins/capture/cap_nf/cap_nf.cpp @@ -398,14 +398,14 @@ for (int i = 0; i < packets; ++i) *(uint32_t *)(ip.pckt + 16) = data->dstAddr; *(uint16_t *)(ip.pckt + 20) = data->srcPort; *(uint16_t *)(ip.pckt + 22) = data->dstPort;*/ - ip.ipHeader.ip_v = 4; - ip.ipHeader.ip_hl = 5; - ip.ipHeader.ip_p = data->proto; + 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.ipHeader.ip_src.s_addr = data->srcAddr; - ip.ipHeader.ip_dst.s_addr = data->dstAddr; - ip.sPort = data->srcPort; - ip.dPort = data->dstPort; + 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; traffCnt->Process(ip); }