gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r1159 - GNUnet/src/transports


From: grothoff
Subject: [GNUnet-SVN] r1159 - GNUnet/src/transports
Date: Thu, 30 Jun 2005 05:30:45 -0700 (PDT)

Author: grothoff
Date: 2005-06-30 05:30:42 -0700 (Thu, 30 Jun 2005)
New Revision: 1159

Added:
   GNUnet/src/transports/ip.h
Log:
oooop

Added: GNUnet/src/transports/ip.h
===================================================================
--- GNUnet/src/transports/ip.h  2005-06-30 12:16:12 UTC (rev 1158)
+++ GNUnet/src/transports/ip.h  2005-06-30 12:30:42 UTC (rev 1159)
@@ -0,0 +1,54 @@
+/*
+     This file is part of GNUnet.
+     (C) 2001, 2002, 2003, 2004, 2005 Christian Grothoff (and other 
contributing authors)
+
+     GNUnet is free software; you can redistribute it and/or modify
+     it under the terms of the GNU General Public License as published
+     by the Free Software Foundation; either version 2, or (at your
+     option) any later version.
+
+     GNUnet is distributed in the hope that it will be useful, but
+     WITHOUT ANY WARRANTY; without even the implied warranty of
+     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+     General Public License for more details.
+
+     You should have received a copy of the GNU General Public License
+     along with GNUnet; see the file COPYING.  If not, write to the
+     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+     Boston, MA 02111-1307, USA.
+*/
+
+/**
+ * @file transports/ip.h
+ * @brief
+ *
+ * @author Christian Grothoff
+ */
+
+#ifndef IP_H
+#define IP_H
+
+/**
+ * @brief Determine the (external) IP of the local machine.
+ *
+ * We have many ways to get that IP:
+ * a) from the interface (ifconfig)
+ * b) via DNS from our HOSTNAME (environment)
+ * c) from the configuration (HOSTNAME specification or static IP)
+ *
+ * Which way applies depends on the OS, the configuration
+ * (dynDNS? static IP? NAT?) and at the end what the user
+ * needs.
+ *
+ * @return SYSERR on error, OK on success
+ */
+int getPublicIPAddress(IPaddr  * address);
+
+/**
+ * @brief Get the IPv6 address for the local machine.
+ *
+ * @return SYSERR on error, OK on success
+ */
+int getPublicIP6Address(IP6addr  * address);
+
+#endif





reply via email to

[Prev in Thread] Current Thread [Next in Thread]