comparison freeDiameter/fD.h @ 16:013ce9851131

Started including TLS code
author Sebastien Decugis <sdecugis@nict.go.jp>
date Fri, 02 Oct 2009 18:57:06 +0900
parents 14cf6daf716d
children 277ec00d793e
comparison
equal deleted inserted replaced
15:050f4f6f9f2a 16:013ce9851131
148 #define CHECK_PEER( _p ) \ 148 #define CHECK_PEER( _p ) \
149 (((_p) != NULL) && (((struct fd_peer *)(_p))->p_eyec == EYEC_PEER)) 149 (((_p) != NULL) && (((struct fd_peer *)(_p))->p_eyec == EYEC_PEER))
150 150
151 /* Events codespace for struct fd_peer->p_events */ 151 /* Events codespace for struct fd_peer->p_events */
152 enum { 152 enum {
153 /* Dump all info about this peer in the debug log */
154 FDEVP_DUMP_ALL = 2000
155
153 /* request to terminate this peer : disconnect, requeue all messages */ 156 /* request to terminate this peer : disconnect, requeue all messages */
154 FDEVP_TERMINATE = 2000 157 ,FDEVP_TERMINATE
155
156 /* Dump all info about this peer in the debug log */
157 ,FDEVP_DUMP_ALL
158 158
159 /* A message was received in the peer */ 159 /* A message was received in the peer */
160 ,FDEVP_MSG_INCOMING 160 ,FDEVP_MSG_INCOMING
161 161
162 /* The PSM state is expired */ 162 /* The PSM state is expired */
163 ,FDEVP_PSM_TIMEOUT 163 ,FDEVP_PSM_TIMEOUT
164 }; 164 };
165 const char * fd_pev_str(int event); 165 const char * fd_pev_str(int event);
166 #define CHECK_EVENT( _e ) \
167 (((int)(_e) >= FDEVP_DUMP_ALL) && ((int)(_e) <= FDEVP_PSM_TIMEOUT))
166 168
167 /* Structure to store a sent request */ 169 /* Structure to store a sent request */
168 struct sentreq { 170 struct sentreq {
169 struct fd_list chain; /* the "o" field points directly to the hop-by-hop of the request (uint32_t *) */ 171 struct fd_list chain; /* the "o" field points directly to the hop-by-hop of the request (uint32_t *) */
170 struct msg *req; /* A request that was sent and not yet answered. */ 172 struct msg *req; /* A request that was sent and not yet answered. */
171 }; 173 };
172 174
173 /* Functions */ 175 /* Functions */
174 int fd_peer_fini(); 176 int fd_peer_fini();
175 void fd_peer_dump_list(int details); 177 void fd_peer_dump_list(int details);
178 void fd_peer_dump(struct fd_peer * peer, int details);
179 int fd_peer_alloc(struct fd_peer ** ptr);
180 int fd_peer_free(struct fd_peer ** ptr);
176 /* fd_peer_add declared in freeDiameter.h */ 181 /* fd_peer_add declared in freeDiameter.h */
177 182
178 /* Peer expiry */ 183 /* Peer expiry */
179 int fd_p_expi_init(void); 184 int fd_p_expi_init(void);
180 int fd_p_expi_fini(void); 185 int fd_p_expi_fini(void);
"Welcome to our mercurial repository"