GNUnet  0.10.x
Data Structures | Macros | Typedefs | Enumerations | Variables
rps.h File Reference

example IPC messages between RPS API and GNS service More...

#include "gnunet_rps_service.h"
Include dependency graph for rps.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  GNUNET_RPS_P2P_PullReplyMessage
 P2P Message to send PeerIDs to other peer. More...
 
struct  GNUNET_RPS_CS_SeedMessage
 Message from client to service with seed of peers. More...
 
struct  GNUNET_RPS_CS_SubStartMessage
 Message from client to service telling it to start a new sub. More...
 
struct  GNUNET_RPS_CS_SubStopMessage
 Message from client to service telling it to stop a new sub. More...
 
struct  GNUNET_RPS_CS_DEBUG_ViewRequest
 Message from client to service indicating that clients wants to get updates of the view. More...
 
struct  GNUNET_RPS_CS_DEBUG_ViewReply
 Message from service to client containing current update of view. More...
 
struct  GNUNET_RPS_CS_DEBUG_StreamRequest
 Message from client to service indicating that clients wants to get stream of biased peers. More...
 
struct  GNUNET_RPS_CS_DEBUG_StreamReply
 Message from service to client containing peer from biased stream. More...
 

Macros

#define GNUNET_RPS_CADET_PORT   31337
 Mesh port used by RPS. More...
 

Typedefs

typedef void(* PeerOp) (void *cls, const struct GNUNET_PeerIdentity *peer)
 Functions of this type can be used to be stored at a peer for later execution. More...
 
typedef int(* PeersIterator) (void *cls, const struct GNUNET_PeerIdentity *peer)
 Iterator over valid peers. More...
 

Enumerations

enum  Peers_PeerFlags { Peers_PULL_REPLY_PENDING = 0x01, Peers_ONLINE = 0x20, Peers_TO_DESTROY = 0x40 }
 Different flags indicating the status of another peer. More...
 
enum  Peers_ChannelFlags { Peers_CHANNEL_ESTABLISHED_TWICE = 0x1, Peers_CHANNEL_CLEAN = 0x2, Peers_CHANNEL_DESTROING = 0x4 }
 Keep track of the status of a channel. More...
 
enum  Peers_ChannelRole { Peers_CHANNEL_ROLE_SENDING = 0x01, Peers_CHANNEL_ROLE_RECEIVING = 0x02 }
 The role of a channel. More...
 

Variables

struct GNUNET_STATISTICS_Handlestats
 Handle to the statistics service. More...
 

Detailed Description

example IPC messages between RPS API and GNS service

Author
Julius B√ľnger

Definition in file rps.h.

Macro Definition Documentation

◆ GNUNET_RPS_CADET_PORT

#define GNUNET_RPS_CADET_PORT   31337

Mesh port used by RPS.

Definition at line 31 of file rps.h.

Typedef Documentation

◆ PeerOp

typedef void(* PeerOp) (void *cls, const struct GNUNET_PeerIdentity *peer)

Functions of this type can be used to be stored at a peer for later execution.

Parameters
clsclosure
peerpeer to execute function on

Definition at line 306 of file rps.h.

◆ PeersIterator

typedef int(* PeersIterator) (void *cls, const struct GNUNET_PeerIdentity *peer)

Iterator over valid peers.

Parameters
clsclosure
peercurrent public peer id
Returns
GNUNET_YES if we should continue to iterate, GNUNET_NO if not.

Definition at line 318 of file rps.h.

Enumeration Type Documentation

◆ Peers_PeerFlags

Different flags indicating the status of another peer.

Enumerator
Peers_PULL_REPLY_PENDING 

If we are waiting for a reply from that peer (sent a pull request).

Peers_ONLINE 

We set this bit when we know the peer is online.

Peers_TO_DESTROY 

We set this bit when we are going to destroy the channel to this peer.

When cleanup_channel is called, we know that we wanted to destroy it. Otherwise the channel to the other peer was destroyed.

Definition at line 237 of file rps.h.

237  {
242 
243  /* IN_OTHER_GOSSIP_LIST = 0x02, unneeded? */
244  /* IN_OWN_SAMPLER_LIST = 0x04, unneeded? */
245  /* IN_OWN_GOSSIP_LIST = 0x08, unneeded? */
246 
250  Peers_ONLINE = 0x20,
251 
257  Peers_TO_DESTROY = 0x40,
258 };
If we are waiting for a reply from that peer (sent a pull request).
Definition: rps.h:241
We set this bit when we are going to destroy the channel to this peer.
Definition: rps.h:257
We set this bit when we know the peer is online.
Definition: rps.h:250

◆ Peers_ChannelFlags

Keep track of the status of a channel.

This is needed in order to know what to do with a channel when it's destroyed.

Enumerator
Peers_CHANNEL_ESTABLISHED_TWICE 

We destroyed the channel because the other peer established a second one.

Peers_CHANNEL_CLEAN 

The channel was removed because it was not needed any more.

This should be the sending channel.

Peers_CHANNEL_DESTROING 

We destroyed the channel because the other peer established a second one.

Definition at line 266 of file rps.h.

266  {
271 
276  Peers_CHANNEL_CLEAN = 0x2,
277 
282 };
We destroyed the channel because the other peer established a second one.
Definition: rps.h:270
We destroyed the channel because the other peer established a second one.
Definition: rps.h:281
The channel was removed because it was not needed any more.
Definition: rps.h:276

◆ Peers_ChannelRole

The role of a channel.

Sending or receiving.

Enumerator
Peers_CHANNEL_ROLE_SENDING 

Channel is used for sending.

Peers_CHANNEL_ROLE_RECEIVING 

Channel is used for receiving.

Definition at line 288 of file rps.h.

288  {
293 
298 };
Channel is used for receiving.
Definition: rps.h:297
Channel is used for sending.
Definition: rps.h:292

Variable Documentation

◆ stats

struct GNUNET_STATISTICS_Handle* stats

Handle to the statistics service.

Definition at line 115 of file gnunet-service-cadet.c.