gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r7977 - GNUnet/src/include


From: gnunet
Subject: [GNUnet-SVN] r7977 - GNUnet/src/include
Date: Wed, 26 Nov 2008 12:09:03 -0700 (MST)

Author: nevans
Date: 2008-11-26 12:09:03 -0700 (Wed, 26 Nov 2008)
New Revision: 7977

Added:
   GNUnet/src/include/dv.h
Log:


Added: GNUnet/src/include/dv.h
===================================================================
--- GNUnet/src/include/dv.h                             (rev 0)
+++ GNUnet/src/include/dv.h     2008-11-26 19:09:03 UTC (rev 7977)
@@ -0,0 +1,84 @@
+/*
+ This file is part of GNUnet.
+ (C) 2008 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.
+ */
+
+/**
+ * @author Nathan Evans
+ * @file include/dv.h
+ * @brief Structs necessary for the distance vector service providing
+ * distance vector type routing.
+ */
+#ifndef DV_H
+#define DV_H
+
+#include "gnunet_core.h"
+
+#define GNUNET_DV_LEAST_COST 1
+#define GNUNET_DV_MAX_DISTANCE -1
+#define GNUNET_DV_INITIAL_SEQUENCE_NUMBER 0
+
+typedef struct
+{
+  GNUNET_MessageHeader header;
+
+  /**
+   * Reserved (for alignment).
+   */
+  unsigned int reserved;
+
+  /**
+   * Cost from received from node to neighbor node
+   */
+  unsigned int cost;
+
+  /**
+   * Distance from received from node to neighbor node (physical hops)
+   */
+  unsigned int distance;
+
+  /**
+   * Sequence number of value
+   */
+  unsigned int sequence_number;
+
+  /**
+   * Identity of neighbor of received from node
+   */
+  GNUNET_PeerIdentity neighbor;
+
+} p2p_dv_MESSAGE_NeighborInfo;
+
+struct GNUNET_dv_connected_neighbor
+*findConnectedNeighbor(const GNUNET_PeerIdentity *);
+
+struct GNUNET_dv_extended_neighbor
+*findExtendedNeighbor(const GNUNET_PeerIdentity *);
+
+static int
+addUpdateConnectedNeighbor(const GNUNET_PeerIdentity *, unsigned int, unsigned 
int, unsigned int);
+
+static int
+addUpdateExtendedNeighbor(const GNUNET_PeerIdentity *,const 
GNUNET_PeerIdentity *, unsigned int, unsigned int, unsigned int);
+
+static void
+initialAddConnectedNeighbor(const GNUNET_PeerIdentity *, void *);
+
+#endif
+
+/* end of dv.h */





reply via email to

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