Changeset 14:14cf6daf716d in freeDiameter for freeDiameter/fD.h
- Timestamp:
- Oct 1, 2009, 6:24:07 PM (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
freeDiameter/fD.h
r13 r14 42 42 #include <freeDiameter/freeDiameter.h> 43 43 44 /* Timeout for establishing a connection */ 45 #ifndef CNX_TIMEOUT 46 #define CNX_TIMEOUT 10 /* in seconds */ 47 #endif /* CNX_TIMEOUT */ 48 49 /* Timeout for receiving a CER after incoming connection is established */ 50 #ifndef INCNX_TIMEOUT 51 #define INCNX_TIMEOUT 20 /* in seconds */ 52 #endif /* INCNX_TIMEOUT */ 53 54 /* Timeout for receiving a CEA after CER is sent */ 55 #ifndef CEA_TIMEOUT 56 #define CEA_TIMEOUT 10 /* in seconds */ 57 #endif /* CEA_TIMEOUT */ 58 59 /* The timeout value to wait for answer to a DPR */ 60 #ifndef DPR_TIMEOUT 61 #define DPR_TIMEOUT 15 /* in seconds */ 62 #endif /* DPR_TIMEOUT */ 63 44 64 /* Configuration */ 45 65 int fd_conf_init(); … … 49 69 50 70 /* Extensions */ 51 int fd_ext_init();52 71 int fd_ext_add( char * filename, char * conffile ); 53 72 int fd_ext_load(); … … 82 101 char *p_dbgorig; 83 102 84 /* Mutex that protect this peer structure */85 pthread_mutex_t p_mtx;86 87 /* Reference counter -- freed only when this reaches 0 */88 unsigned p_refcount;89 90 103 /* Chaining in peers sublists */ 104 struct fd_list p_actives; /* list of peers in the STATE_OPEN state -- faster routing creation */ 91 105 struct fd_list p_expiry; /* list of expiring peers, ordered by their timeout value */ 92 struct fd_list p_actives; /* list of peers in the STATE_OPEN state -- faster routing creation */ 93 94 /* The next hop-by-hop id value for the link */ 95 uint32_t p_hbh; 106 struct timespec p_exp_timer; /* Timestamp where the peer will expire; updated each time activity is seen on the peer (except DW) */ 96 107 97 108 /* Some flags influencing the peer state machine */ … … 109 120 110 121 /* The events queue, peer state machine thread, timer for states timeouts */ 111 struct fifo *p_events; 122 struct fifo *p_events; /* The mutex of this FIFO list protects also the state and timer information */ 112 123 pthread_t p_psm; 113 124 struct timespec p_psm_timer; … … 121 132 pthread_t p_outthr; 122 133 134 /* The next hop-by-hop id value for the link, only read & modified by p_outthr */ 135 uint32_t p_hbh; 136 123 137 /* Sent requests (for fallback), list of struct sentreq ordered by hbh */ 124 138 struct fd_list p_sentreq; 125 139 126 /* connection context: socket & other metadata*/140 /* connection context: socket, callbacks and so on */ 127 141 struct cnxctx *p_cnxctx; 128 142 … … 145 159 /* A message was received in the peer */ 146 160 ,FDEVP_MSG_INCOMING 161 162 /* The PSM state is expired */ 163 ,FDEVP_PSM_TIMEOUT 147 164 }; 165 const char * fd_pev_str(int event); 148 166 149 167 /* Structure to store a sent request */ … … 154 172 155 173 /* Functions */ 156 int fd_peer_init();157 174 int fd_peer_fini(); 158 175 void fd_peer_dump_list(int details); 159 176 /* fd_peer_add declared in freeDiameter.h */ 160 int fd_peer_rc_decr(struct fd_peer **ptr, int locked);161 177 162 178 /* Peer expiry */ 163 179 int fd_p_expi_init(void); 164 180 int fd_p_expi_fini(void); 165 int fd_p_expi_update(struct fd_peer * peer, int locked ); 166 int fd_p_expi_unlink(struct fd_peer * peer, int locked ); 181 int fd_p_expi_update(struct fd_peer * peer ); 167 182 168 183 /* Peer state machine */
Note: See TracChangeset
for help on using the changeset viewer.