<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jeff Kelley’s Blog &#187; ping</title>
	<atom:link href="http://blog.slaunchaman.com/tag/ping/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.slaunchaman.com</link>
	<description>Mac tips, iPhone applications, and the like</description>
	<lastBuildDate>Fri, 02 Dec 2011 04:51:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Using Apple’s SimplePing on iPhone OS</title>
		<link>http://blog.slaunchaman.com/2010/02/13/using-apples-simpleping-on-iphone-os/</link>
		<comments>http://blog.slaunchaman.com/2010/02/13/using-apples-simpleping-on-iphone-os/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 19:06:48 +0000</pubDate>
		<dc:creator>Jeff Kelley</dc:creator>
				<category><![CDATA[Programming Tips]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[ping]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://blog.slaunchaman.com/?p=203</guid>
		<description><![CDATA[If you try out of the box to compile Apple&#8217;s &#8220;SimplePing&#8221; code sample on the iPhone OS, you&#8217;ll wind up with a lot of errors as some files don&#8217;t exist in those SDKs. Specifically, you need these files (you need more than just these files to compile, obviously, but these are the ones that aren&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>If you try out of the box to compile Apple&rsquo;s &ldquo;<a href="http://developer.apple.com/mac/library/samplecode/SimplePing/">SimplePing</a>&rdquo; code sample on the iPhone OS, you&rsquo;ll wind up with a lot of errors as some files don&rsquo;t exist in those SDKs. Specifically, you need these files (you need more than <em>just</em> these files to compile, obviously, but these are the ones that aren&rsquo;t included):</p>
<ul>
<li><code>/usr/include/netinet/ip.h</code></li>
<li><code>/usr/include/netinet/in_systm.h</code></li>
<li><code>/usr/include/netinet/ip_icmp.h</code></li>
<li><code>/usr/include/netinet/ip_var.h</code></li>
</ul>
<p>So here&rsquo;s a quick Bash script that links the relevant files to your iPhone OS and iPhone Simulator SDKs:</p>
<pre class="brush: bash; title: ; notranslate">for path in /Developer/Platforms/iPhone*/Developer/SDKs/*; do
    for file in /usr/include/netinet/ip.h \
                /usr/include/netinet/in_systm.h \
                /usr/include/netinet/ip_icmp.h \
                /usr/include/netinet/ip_var.h; do
        if [ ! -f &quot;${path}${file}&quot; ]; then
            sudo ln &quot;${file}&quot; &quot;${path}${file}&quot;
        fi;
    done;
done</pre>
<p>I&rsquo;ve spoken to an Apple engineer and confirmed that this is the best way to do it, as well as filed a bug, which I encourage <a href="http://bugreport.apple.com">you to do as well</a> if this annoys you.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.slaunchaman.com/2010/02/13/using-apples-simpleping-on-iphone-os/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

