From d52fc229670f4758390a46052250c11af263dab1 Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Mon, 20 Dec 2010 14:15:02 +0200 Subject: [PATCH] =?utf8?q?=D0=92=D0=B8=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5?= =?utf8?q?=D0=BD=D0=BE=20=D0=BF=D0=BE=D0=BC=D0=B8=D0=BB=D0=BA=D0=B8=20?= =?utf8?q?=D0=BA=D0=BE=D0=BC=D0=BF=D1=96=D0=BB=D1=8F=D1=86=D1=96=D1=97=20?= =?utf8?q?=D0=B7=20=D0=BD=D0=BE=D0=B2=D0=BE=D1=8E=20=D1=81=D1=82=D1=80?= =?utf8?q?=D1=83=D0=BA=D1=82=D1=83=D1=80=D0=BE=D1=8E=20raw=5Fip=5Fpacket?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../stargazer/plugins/capture/cap_nf/cap_nf.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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); } -- 2.44.2