Changeset 14:14cf6daf716d in freeDiameter for include
- Timestamp:
- Oct 1, 2009, 6:24:07 PM (15 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- include/freeDiameter
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
include/freeDiameter/freeDiameter.h
r13 r14 141 141 ,FDEV_DUMP_PEERS /* Dump the list of peers */ 142 142 }; 143 143 const char * fd_ev_str(int event); 144 144 145 145 … … 151 151 enum peer_state { 152 152 /* Stable states */ 153 STATE_ DISABLED = 1, /* No connexion must be attempted / only this state means that the peer PSM thread is not running*/153 STATE_ZOMBIE = 0, /* The threads handling the peer are not running for some reason */ 154 154 STATE_OPEN, /* Connexion established */ 155 155 … … 167 167 /* Failover state machine */ 168 168 STATE_SUSPECT, /* A DWR was sent and not answered within TwTime. Failover in progress. */ 169 STATE_REOPEN /* Connection has been re-established, waiting for 3 DWR/DWA exchanges before putting back to service */169 STATE_REOPEN, /* Connection has been re-established, waiting for 3 DWR/DWA exchanges before putting back to service */ 170 170 }; 171 171 extern const char *peer_state_str[]; 172 172 #define STATE_STR(state) \ 173 peer_state_str[ ((unsigned)(state)) <= STATE_REOPEN ? ((unsigned)(state)) : 0 ]173 (((unsigned)(state)) <= STATE_REOPEN ? peer_state_str[((unsigned)(state)) ] : "<Invalid>") 174 174 175 175 /* Information about a remote peer. Same structure is used for creating a new entry, but not all fields are meaningful in that case */ … … 238 238 } pi_sec_data; 239 239 240 /* The remaining information is read-only,not used for peer creation */240 /* The remaining information must not be modified, and is not used for peer creation */ 241 241 enum peer_state pi_state; 242 242 uint32_t pi_vendorid; /* Content of the Vendor-Id AVP, or 0 by default */ -
include/freeDiameter/libfreeDiameter.h
r13 r14 193 193 #ifndef ERRORS_ON_TODO 194 194 #define TODO( _msg, _args... ) \ 195 TRACE_DEBUG(NONE, _msg , ##_args);195 TRACE_DEBUG(NONE, "TODO: " _msg , ##_args); 196 196 #else /* ERRORS_ON_TODO */ 197 197 #define TODO( _msg, _args... ) \ … … 446 446 }; 447 447 448 #define FD_LIST( _li ) ((struct fd_list *)( _li ))449 450 448 /* Initialize a list element */ 449 #define FD_LIST_INITIALIZER( _list_name ) \ 450 { .next = & _list_name, .prev = & _list_name, .head = & _list_name, .o = NULL } 451 #define FD_LIST_INITIALIZER_O( _list_name, _obj ) \ 452 { .next = & _list_name, .prev = & _list_name, .head = & _list_name, .o = _obj } 451 453 void fd_list_init ( struct fd_list * list, void *obj ); 452 454 453 455 /* Return boolean, true if the list is empty */ 454 #define FD_IS_LIST_EMPTY( _list ) ((( FD_LIST(_list))->head == (_list)) && ((FD_LIST(_list))->next == (_list)))456 #define FD_IS_LIST_EMPTY( _list ) ((((struct fd_list *)(_list))->head == (_list)) && (((struct fd_list *)(_list))->next == (_list))) 455 457 456 458 /* Insert an item in a list at known position */
Note: See TracChangeset
for help on using the changeset viewer.