<?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: Get list of interfaces using SIOCGIFCONF ioctl</title>
	<atom:link href="http://techpulp.com/2008/10/get-list-of-interfaces-using-siocgifconf-ioctl/feed/" rel="self" type="application/rss+xml" />
	<link>http://techpulp.com/2008/10/get-list-of-interfaces-using-siocgifconf-ioctl/</link>
	<description>The pulp of technology</description>
	<pubDate>Thu, 09 Sep 2010 13:35:28 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Neo</title>
		<link>http://techpulp.com/2008/10/get-list-of-interfaces-using-siocgifconf-ioctl/comment-page-1/#comment-488</link>
		<dc:creator>Neo</dc:creator>
		<pubDate>Wed, 11 Nov 2009 00:53:26 +0000</pubDate>
		<guid isPermaLink="false">http://techpulp.com/?p=87#comment-488</guid>
		<description>You must use &#38;lt; for &#60; symbol. Similarly &#38;gt; for &#62; symbol. It is HTML way which we can't be avoided for now.</description>
		<content:encoded><![CDATA[<p>You must use &amp;lt; for &lt; symbol. Similarly &amp;gt; for &gt; symbol. It is HTML way which we can&#8217;t be avoided for now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ganesh</title>
		<link>http://techpulp.com/2008/10/get-list-of-interfaces-using-siocgifconf-ioctl/comment-page-1/#comment-485</link>
		<dc:creator>Ganesh</dc:creator>
		<pubDate>Tue, 27 Oct 2009 07:32:16 +0000</pubDate>
		<guid isPermaLink="false">http://techpulp.com/?p=87#comment-485</guid>
		<description>The code within the for loop in 'main' function is also missing:
&lt;CODE&gt;
        char ip_addr [ INET_ADDRSTRLEN ] ;
        struct sockaddr_in *b = (struct sockaddr_in *) &#38;(ifreqs[i].ifr_addr) ;

        printf("\t%-10s\t%s\n", ifreqs[i].ifr_name, inet_ntop(AF_INET, &#38; b-&#62;sin_addr, ip_addr, sizeof ip_addr));
&lt;/CODE&gt;</description>
		<content:encoded><![CDATA[<p>The code within the for loop in &#8216;main&#8217; function is also missing:<br />
<code><br />
        char ip_addr [ INET_ADDRSTRLEN ] ;<br />
        struct sockaddr_in *b = (struct sockaddr_in *) &amp;(ifreqs[i].ifr_addr) ;</p>
<p>        printf(&#8221;\t%-10s\t%s\n&#8221;, ifreqs[i].ifr_name, inet_ntop(AF_INET, &amp; b-&gt;sin_addr, ip_addr, sizeof ip_addr));<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ganesh</title>
		<link>http://techpulp.com/2008/10/get-list-of-interfaces-using-siocgifconf-ioctl/comment-page-1/#comment-484</link>
		<dc:creator>Ganesh</dc:creator>
		<pubDate>Tue, 27 Oct 2009 07:29:52 +0000</pubDate>
		<guid isPermaLink="false">http://techpulp.com/?p=87#comment-484</guid>
		<description>I am sorry, somehow none of the header file names are visible in the comment that I posted.

Anyway, I only included 'arpa/inet.h' header file apart from what was already there in the code.

Warm Regards,
Ganesh</description>
		<content:encoded><![CDATA[<p>I am sorry, somehow none of the header file names are visible in the comment that I posted.</p>
<p>Anyway, I only included &#8216;arpa/inet.h&#8217; header file apart from what was already there in the code.</p>
<p>Warm Regards,<br />
Ganesh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ganesh</title>
		<link>http://techpulp.com/2008/10/get-list-of-interfaces-using-siocgifconf-ioctl/comment-page-1/#comment-483</link>
		<dc:creator>Ganesh</dc:creator>
		<pubDate>Tue, 27 Oct 2009 07:26:16 +0000</pubDate>
		<guid isPermaLink="false">http://techpulp.com/?p=87#comment-483</guid>
		<description>Hi Neo,

Thanks for this article. It cleared up all my questions on using ioctl function call with SIOCGIFCONF request.

I have made a small modification to your code. It now prints the IP address of all the interfaces configured in the computer.

&lt;code&gt;#include &#60;arpa/inet.h&#62;&lt;/code&gt;

Code inside main loop:

&lt;code&gt;char ip_addr [ INET_ADDRSTRLEN ] ;
struct sockaddr_in *b = (struct sockaddr_in *) &#038;(ifreqs[i].ifr_addr) ;

printf(”\t%-10s\t%s\n”, ifreqs[i].ifr_name, inet_ntop(AF_INET, &#038; b-&#62;sin_addr, ip_addr, sizeof ip_addr));&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Hi Neo,</p>
<p>Thanks for this article. It cleared up all my questions on using ioctl function call with SIOCGIFCONF request.</p>
<p>I have made a small modification to your code. It now prints the IP address of all the interfaces configured in the computer.</p>
<p><code>#include &lt;arpa/inet.h&gt;</code></p>
<p>Code inside main loop:</p>
<p><code>char ip_addr [ INET_ADDRSTRLEN ] ;<br />
struct sockaddr_in *b = (struct sockaddr_in *) &#038;(ifreqs[i].ifr_addr) ;</p>
<p>printf(”\t%-10s\t%s\n”, ifreqs[i].ifr_name, inet_ntop(AF_INET, &#038; b-&gt;sin_addr, ip_addr, sizeof ip_addr));</code></p>
]]></content:encoded>
	</item>
</channel>
</rss>
