The Netsukuku Project  0.0.9
An Alternative routing method
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
request.h File Reference
#include "misc.h"
Include dependency graph for request.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  request_tbl
 

Macros

#define REQUEST_TIMEOUT
 
#define TOTAL_OPS   (ACK_NEGATIVE+1)
 
#define TOTAL_REQUESTS   (ANDNA_GET_COUNT_CACHE+1)
 
#define TOTAL_REPLIES   (TOTAL_OPS-TOTAL_REQUESTS)
 
#define TOTAL_ERRORS   (E_TOO_MANY_CONN+1)
 
#define TOTAL_MAXRQ   31
 
#define OP_FILTER_DROP   1
 
#define OP_FILTER_ALLOW   0
 
#define op_filter_set(op)   SET_BIT(filtered_op, (op))
 
#define op_filter_clr(op)   CLR_BIT(filtered_op, (op))
 
#define op_filter_test(op)   TEST_BIT(filtered_op, (op))
 
#define op_filter_reset(bit)   memset(filtered_op, (bit), sizeof(filtered_op))
 
#define re_strerror(err)   (rq_strerror((err)))
 

Typedefs

typedef struct request_tbl rq_tbl
 

Enumerations

enum  pkt_op {
  ECHO_ME, ECHO_REPLY, GET_FREE_NODES, GET_QSPN_ROUND,
  GET_INTERNET_GWS, SET_FOREIGN_ROUTE, DEL_FOREIGN_ROUTE, NEW_BACKROUTE,
  DELAYED_BROADCAST, SPLIT_ROUTE, SET_NO_IDENTITY, QSPN_CLOSE,
  QSPN_OPEN, QSPN_RFR, GET_DNODEBLOCK, GET_DNODEIP,
  TRACER_PKT, TRACER_PKT_CONNECT, DEL_SNODE, DEL_GNODE,
  GET_INT_MAP, GET_EXT_MAP, GET_BNODE_MAP, ANDNA_REGISTER_HNAME,
  ANDNA_CHECK_COUNTER, ANDNA_RESOLVE_HNAME, ANDNA_RESOLVE_IP, ANDNA_RESOLVE_MX,
  ANDNA_GET_ANDNA_CACHE, ANDNA_GET_SINGLE_ACACHE, ANDNA_SPREAD_SACACHE, ANDNA_GET_COUNT_CACHE,
  PUT_FREE_NODES, PUT_QSPN_ROUND, PUT_INTERNET_GWS, PUT_DNODEIP,
  EMPTY_REPLY_SLOT, EMPTY_REPLY_SLOT1, PUT_INT_MAP, PUT_EXT_MAP,
  PUT_BNODE_MAP, ANDNA_RESOLVE_REPLY, ANDNA_REV_RESOLVE_REPLY, ANDNA_MX_RESOLVE_REPLY,
  ANDNA_PUT_COUNT_CACHE, ANDNA_PUT_ANDNA_CACHE, ACK_AFFERMATIVE, ACK_NEGATIVE
}
 
enum  errors {
  E_INVALID_REQUEST, E_ACCEPT_TBL_FULL, E_REQUEST_TBL_FULL, E_QGROUP_FULL,
  E_NTK_FULL, E_INVALID_SIGNATURE, E_CANNOT_FORWARD, E_ANDNA_WRONG_HASH_GNODE,
  E_ANDNA_QUEUE_FULL, E_ANDNA_UPDATE_TOO_EARLY, E_ANDNA_TOO_MANY_HNAME, E_ANDNA_HUPDATE_MISMATCH,
  E_ANDNA_NO_HNAME, E_ANDNA_CHECK_COUNTER, E_TOO_MANY_CONN
}
 

Functions

void rq_wait_idx_init (int *rq_wait_idx)
 
const u_char * rq_strerror (int err)
 
const u_char * re_to_str (u_char re)
 
const u_char * rq_to_str (u_char rq)
 
int op_verify (u_char)
 
int rq_verify (u_char)
 
int re_verify (u_char)
 
void update_rq_tbl (rq_tbl *)
 
int is_rq_full (u_char, rq_tbl *)
 
int find_free_rq_wait (u_char, rq_tbl *)
 
int add_rq (u_char, rq_tbl *)
 
void op_filter_reset_re (int bit)
 
void op_filter_reset_rq (int bit)
 

Variables

int rq_wait_idx [(ANDNA_GET_COUNT_CACHE+1)]
 
int update_rq_tbl_mutex
 
char filtered_op [(ACK_NEGATIVE+1) >>3]
 

Macro Definition Documentation

