Changeset 33:e6fcdf12b9a0 in freeDiameter for freeDiameter/fD.h
- Timestamp:
- Oct 29, 2009, 6:05:45 PM (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
freeDiameter/fD.h
r31 r33 42 42 #include <freeDiameter/freeDiameter.h> 43 43 44 #ifdef DISABLE_SCTP 45 #undef IPPROTO_SCTP 46 #define IPPROTO_SCTP (2 = 4) /* some compilation error to spot the references */ 47 #endif /* DISABLE_SCTP */ 48 44 49 /* Timeout for establishing a connection */ 45 50 #ifndef CNX_TIMEOUT … … 102 107 103 108 /* Chaining in peers sublists */ 104 struct fd_list p_actives; /* list of peers in the STATE_OPEN state -- faster routing creation*/109 struct fd_list p_actives; /* list of peers in the STATE_OPEN state -- used by routing */ 105 110 struct fd_list p_expiry; /* list of expiring peers, ordered by their timeout value */ 106 111 struct timespec p_exp_timer; /* Timestamp where the peer will expire; updated each time activity is seen on the peer (except DW) */ … … 124 129 struct timespec p_psm_timer; 125 130 126 /* Received message queue, and thread managing reception of messages */127 struct fifo *p_recv;128 pthread_t p_inthr;129 130 131 /* Outgoing message queue, and thread managing sending the messages */ 131 132 struct fifo *p_tosend; … … 138 139 struct fd_list p_sentreq; 139 140 140 /* connection context: socket , callbacks and soon */141 /* connection context: socket and related information */ 141 142 struct cnxctx *p_cnxctx; 142 143 143 /* Callback on initial connection success / failure */ 144 /* Callback for peer validation after the handshake */ 145 int (*p_cb2)(struct peer_info *); 146 147 /* Callback on initial connection success / failure after the peer was added */ 144 148 void (*p_cb)(struct peer_info *, void *); 145 149 void *p_cb_data; … … 173 177 174 178 }; 179 #define CHECK_PEVENT( _e ) \ 180 (((int)(_e) >= FDEVP_DUMP_ALL) && ((int)(_e) <= FDEVP_PSM_TIMEOUT)) 181 /* The following macro is actually called in p_psm.c -- another solution would be to declare it static inline */ 182 #define DECLARE_PEV_STR() \ 183 const char * fd_pev_str(int event) \ 184 { \ 185 switch (event) { \ 186 case_str(FDEVP_DUMP_ALL); \ 187 case_str(FDEVP_TERMINATE); \ 188 case_str(FDEVP_CNX_MSG_RECV); \ 189 case_str(FDEVP_CNX_ERROR); \ 190 case_str(FDEVP_CNX_EP_CHANGE); \ 191 case_str(FDEVP_CNX_INCOMING); \ 192 case_str(FDEVP_PSM_TIMEOUT); \ 193 } \ 194 TRACE_DEBUG(FULL, "Unknown event : %d", event); \ 195 return "Unknown event"; \ 196 } 175 197 const char * fd_pev_str(int event); 176 #define CHECK_EVENT( _e ) \177 (((int)(_e) >= FDEVP_DUMP_ALL) && ((int)(_e) <= FDEVP_PSM_TIMEOUT))178 198 179 199 /* The data structure for FDEVP_CNX_INCOMING events */ … … 211 231 int fd_psm_terminate(struct fd_peer * peer ); 212 232 void fd_psm_abord(struct fd_peer * peer ); 233 234 /* Peer out */ 235 int fd_out_send(struct msg ** msg, struct cnxctx * cnx, struct fd_peer * peer); 236 int fd_out_start(struct fd_peer * peer); 237 int fd_out_stop(struct fd_peer * peer); 238 239 /* Active peers -- routing process should only ever take the read lock, the write lock is managed by PSMs */ 240 extern struct fd_list fd_g_activ_peers; 241 extern pthread_rwlock_t fd_g_activ_peers_rw; /* protect the list */ 242 213 243 214 244 /* Server sockets */
Note: See TracChangeset
for help on using the changeset viewer.