Changeset 895:fbf77629cb7b in freeDiameter for include/freeDiameter/libfdproto.h
- Timestamp:
- Nov 30, 2012, 8:44:10 AM (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
include/freeDiameter/libfdproto.h
r894 r895 203 203 #define FCTS 6 /* Display entry parameters of most functions */ 204 204 #define CALL 9 /* Display calls to most functions (with CHECK macros) */ 205 206 #define TIMING INFO /* Display the message handing time information with this level */207 205 208 206 /* Increment the debug level for a file at compilation time by defining -DTRACE_LEVEL=FULL for example. */ … … 596 594 || (((ts1)->tv_sec == (ts2)->tv_sec ) && ((ts1)->tv_nsec < (ts2)->tv_nsec) )) 597 595 596 /* Compute diff between two timespecs (pointers) */ 597 #define TS_DIFFERENCE( tsdiff, tsstart, tsend ) { \ 598 if ((tsend)->tv_nsec < (tsstart)->tv_nsec ) { \ 599 (tsdiff)->tv_sec = (tsend)->tv_sec - (tsstart)->tv_sec - 1; \ 600 (tsdiff)->tv_nsec = (tsend)->tv_nsec + 1000000000 - (tsstart)->tv_nsec; \ 601 } else { \ 602 (tsdiff)->tv_sec = (tsend)->tv_sec - (tsstart)->tv_sec; \ 603 (tsdiff)->tv_nsec = (tsend)->tv_nsec - (tsstart)->tv_nsec; \ 604 }} 605 606 598 607 /* This gives a good size for buffered reads */ 599 608 #ifndef BUFSIZ … … 2221 2230 FD_MSG_LOG_RECEIVED, /* message received from the network */ 2222 2231 FD_MSG_LOG_SENT, /* message sent to another peer */ 2223 FD_MSG_LOG_NODELIVER /* message could not be delivered to any peer */ 2224 }; 2225 #define FD_MSG_LOG_MAX FD_MSG_LOG_NODELIVER 2232 FD_MSG_LOG_NODELIVER, /* message could not be delivered to any peer */ 2233 FD_MSG_LOG_TIMING /* profiling messages */ 2234 }; 2235 #define FD_MSG_LOG_MAX FD_MSG_LOG_TIMING 2226 2236 void fd_msg_log( enum fd_msg_log_cause cause, struct msg * msg, const char * prefix_format, ... ); 2227 2237 … … 2384 2394 int fd_msg_source_set( struct msg * msg, DiamId_t diamid, size_t diamidlen, int add_rr, struct dictionary * dict ); 2385 2395 int fd_msg_source_get( struct msg * msg, DiamId_t *diamid, size_t * diamidlen ); 2396 2397 /* 2398 * FUNCTION: fd_msg_ts_* 2399 * 2400 * PARAMETERS: 2401 * msg : A msg object. 2402 * ts : A struct timespec pointer, indexed on CLOCK_REALTIME 2403 * 2404 * DESCRIPTION: 2405 * Associate or retrieve timestamps meaningful for the message. 2406 * A timestamp with a value of { 0, 0 } means: not set. 2407 * 2408 * RETURN VALUE: 2409 * 0 : Operation complete. 2410 * !0 : an error occurred. 2411 */ 2412 /* when msg was received from network */ 2413 int fd_msg_ts_set_recv( struct msg * msg, struct timespec * ts ); 2414 int fd_msg_ts_get_recv( struct msg * msg, struct timespec * ts ); 2415 int fd_msg_ts_set_sent( struct msg * msg, struct timespec * ts ); 2416 int fd_msg_ts_get_sent( struct msg * msg, struct timespec * ts ); 2417 2386 2418 2387 2419 /*
Note: See TracChangeset
for help on using the changeset viewer.