<?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 using Winsock	</title>
	<atom:link href="https://www.binarytides.com/packet-sniffer-code-in-c-using-winsock/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.binarytides.com/packet-sniffer-code-in-c-using-winsock/</link>
	<description>News, Technology, Entertainment and more</description>
	<lastBuildDate>Wed, 23 Jun 2021 20:13:16 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>
	<item>
		<title>
		By: Brian		</title>
		<link>https://www.binarytides.com/packet-sniffer-code-in-c-using-winsock/comment-page-1/#comment-319989</link>

		<dc:creator><![CDATA[Brian]]></dc:creator>
		<pubDate>Wed, 23 Jun 2021 20:13:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=6#comment-319989</guid>

					<description><![CDATA[May want to add a note - newer versions of Windows require &quot;Run as Admin&quot; to open a raw socket. Great basic tips, though!]]></description>
			<content:encoded><![CDATA[<p>May want to add a note &#8211; newer versions of Windows require &#8220;Run as Admin&#8221; to open a raw socket. Great basic tips, though!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Sandburg		</title>
		<link>https://www.binarytides.com/packet-sniffer-code-in-c-using-winsock/comment-page-1/#comment-201083</link>

		<dc:creator><![CDATA[Sandburg]]></dc:creator>
		<pubDate>Fri, 05 Jul 2019 15:54:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=6#comment-201083</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/packet-sniffer-code-in-c-using-winsock/comment-page-1/#comment-31157&quot;&gt;Binary Tides&lt;/a&gt;.

This is not a good advice... Don&#039;t try just to compile, try to long term fix...]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/packet-sniffer-code-in-c-using-winsock/comment-page-1/#comment-31157">Binary Tides</a>.</p>
<p>This is not a good advice&#8230; Don&#8217;t try just to compile, try to long term fix&#8230;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: qandool		</title>
		<link>https://www.binarytides.com/packet-sniffer-code-in-c-using-winsock/comment-page-1/#comment-168319</link>

		<dc:creator><![CDATA[qandool]]></dc:creator>
		<pubDate>Wed, 10 Oct 2018 17:58:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=6#comment-168319</guid>

					<description><![CDATA[Thanks for nice coding, i wand to add one more function to this code, a filter (let the user to see log of only tcp or udp packets). can someone help me please. thanks.]]></description>
			<content:encoded><![CDATA[<p>Thanks for nice coding, i wand to add one more function to this code, a filter (let the user to see log of only tcp or udp packets). can someone help me please. thanks.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: SZM		</title>
		<link>https://www.binarytides.com/packet-sniffer-code-in-c-using-winsock/comment-page-1/#comment-167963</link>

		<dc:creator><![CDATA[SZM]]></dc:creator>
		<pubDate>Sat, 06 Oct 2018 05:16:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=6#comment-167963</guid>

					<description><![CDATA[thank you for your nice coding, how can I  add a filter to this code, so user may select  type packet(s) (eg only Tcp or udp) and run the program. can someone help me. thanks as advanced.]]></description>
			<content:encoded><![CDATA[<p>thank you for your nice coding, how can I  add a filter to this code, so user may select  type packet(s) (eg only Tcp or udp) and run the program. can someone help me. thanks as advanced.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: lamba		</title>
		<link>https://www.binarytides.com/packet-sniffer-code-in-c-using-winsock/comment-page-1/#comment-137179</link>

		<dc:creator><![CDATA[lamba]]></dc:creator>
		<pubDate>Wed, 25 Oct 2017 05:08:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=6#comment-137179</guid>

					<description><![CDATA[how to receive PPP packets with  sniffer?]]></description>
			<content:encoded><![CDATA[<p>how to receive PPP packets with  sniffer?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Roby		</title>
		<link>https://www.binarytides.com/packet-sniffer-code-in-c-using-winsock/comment-page-1/#comment-133985</link>

		<dc:creator><![CDATA[Roby]]></dc:creator>
		<pubDate>Sat, 07 Oct 2017 10:31:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=6#comment-133985</guid>

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

Hy, the program works great, i am on Windows 7 SP1 , u only need to change the property of the exe file to Compatible with Windows XP SP2.U will have a really nice log file with all the packets.This programmer did a really great job.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/packet-sniffer-code-in-c-using-winsock/comment-page-1/#comment-39">Bool</a>.</p>
<p>Hy, the program works great, i am on Windows 7 SP1 , u only need to change the property of the exe file to Compatible with Windows XP SP2.U will have a really nice log file with all the packets.This programmer did a really great job.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Begin		</title>
		<link>https://www.binarytides.com/packet-sniffer-code-in-c-using-winsock/comment-page-1/#comment-64920</link>

		<dc:creator><![CDATA[Begin]]></dc:creator>
		<pubDate>Mon, 28 Jan 2013 15:39:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=6#comment-64920</guid>

					<description><![CDATA[I compiler but it error

undefined reference to &#039;WSAStartup@8&#039;

undefined reference to &#039;socket@12&#039;

undefined reference to &#039;gethostname@8&#039;]]></description>
			<content:encoded><![CDATA[<p>I compiler but it error</p>
<p>undefined reference to &#8216;WSAStartup@8&#8217;</p>
<p>undefined reference to &#8216;socket@12&#8217;</p>
<p>undefined reference to &#8216;gethostname@8&#8217;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Samuel Viveiros		</title>
		<link>https://www.binarytides.com/packet-sniffer-code-in-c-using-winsock/comment-page-1/#comment-64440</link>

		<dc:creator><![CDATA[Samuel Viveiros]]></dc:creator>
		<pubDate>Tue, 01 Jan 2013 14:17:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=6#comment-64440</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/packet-sniffer-code-in-c-using-winsock/comment-page-1/#comment-62415&quot;&gt;Nic Cha&lt;/a&gt;.

Disable the firewall ;)]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/packet-sniffer-code-in-c-using-winsock/comment-page-1/#comment-62415">Nic Cha</a>.</p>
<p>Disable the firewall ;)</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Nic Cha		</title>
		<link>https://www.binarytides.com/packet-sniffer-code-in-c-using-winsock/comment-page-1/#comment-62415</link>

		<dc:creator><![CDATA[Nic Cha]]></dc:creator>
		<pubDate>Thu, 20 Dec 2012 15:58:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=6#comment-62415</guid>

					<description><![CDATA[Cannot get the incoming packet on x86 win7.]]></description>
			<content:encoded><![CDATA[<p>Cannot get the incoming packet on x86 win7.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Samuel Viveiros		</title>
		<link>https://www.binarytides.com/packet-sniffer-code-in-c-using-winsock/comment-page-1/#comment-33831</link>

		<dc:creator><![CDATA[Samuel Viveiros]]></dc:creator>
		<pubDate>Tue, 05 Jun 2012 22:24:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=6#comment-33831</guid>

					<description><![CDATA[Hello,

nice article. 

sorry, but I couldn&#039;t resist. I did a version of the your code in Delphi:

http://www.4shared.com/rar/zclnBD9a/SimpleSniffer-Delphi.html

sorry my english :)]]></description>
			<content:encoded><![CDATA[<p>Hello,</p>
<p>nice article. </p>
<p>sorry, but I couldn&#8217;t resist. I did a version of the your code in Delphi:</p>
<p><a href="http://www.4shared.com/rar/zclnBD9a/SimpleSniffer-Delphi.html" rel="nofollow ugc">http://www.4shared.com/rar/zclnBD9a/SimpleSniffer-Delphi.html</a></p>
<p>sorry my english :)</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Binary Tides		</title>
		<link>https://www.binarytides.com/packet-sniffer-code-in-c-using-winsock/comment-page-1/#comment-31970</link>

		<dc:creator><![CDATA[Binary Tides]]></dc:creator>
		<pubDate>Wed, 04 Apr 2012 07:26:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=6#comment-31970</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/packet-sniffer-code-in-c-using-winsock/comment-page-1/#comment-31946&quot;&gt;hind osman&lt;/a&gt;.

router and firewalls are different things. routers have inbuilt firewall.
provide more information on what you are trying to implement.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/packet-sniffer-code-in-c-using-winsock/comment-page-1/#comment-31946">hind osman</a>.</p>
<p>router and firewalls are different things. routers have inbuilt firewall.<br />
provide more information on what you are trying to implement.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: hind osman		</title>
		<link>https://www.binarytides.com/packet-sniffer-code-in-c-using-winsock/comment-page-1/#comment-31946</link>

		<dc:creator><![CDATA[hind osman]]></dc:creator>
		<pubDate>Tue, 03 Apr 2012 08:19:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=6#comment-31946</guid>

					<description><![CDATA[i want to write acode to reconfigration the router to work as firewall,can i do that in windows or only linux ,can you help me plzzzzzzzzz]]></description>
			<content:encoded><![CDATA[<p>i want to write acode to reconfigration the router to work as firewall,can i do that in windows or only linux ,can you help me plzzzzzzzzz</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Binary Tides		</title>
		<link>https://www.binarytides.com/packet-sniffer-code-in-c-using-winsock/comment-page-1/#comment-31157</link>

		<dc:creator><![CDATA[Binary Tides]]></dc:creator>
		<pubDate>Sun, 25 Dec 2011 07:03:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=6#comment-31157</guid>

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

the code has been fixed.
however these are actually warnings instead of errors , try reducing the warning level in vc++ project settings.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/packet-sniffer-code-in-c-using-winsock/comment-page-1/#comment-31128">Ebrahim</a>.</p>
<p>the code has been fixed.<br />
however these are actually warnings instead of errors , try reducing the warning level in vc++ project settings.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ebrahim		</title>
		<link>https://www.binarytides.com/packet-sniffer-code-in-c-using-winsock/comment-page-1/#comment-31128</link>

		<dc:creator><![CDATA[Ebrahim]]></dc:creator>
		<pubDate>Sat, 24 Dec 2011 15:29:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=6#comment-31128</guid>

					<description><![CDATA[I compiled the code using Microsoft visual C++ Express Edition. I got these errors.

1)  line (184): error C2664: &#039;WSAIoctl&#039; : cannot convert parameter 7 from &#039;int *&#039; to &#039;LPDWORD&#039;

2)  line (205): error C2440: &#039;initializing&#039; : cannot convert from &#039;char *&#039; to &#039;unsigned char *&#039;

3)  line (216): error C2664: &#039;recvfrom&#039; : cannot convert parameter 2 from &#039;unsigned char *&#039; to &#039;char *&#039;

4) line (453): error C2664: &#039;strlen&#039; : cannot convert parameter 1 from &#039;unsigned char [17]&#039; to &#039;const char *&#039;]]></description>
			<content:encoded><![CDATA[<p>I compiled the code using Microsoft visual C++ Express Edition. I got these errors.</p>
<p>1)  line (184): error C2664: &#8216;WSAIoctl&#8217; : cannot convert parameter 7 from &#8216;int *&#8217; to &#8216;LPDWORD&#8217;</p>
<p>2)  line (205): error C2440: &#8216;initializing&#8217; : cannot convert from &#8216;char *&#8217; to &#8216;unsigned char *&#8217;</p>
<p>3)  line (216): error C2664: &#8216;recvfrom&#8217; : cannot convert parameter 2 from &#8216;unsigned char *&#8217; to &#8216;char *&#8217;</p>
<p>4) line (453): error C2664: &#8216;strlen&#8217; : cannot convert parameter 1 from &#8216;unsigned char [17]&#8217; to &#8216;const char *&#8217;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Binary Tides		</title>
		<link>https://www.binarytides.com/packet-sniffer-code-in-c-using-winsock/comment-page-1/#comment-30756</link>

		<dc:creator><![CDATA[Binary Tides]]></dc:creator>
		<pubDate>Wed, 14 Dec 2011 09:44:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=6#comment-30756</guid>

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

yes ipv6 headers are different from ipv4 headers. 
the ethernet header &quot;protocol&quot; field has to be checked to identify whether packet is ipv4 or ipv6. ipv4 has protocol number 0x0800 whereas ipv6 has protocol number 0x86DD. Full list here :

http://www.iana.org/assignments/ethernet-numbers

but winsock sniffer will not provide the ethernet header. winpcap has to be used.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/packet-sniffer-code-in-c-using-winsock/comment-page-1/#comment-39">Bool</a>.</p>
<p>yes ipv6 headers are different from ipv4 headers.<br />
the ethernet header &#8220;protocol&#8221; field has to be checked to identify whether packet is ipv4 or ipv6. ipv4 has protocol number 0x0800 whereas ipv6 has protocol number 0x86DD. Full list here :</p>
<p><a href="http://www.iana.org/assignments/ethernet-numbers" rel="nofollow ugc">http://www.iana.org/assignments/ethernet-numbers</a></p>
<p>but winsock sniffer will not provide the ethernet header. winpcap has to be used.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Binary Tides		</title>
		<link>https://www.binarytides.com/packet-sniffer-code-in-c-using-winsock/comment-page-1/#comment-30754</link>

		<dc:creator><![CDATA[Binary Tides]]></dc:creator>
		<pubDate>Wed, 14 Dec 2011 09:36:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=6#comment-30754</guid>

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

code has been fixed. should compile without any errors.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/packet-sniffer-code-in-c-using-winsock/comment-page-1/#comment-6949">TheOtherGuy</a>.</p>
<p>code has been fixed. should compile without any errors.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Binary Tides		</title>
		<link>https://www.binarytides.com/packet-sniffer-code-in-c-using-winsock/comment-page-1/#comment-30400</link>

		<dc:creator><![CDATA[Binary Tides]]></dc:creator>
		<pubDate>Fri, 02 Dec 2011 07:16:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=6#comment-30400</guid>

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

Ethernet header is not available with winsock.
Winpcap library can be used. It provides the whole packet including the ethernet header.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/packet-sniffer-code-in-c-using-winsock/comment-page-1/#comment-118">matoust</a>.</p>
<p>Ethernet header is not available with winsock.<br />
Winpcap library can be used. It provides the whole packet including the ethernet header.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: TheOtherGuy		</title>
		<link>https://www.binarytides.com/packet-sniffer-code-in-c-using-winsock/comment-page-1/#comment-6949</link>

		<dc:creator><![CDATA[TheOtherGuy]]></dc:creator>
		<pubDate>Wed, 03 Nov 2010 01:03:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=6#comment-6949</guid>

					<description><![CDATA[I tried to compile the code, and didn&#039;t work.

at line 114: it says log undeclared(first use in this function)

Is there something im doing wrong?]]></description>
			<content:encoded><![CDATA[<p>I tried to compile the code, and didn&#8217;t work.</p>
<p>at line 114: it says log undeclared(first use in this function)</p>
<p>Is there something im doing wrong?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Its me		</title>
		<link>https://www.binarytides.com/packet-sniffer-code-in-c-using-winsock/comment-page-1/#comment-130</link>

		<dc:creator><![CDATA[Its me]]></dc:creator>
		<pubDate>Thu, 23 Apr 2009 13:23:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=6#comment-130</guid>

					<description><![CDATA[To sniff the ethernet header and its fields a packet sniffing library like winpcap can be used.]]></description>
			<content:encoded><![CDATA[<p>To sniff the ethernet header and its fields a packet sniffing library like winpcap can be used.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: matoust		</title>
		<link>https://www.binarytides.com/packet-sniffer-code-in-c-using-winsock/comment-page-1/#comment-118</link>

		<dc:creator><![CDATA[matoust]]></dc:creator>
		<pubDate>Fri, 27 Feb 2009 22:56:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/blog/?p=6#comment-118</guid>

					<description><![CDATA[I have tested the code and it works great. I would also like to be able to display the whole packet including the Ethernet frame (preamble, MAC dest. , MAC source and soon).&lt;br/&gt;&lt;br/&gt;Do you know ho to configure the port to get the whole package?&lt;br/&gt;&lt;br/&gt;Thanks&lt;br/&gt;Tomas Matousek]]></description>
			<content:encoded><![CDATA[<p>I have tested the code and it works great. I would also like to be able to display the whole packet including the Ethernet frame (preamble, MAC dest. , MAC source and soon).</p>
<p>Do you know ho to configure the port to get the whole package?</p>
<p>Thanks<br />Tomas Matousek</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
