<?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: ICMP ping flood code using sockets in C on Linux	</title>
	<atom:link href="https://www.binarytides.com/icmp-ping-flood-code-sockets-c-linux/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.binarytides.com/icmp-ping-flood-code-sockets-c-linux/</link>
	<description>News, Technology, Entertainment and more</description>
	<lastBuildDate>Fri, 01 Jan 2021 09:44:08 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>
	<item>
		<title>
		By: chjarbiter1983		</title>
		<link>https://www.binarytides.com/icmp-ping-flood-code-sockets-c-linux/comment-page-1/#comment-304957</link>

		<dc:creator><![CDATA[chjarbiter1983]]></dc:creator>
		<pubDate>Fri, 01 Jan 2021 09:44:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=4607#comment-304957</guid>

					<description><![CDATA[when the payload_size is bigger than mtu,sendto will failed,I don&#039;t know how to fix it!]]></description>
			<content:encoded><![CDATA[<p>when the payload_size is bigger than mtu,sendto will failed,I don&#8217;t know how to fix it!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: suren		</title>
		<link>https://www.binarytides.com/icmp-ping-flood-code-sockets-c-linux/comment-page-1/#comment-165695</link>

		<dc:creator><![CDATA[suren]]></dc:creator>
		<pubDate>Fri, 10 Aug 2018 12:40:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=4607#comment-165695</guid>

					<description><![CDATA[I&#039;m trying to implement  ICMP Flooding mechanism. The flooding is successful only for some networks. It&#039;s failing for some other networks. Why is this happening?]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m trying to implement  ICMP Flooding mechanism. The flooding is successful only for some networks. It&#8217;s failing for some other networks. Why is this happening?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Nate		</title>
		<link>https://www.binarytides.com/icmp-ping-flood-code-sockets-c-linux/comment-page-1/#comment-124133</link>

		<dc:creator><![CDATA[Nate]]></dc:creator>
		<pubDate>Mon, 17 Jul 2017 20:50:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=4607#comment-124133</guid>

					<description><![CDATA[When running this it consistently fails to send the packets throwing an error with the message `send failed`. 

When checking `errno` it shows a EINVAL error (invalid argument).]]></description>
			<content:encoded><![CDATA[<p>When running this it consistently fails to send the packets throwing an error with the message `send failed`. </p>
<p>When checking `errno` it shows a EINVAL error (invalid argument).</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ted Mittelstaedt		</title>
		<link>https://www.binarytides.com/icmp-ping-flood-code-sockets-c-linux/comment-page-1/#comment-68145</link>

		<dc:creator><![CDATA[Ted Mittelstaedt]]></dc:creator>
		<pubDate>Wed, 27 Jan 2016 00:13:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=4607#comment-68145</guid>

					<description><![CDATA[This code compiles out-of-box under Ubuntu 14 and runs.  But it suffers from several things;

First is the call to rand().   I don&#039;t understand what the point of doing this is because you could just pad out the packet with zeros, but if you must use &quot;random&quot; data for padding, the rand() call is extremely slow, and introduces significant delay in the code.  More importantly, when rand() runs out of bits it blocks forcing the main loop to block.

A better way would be to take the &quot;fastrand()&quot; example code from here:

http://stackoverflow.com/questions/26237419/faster-than-rand

and use that.  Secondly is the call to printf - this is slow as well - it would be better to rewrite the code to print a total number of packets sent over time when the program exits - and print nothing during the flooding time.

Another strange thing in there is that usleep() call, it should be commented out it is not needed, not under Ubuntu 14 at least.

With just these changes I&#039;m able to do an actual flood ping that really does flood ping.

Interestingly, when comparing this code out-of-box with the operating system ping program &quot;ping -f&quot;, the OS ping throws out more traffic than this.,  However, after fixing the stuff I mentioned, this program can throw out about ten times the amount of traffic that a Linux ping -f command can.

Personally I suspect that the Linux ping command flooding ability is compromised because it is sending the traffic through iptables and such.]]></description>
			<content:encoded><![CDATA[<p>This code compiles out-of-box under Ubuntu 14 and runs.  But it suffers from several things;</p>
<p>First is the call to rand().   I don&#8217;t understand what the point of doing this is because you could just pad out the packet with zeros, but if you must use &#8220;random&#8221; data for padding, the rand() call is extremely slow, and introduces significant delay in the code.  More importantly, when rand() runs out of bits it blocks forcing the main loop to block.</p>
<p>A better way would be to take the &#8220;fastrand()&#8221; example code from here:</p>
<p><a href="http://stackoverflow.com/questions/26237419/faster-than-rand" rel="nofollow ugc">http://stackoverflow.com/questions/26237419/faster-than-rand</a></p>
<p>and use that.  Secondly is the call to printf &#8211; this is slow as well &#8211; it would be better to rewrite the code to print a total number of packets sent over time when the program exits &#8211; and print nothing during the flooding time.</p>
<p>Another strange thing in there is that usleep() call, it should be commented out it is not needed, not under Ubuntu 14 at least.</p>
<p>With just these changes I&#8217;m able to do an actual flood ping that really does flood ping.</p>
<p>Interestingly, when comparing this code out-of-box with the operating system ping program &#8220;ping -f&#8221;, the OS ping throws out more traffic than this.,  However, after fixing the stuff I mentioned, this program can throw out about ten times the amount of traffic that a Linux ping -f command can.</p>
<p>Personally I suspect that the Linux ping command flooding ability is compromised because it is sending the traffic through iptables and such.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Flor Ian		</title>
		<link>https://www.binarytides.com/icmp-ping-flood-code-sockets-c-linux/comment-page-1/#comment-67391</link>

		<dc:creator><![CDATA[Flor Ian]]></dc:creator>
		<pubDate>Wed, 10 Sep 2014 13:21:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=4607#comment-67391</guid>

					<description><![CDATA[Its fake , when i dump traffic in network it doesnt show nothing , so its not real as icmp flooder , the developer should fix it]]></description>
			<content:encoded><![CDATA[<p>Its fake , when i dump traffic in network it doesnt show nothing , so its not real as icmp flooder , the developer should fix it</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: David Peterson Harvey		</title>
		<link>https://www.binarytides.com/icmp-ping-flood-code-sockets-c-linux/comment-page-1/#comment-65101</link>

		<dc:creator><![CDATA[David Peterson Harvey]]></dc:creator>
		<pubDate>Tue, 07 May 2013 02:31:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=4607#comment-65101</guid>

					<description><![CDATA[The inclusion of arpa/inet.h is necessary to prevent implicit declaration of inet_addr in the code. I can&#039;t get the socket to connect. I keep getting &quot;could not create socket: Operation not permitted.&quot; I&#039;ll compare it to your other articles on sockets, which work wonderfully, to see if I can see the difference.


Thanks again for great resources for those of us learning to program!]]></description>
			<content:encoded><![CDATA[<p>The inclusion of arpa/inet.h is necessary to prevent implicit declaration of inet_addr in the code. I can&#8217;t get the socket to connect. I keep getting &#8220;could not create socket: Operation not permitted.&#8221; I&#8217;ll compare it to your other articles on sockets, which work wonderfully, to see if I can see the difference.</p>
<p>Thanks again for great resources for those of us learning to program!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Silver Moon		</title>
		<link>https://www.binarytides.com/icmp-ping-flood-code-sockets-c-linux/comment-page-1/#comment-65097</link>

		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Tue, 07 May 2013 02:22:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=4607#comment-65097</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/icmp-ping-flood-code-sockets-c-linux/comment-page-1/#comment-65096&quot;&gt;David Peterson Harvey&lt;/a&gt;.

include the following header file 

#include 

the &quot;implicit declaration&quot; errors come up due to missing header includes.



run the program with root privileges. the above program creates raw sockets for which it needs root privileges on linux. on ubuntu for example run it with sudo.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/icmp-ping-flood-code-sockets-c-linux/comment-page-1/#comment-65096">David Peterson Harvey</a>.</p>
<p>include the following header file </p>
<p>#include </p>
<p>the &#8220;implicit declaration&#8221; errors come up due to missing header includes.</p>
<p>run the program with root privileges. the above program creates raw sockets for which it needs root privileges on linux. on ubuntu for example run it with sudo.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Silver Moon		</title>
		<link>https://www.binarytides.com/icmp-ping-flood-code-sockets-c-linux/comment-page-1/#comment-65098</link>

		<dc:creator><![CDATA[Silver Moon]]></dc:creator>
		<pubDate>Tue, 07 May 2013 02:22:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=4607#comment-65098</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.binarytides.com/icmp-ping-flood-code-sockets-c-linux/comment-page-1/#comment-65094&quot;&gt;David Peterson Harvey&lt;/a&gt;.

run with root privileges]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://www.binarytides.com/icmp-ping-flood-code-sockets-c-linux/comment-page-1/#comment-65094">David Peterson Harvey</a>.</p>
<p>run with root privileges</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: David Peterson Harvey		</title>
		<link>https://www.binarytides.com/icmp-ping-flood-code-sockets-c-linux/comment-page-1/#comment-65096</link>

		<dc:creator><![CDATA[David Peterson Harvey]]></dc:creator>
		<pubDate>Mon, 06 May 2013 18:19:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=4607#comment-65096</guid>

					<description><![CDATA[Love your articles!

On this one, if you have time, I&#039;m getting &quot;implicit declaration of function &#039;inet_addr&#039; as a warning. Of course, the code runs fine. I&#039;m also not able to open a socket, though the socket programs in your other articles open just fine. 



Do you have any ideas for me to clean up the warning and troubleshoot the socket problem?


Thanks again for great, informative articles!]]></description>
			<content:encoded><![CDATA[<p>Love your articles!</p>
<p>On this one, if you have time, I&#8217;m getting &#8220;implicit declaration of function &#8216;inet_addr&#8217; as a warning. Of course, the code runs fine. I&#8217;m also not able to open a socket, though the socket programs in your other articles open just fine. </p>
<p>Do you have any ideas for me to clean up the warning and troubleshoot the socket problem?</p>
<p>Thanks again for great, informative articles!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: David Peterson Harvey		</title>
		<link>https://www.binarytides.com/icmp-ping-flood-code-sockets-c-linux/comment-page-1/#comment-65094</link>

		<dc:creator><![CDATA[David Peterson Harvey]]></dc:creator>
		<pubDate>Mon, 06 May 2013 17:41:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.binarytides.com/?p=4607#comment-65094</guid>

					<description><![CDATA[Could not create socket. Operation not permitted.


Didn&#039;t get very far with this one.]]></description>
			<content:encoded><![CDATA[<p>Could not create socket. Operation not permitted.</p>
<p>Didn&#8217;t get very far with this one.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
