<?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://www.techpulp.com/blog/2008/10/get-list-of-interfaces-using-siocgifconf-ioctl/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.techpulp.com/blog/2008/10/get-list-of-interfaces-using-siocgifconf-ioctl/</link>
	<description>The pulp of technology</description>
	<lastBuildDate>Mon, 30 Jan 2012 07:42:48 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Neo</title>
		<link>http://www.techpulp.com/blog/2008/10/get-list-of-interfaces-using-siocgifconf-ioctl/#comment-8</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-8</guid>
		<description>You must use &lt; for &lt; symbol. Similarly &gt; for &gt; symbol. It is HTML way which we can&#039;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://www.techpulp.com/blog/2008/10/get-list-of-interfaces-using-siocgifconf-ioctl/#comment-7</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-7</guid>
		<description>The code within the for loop in &#039;main&#039; function is also missing:
&lt;CODE&gt;
        char ip_addr [ INET_ADDRSTRLEN ] ;
        struct sockaddr_in *b = (struct sockaddr_in *) &amp;(ifreqs[i].ifr_addr) ;

        printf(&quot;\t%-10s\t%s\n&quot;, ifreqs[i].ifr_name, inet_ntop(AF_INET, &amp; b-&gt;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(&#8220;\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://www.techpulp.com/blog/2008/10/get-list-of-interfaces-using-siocgifconf-ioctl/#comment-6</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-6</guid>
		<description>I am sorry, somehow none of the header file names are visible in the comment that I posted.

Anyway, I only included &#039;arpa/inet.h&#039; 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://www.techpulp.com/blog/2008/10/get-list-of-interfaces-using-siocgifconf-ioctl/#comment-5</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-5</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 &lt;arpa/inet.h&gt;&lt;/code&gt;

Code inside main loop:

&lt;code&gt;char ip_addr [ INET_ADDRSTRLEN ] ;
struct sockaddr_in *b = (struct sockaddr_in *) &amp;(ifreqs[i].ifr_addr) ;

printf(”\t%-10s\t%s\n”, ifreqs[i].ifr_name, inet_ntop(AF_INET, &amp; b-&gt;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 *) &amp;(ifreqs[i].ifr_addr) ;</p>
<p>printf(”\t%-10s\t%s\n”, ifreqs[i].ifr_name, inet_ntop(AF_INET, &amp; b-&gt;sin_addr, ip_addr, sizeof ip_addr));</code></p>
]]></content:encoded>
	</item>
</channel>
</rss>

