<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: How to Code a Packet Sniffer in C with Winpcap	</title>
	<atom:link href="https://www.binarytides.com/code-packet-sniffer-c-winpcap/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.binarytides.com/code-packet-sniffer-c-winpcap/</link>
	<description>News, Technology, Entertainment and more</description>
	<lastBuildDate>Sat, 01 Aug 2020 06:23:53 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>
	<item>
		<title>
		By: hhhyejjin		</title>
		<link>https://www.binarytides.com/code-packet-sniffer-c-winpcap/comment-page-1/#comment-130262</link>

		<dc:creator><![CDATA[hhhyejjin]]></dc:creator>
		<pubDate>Tue, 12 Sep 2017 09:27:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1244#comment-130262</guid>

					<description><![CDATA[Hello, I read your post. It&#039;s very good.
I wonder how can I save that result as csv file using C.
Do you know that? :(]]></description>
			<content:encoded><![CDATA[<p>Hello, I read your post. It&#8217;s very good.<br />
I wonder how can I save that result as csv file using C.<br />
Do you know that? :(</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jerald		</title>
		<link>https://www.binarytides.com/code-packet-sniffer-c-winpcap/comment-page-1/#comment-75374</link>

		<dc:creator><![CDATA[Jerald]]></dc:creator>
		<pubDate>Thu, 28 Apr 2016 07:51:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1244#comment-75374</guid>

					<description><![CDATA[Hey! So i&#039;ve tried this could and was able to run it in the visual studio. The cmd popped out then the &quot;enter the number of interface you want to sniff&quot; came out. I pressed 1 as in the example. It is to be expected that the header will appear below however, it hasn&#039;t appeard after almost 20 mins and still calculating the tcp, udp etc. Is it normal? or something is already wrong? hope for your immediate response. thanks!]]></description>
			<content:encoded><![CDATA[<p>Hey! So i&#8217;ve tried this could and was able to run it in the visual studio. The cmd popped out then the &#8220;enter the number of interface you want to sniff&#8221; came out. I pressed 1 as in the example. It is to be expected that the header will appear below however, it hasn&#8217;t appeard after almost 20 mins and still calculating the tcp, udp etc. Is it normal? or something is already wrong? hope for your immediate response. thanks!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: E-moi		</title>
		<link>https://www.binarytides.com/code-packet-sniffer-c-winpcap/comment-page-1/#comment-67226</link>

		<dc:creator><![CDATA[E-moi]]></dc:creator>
		<pubDate>Sat, 19 Jul 2014 12:06:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1244#comment-67226</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/code-packet-sniffer-c-winpcap/comment-page-1/#comment-65778&quot;&gt;Hedi Naily&lt;/a&gt;.

There is no memory allocation going on. iphdr is declared as a pointer and with the line: (iphdr = (IPV4_HDR *)(Buffer + sizeof(ETHER_HDR)); the pointer simply points to the ip hdr part of the packet. In c you allocate memory with malloc/calloc and those need to be freed, but that is not the case in this sourcecode.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/code-packet-sniffer-c-winpcap/comment-page-1/#comment-65778">Hedi Naily</a>.</p>
<p>There is no memory allocation going on. iphdr is declared as a pointer and with the line: (iphdr = (IPV4_HDR *)(Buffer + sizeof(ETHER_HDR)); the pointer simply points to the ip hdr part of the packet. In c you allocate memory with malloc/calloc and those need to be freed, but that is not the case in this sourcecode.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: jkas83		</title>
		<link>https://www.binarytides.com/code-packet-sniffer-c-winpcap/comment-page-1/#comment-66053</link>

		<dc:creator><![CDATA[jkas83]]></dc:creator>
		<pubDate>Sat, 29 Mar 2014 21:44:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1244#comment-66053</guid>

					<description><![CDATA[Hello,

I did some changes to eleminate errors I got:

line 127: u_char -&#062; char
line 128: u_char *pkt_data -&#062; const u_char *pkt_data

This is also the way how it is shown in the winpcap-tutorial and the errors are gone.

But I can&#039;t eleminate an error in line 205 in the ProcessPacket-Function:

error: cannot convert &#039;const u_char *&#039; in &#039;u_char *&#039;

If I change &#039;u_char* Buffer&#039; in line 217 to &#039;const u_char* Buffer&#039;, the error isn&#039;t gone and I get a lot more errors. 

What can I do ???

Thanks in advance and excuse my english. I&#039;m not in training :-)]]></description>
			<content:encoded><![CDATA[<p>Hello,</p>
<p>I did some changes to eleminate errors I got:</p>
<p>line 127: u_char -&gt; char<br />
line 128: u_char *pkt_data -&gt; const u_char *pkt_data</p>
<p>This is also the way how it is shown in the winpcap-tutorial and the errors are gone.</p>
<p>But I can&#8217;t eleminate an error in line 205 in the ProcessPacket-Function:</p>
<p>error: cannot convert &#8216;const u_char *&#8217; in &#8216;u_char *&#8217;</p>
<p>If I change &#8216;u_char* Buffer&#8217; in line 217 to &#8216;const u_char* Buffer&#8217;, the error isn&#8217;t gone and I get a lot more errors. </p>
<p>What can I do ???</p>
<p>Thanks in advance and excuse my english. I&#8217;m not in training :-)</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Hedi Naily		</title>
		<link>https://www.binarytides.com/code-packet-sniffer-c-winpcap/comment-page-1/#comment-65778</link>

		<dc:creator><![CDATA[Hedi Naily]]></dc:creator>
		<pubDate>Thu, 24 Oct 2013 10:06:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1244#comment-65778</guid>

					<description><![CDATA[You&#039;re allocating memory from heap (in functions) and you&#039;re nt freeing it, that&#039;s hy memory consumption is increasing as long as the app is running. for example everytime PrintIcmpPacket function is called, you&#039;re allocationg new memory block for the ipdr variable without freeng the one you&#039;ve allocated in the previous call to the function. (iphdr = (IPV4_HDR *)(Buffer + sizeof(ETHER_HDR));) I suggest to you to free the allocated memory at the end of each function in which you used pointers.]]></description>
			<content:encoded><![CDATA[<p>You&#8217;re allocating memory from heap (in functions) and you&#8217;re nt freeing it, that&#8217;s hy memory consumption is increasing as long as the app is running. for example everytime PrintIcmpPacket function is called, you&#8217;re allocationg new memory block for the ipdr variable without freeng the one you&#8217;ve allocated in the previous call to the function. (iphdr = (IPV4_HDR *)(Buffer + sizeof(ETHER_HDR));) I suggest to you to free the allocated memory at the end of each function in which you used pointers.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Hedi Naily		</title>
		<link>https://www.binarytides.com/code-packet-sniffer-c-winpcap/comment-page-1/#comment-65773</link>

		<dc:creator><![CDATA[Hedi Naily]]></dc:creator>
		<pubDate>Wed, 23 Oct 2013 08:24:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1244#comment-65773</guid>

					<description><![CDATA[Your code consumps too much memory and it keeps increasing]]></description>
			<content:encoded><![CDATA[<p>Your code consumps too much memory and it keeps increasing</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Hedi Naily		</title>
		<link>https://www.binarytides.com/code-packet-sniffer-c-winpcap/comment-page-1/#comment-65743</link>

		<dc:creator><![CDATA[Hedi Naily]]></dc:creator>
		<pubDate>Wed, 02 Oct 2013 09:01:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1244#comment-65743</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/code-packet-sniffer-c-winpcap/comment-page-1/#comment-65726&quot;&gt;Guest&lt;/a&gt;.

A simple cast can solve this.
Regards.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/code-packet-sniffer-c-winpcap/comment-page-1/#comment-65726">Guest</a>.</p>
<p>A simple cast can solve this.<br />
Regards.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Hedi Naily		</title>
		<link>https://www.binarytides.com/code-packet-sniffer-c-winpcap/comment-page-1/#comment-65741</link>

		<dc:creator><![CDATA[Hedi Naily]]></dc:creator>
		<pubDate>Tue, 01 Oct 2013 15:57:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1244#comment-65741</guid>

					<description><![CDATA[Re: This sample only shows how to sniff ethernet packets. How to sniff wireless packets using WinPCap. Had anyone tried it?]]></description>
			<content:encoded><![CDATA[<p>Re: This sample only shows how to sniff ethernet packets. How to sniff wireless packets using WinPCap. Had anyone tried it?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Hedi Naily		</title>
		<link>https://www.binarytides.com/code-packet-sniffer-c-winpcap/comment-page-1/#comment-65739</link>

		<dc:creator><![CDATA[Hedi Naily]]></dc:creator>
		<pubDate>Tue, 01 Oct 2013 11:33:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1244#comment-65739</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/code-packet-sniffer-c-winpcap/comment-page-1/#comment-65728&quot;&gt;Guest&lt;/a&gt;.

try to set ShowProgress option to true in linker properties in order to see whether the linker searches for wpcap.lib file or not. If not, then maybe the linker is confused about the file&#039;s directory i.e there may be 2 folders that contain the lib file. In this case all you need to do is to delete one of them. Unresolved external symbols problem is related to functions that are declared but not defined.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/code-packet-sniffer-c-winpcap/comment-page-1/#comment-65728">Guest</a>.</p>
<p>try to set ShowProgress option to true in linker properties in order to see whether the linker searches for wpcap.lib file or not. If not, then maybe the linker is confused about the file&#8217;s directory i.e there may be 2 folders that contain the lib file. In this case all you need to do is to delete one of them. Unresolved external symbols problem is related to functions that are declared but not defined.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Guest		</title>
		<link>https://www.binarytides.com/code-packet-sniffer-c-winpcap/comment-page-1/#comment-65728</link>

		<dc:creator><![CDATA[Guest]]></dc:creator>
		<pubDate>Tue, 24 Sep 2013 10:21:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1244#comment-65728</guid>

					<description><![CDATA[I&#039;ve got linker errors (unresolved externals) however I have specified wpcap.lib directory in linker options.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve got linker errors (unresolved externals) however I have specified wpcap.lib directory in linker options.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Guest		</title>
		<link>https://www.binarytides.com/code-packet-sniffer-c-winpcap/comment-page-1/#comment-65726</link>

		<dc:creator><![CDATA[Guest]]></dc:creator>
		<pubDate>Mon, 23 Sep 2013 13:31:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1244#comment-65726</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/code-packet-sniffer-c-winpcap/comment-page-1/#comment-65610&quot;&gt;roma&lt;/a&gt;.

same here :/ have you solved this problem?]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/code-packet-sniffer-c-winpcap/comment-page-1/#comment-65610">roma</a>.</p>
<p>same here :/ have you solved this problem?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: roma		</title>
		<link>https://www.binarytides.com/code-packet-sniffer-c-winpcap/comment-page-1/#comment-65610</link>

		<dc:creator><![CDATA[roma]]></dc:creator>
		<pubDate>Sat, 13 Jul 2013 21:38:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1244#comment-65610</guid>

					<description><![CDATA[I have errors :(

cannot convert u_char to char etc ..]]></description>
			<content:encoded><![CDATA[<p>I have errors :(</p>
<p>cannot convert u_char to char etc ..</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Karteek		</title>
		<link>https://www.binarytides.com/code-packet-sniffer-c-winpcap/comment-page-1/#comment-64935</link>

		<dc:creator><![CDATA[Karteek]]></dc:creator>
		<pubDate>Fri, 08 Feb 2013 23:59:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1244#comment-64935</guid>

					<description><![CDATA[Can you tell how to stop the execution after a certain timeout? &#038; thanx in advance]]></description>
			<content:encoded><![CDATA[<p>Can you tell how to stop the execution after a certain timeout? &amp; thanx in advance</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Roman		</title>
		<link>https://www.binarytides.com/code-packet-sniffer-c-winpcap/comment-page-1/#comment-33890</link>

		<dc:creator><![CDATA[Roman]]></dc:creator>
		<pubDate>Sat, 30 Jun 2012 10:02:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1244#comment-33890</guid>

					<description><![CDATA[Thanks, it helped me :)]]></description>
			<content:encoded><![CDATA[<p>Thanks, it helped me :)</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Mohammed		</title>
		<link>https://www.binarytides.com/code-packet-sniffer-c-winpcap/comment-page-1/#comment-31755</link>

		<dc:creator><![CDATA[Mohammed]]></dc:creator>
		<pubDate>Mon, 19 Mar 2012 13:56:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=1244#comment-31755</guid>

					<description><![CDATA[Its is a very nice example, thank you very much...]]></description>
			<content:encoded><![CDATA[<p>Its is a very nice example, thank you very much&#8230;</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