#define OP_FILTER_ALLOW   0
#define op_filter_clr (   op)    CLR_BIT(filtered_op, (op))
#define OP_FILTER_DROP   1
#define op_filter_reset (   bit)    memset(filtered_op, (bit), sizeof(filtered_op))
#define op_filter_set (   op)    SET_BIT(filtered_op, (op))
#define op_filter_test (   op)    TEST_BIT(filtered_op, (op))
#define re_strerror (   err)    (rq_strerror((err)))
#define REQUEST_TIMEOUT
Value:
300 /* The timeout in seconds for all the
requests */
#define TOTAL_ERRORS   (E_TOO_MANY_CONN+1)
#define TOTAL_MAXRQ   31
#define TOTAL_OPS   (ACK_NEGATIVE+1)
#define TOTAL_REPLIES   (TOTAL_OPS-TOTAL_REQUESTS)
#define TOTAL_REQUESTS   (ANDNA_GET_COUNT_CACHE+1)

Typedef Documentation

typedef struct request_tbl rq_tbl

Enumeration Type Documentation

enum errors
Enumerator
E_INVALID_REQUEST 
E_ACCEPT_TBL_FULL 
E_REQUEST_TBL_FULL 
E_QGROUP_FULL 
E_NTK_FULL 
E_INVALID_SIGNATURE 
E_CANNOT_FORWARD 
E_ANDNA_WRONG_HASH_GNODE 
E_ANDNA_QUEUE_FULL 
E_ANDNA_UPDATE_TOO_EARLY 
E_ANDNA_TOO_MANY_HNAME 
E_ANDNA_HUPDATE_MISMATCH 
E_ANDNA_NO_HNAME 
E_ANDNA_CHECK_COUNTER 
E_TOO_MANY_CONN 
enum pkt_op
Enumerator
ECHO_ME 
ECHO_REPLY 
GET_FREE_NODES 
GET_QSPN_ROUND 
GET_INTERNET_GWS 
SET_FOREIGN_ROUTE 
DEL_FOREIGN_ROUTE 
NEW_BACKROUTE 
DELAYED_BROADCAST 
SPLIT_ROUTE 
SET_NO_IDENTITY 
QSPN_CLOSE 
QSPN_OPEN 
QSPN_RFR 
GET_DNODEBLOCK 
GET_DNODEIP 
TRACER_PKT 
TRACER_PKT_CONNECT 
DEL_SNODE 
DEL_GNODE 
GET_INT_MAP 
GET_EXT_MAP 
GET_BNODE_MAP 
ANDNA_REGISTER_HNAME 
ANDNA_CHECK_COUNTER 
ANDNA_RESOLVE_HNAME 
ANDNA_RESOLVE_IP 
ANDNA_RESOLVE_MX 
ANDNA_GET_ANDNA_CACHE 
ANDNA_GET_SINGLE_ACACHE 
ANDNA_SPREAD_SACACHE 
ANDNA_GET_COUNT_CACHE 
PUT_FREE_NODES 
PUT_QSPN_ROUND 
PUT_INTERNET_GWS 
PUT_DNODEIP 
EMPTY_REPLY_SLOT 
EMPTY_REPLY_SLOT1 
PUT_INT_MAP 
PUT_EXT_MAP 
PUT_BNODE_MAP 
ANDNA_RESOLVE_REPLY 
ANDNA_REV_RESOLVE_REPLY 
ANDNA_MX_RESOLVE_REPLY 
ANDNA_PUT_COUNT_CACHE 
ANDNA_PUT_ANDNA_CACHE 
ACK_AFFERMATIVE 
ACK_NEGATIVE 

Function Documentation

int add_rq ( u_char  ,
rq_tbl  
)

Here is the call graph for this function:

Here is the caller graph for this function:

int find_free_rq_wait ( u_char  ,
rq_tbl  
)

Here is the caller graph for this function:

int is_rq_full ( u_char  ,
rq_tbl  
)

Here is the call graph for this function:

Here is the caller graph for this function:

void op_filter_reset_re ( int  bit)

Here is the caller graph for this function:

void op_filter_reset_rq ( int  bit)
int op_verify ( u_char  )

Here is the caller graph for this function:

const u_char* re_to_str ( u_char  re)

Here is the call graph for this function:

Here is the caller graph for this function:

int re_verify ( u_char  )

Here is the call graph for this function:

Here is the caller graph for this function:

const u_char* rq_strerror ( int  err)

Here is the call graph for this function:

Here is the caller graph for this function:

const u_char* rq_to_str ( u_char  rq)

Here is the call graph for this function:

Here is the caller graph for this function:

int rq_verify ( u_char  )

Here is the caller graph for this function:

void rq_wait_idx_init ( int *  rq_wait_idx)

Here is the caller graph for this function:

void update_rq_tbl ( rq_tbl )

Here is the caller graph for this function:

Variable Documentation

char filtered_op[(ACK_NEGATIVE+1) >>3]
int rq_wait_idx[(ANDNA_GET_COUNT_CACHE+1)]
int update_rq_tbl_mutex