<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -39,6 +39,9 @@
 // with iPhone apps super easy
 
 #import &quot;MongooseDaemon.h&quot;
+#include &lt;netinet/in.h&gt;
+#include &lt;arpa/inet.h&gt;
+#include &lt;netdb.h&gt;
 
 //#define DOCUMENTS_FOLDER [NSHomeDirectory() stringByAppendingPathComponent:@&quot;Documents&quot;]
 #define DOCUMENTS_FOLDER NSHomeDirectory()
@@ -47,6 +50,31 @@
 
 @synthesize ctx;
 
+
+// Return the localized IP address - From Erica Sadun's cookbook
+- (NSString *) localIPAddress
+{
+	char baseHostName[255];
+	gethostname(baseHostName, 255);
+	
+	// Adjust for iPhone -- add .local to the host name
+	char hn[255];
+	sprintf(hn, &quot;%s.local&quot;, baseHostName);
+	
+	struct hostent *host = gethostbyname(hn);
+    if (host == NULL)
+	{
+        herror(&quot;resolv&quot;);
+		return NULL;
+	}
+    else {
+        struct in_addr **list = (struct in_addr **)host-&gt;h_addr_list;
+		return [NSString stringWithCString:inet_ntoa(*list[0])];
+    }
+	
+	return NULL;
+}
+
 - (void)startHTTP:(NSString *)ports
 {
   self.ctx = mg_start();     // Start Mongoose serving thread
@@ -56,7 +84,7 @@
 
   // Now Mongoose is up, running and configured.
   // Serve until somebody terminates us
-  NSLog(@&quot;Mongoose Server is running&quot;);
+  NSLog(@&quot;Mongoose Server is running on http://%@:8080&quot;, [self localIPAddress]);
 }
 
 - (void)startMongooseDaemon:(NSString *)ports;</diff>
      <filename>MongooseDaemon.m</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f9ca01e3fe0f0cfe7ae8c4333ea5353dbfe2ccb6</id>
    </parent>
  </parents>
  <author>
    <name>Rama McIntosh</name>
    <email>rama@myutil.com</email>
  </author>
  <url>http://github.com/face/MongooseDaemon/commit/453b199591ee88c484c425deb27270e563ef9ce9</url>
  <id>453b199591ee88c484c425deb27270e563ef9ce9</id>
  <committed-date>2009-10-29T01:12:48-07:00</committed-date>
  <authored-date>2009-10-29T01:12:48-07:00</authored-date>
  <message>Print out the iPhones local IP address to the log file</message>
  <tree>8f96203b7b3ef1cb4f660756dac5f44f08775aa4</tree>
  <committer>
    <name>Rama McIntosh</name>
    <email>rama@myutil.com</email>
  </committer>
</commit>
