24 #include <ortp/port.h>
25 #if defined(ORTP_TIMESTAMP)
31 #define MIN(a,b) (((a)>(b)) ? (b) : (a))
34 #define MAX(a,b) (((a)>(b)) ? (a) : (b))
37 #define return_if_fail(expr) if (!(expr)) {printf("%s:%i- assertion"#expr "failed\n",__FILE__,__LINE__); return;}
38 #define return_val_if_fail(expr,ret) if (!(expr)) {printf("%s:%i- assertion" #expr "failed\n",__FILE__,__LINE__); return (ret);}
44 struct in_addr ipi_addr;
45 struct in6_addr ipi6_addr;
54 struct datab *b_datap;
55 unsigned char *b_rptr;
56 unsigned char *b_wptr;
59 #if defined(ORTP_TIMESTAMP)
60 struct timeval timestamp;
63 struct sockaddr_storage net_addr;
64 socklen_t net_addrlen;
72 unsigned char *db_base;
73 unsigned char *db_lim;
74 void (*db_freefn)(
void*);
88 ORTP_PUBLIC
void qinit(
queue_t *q);
102 ORTP_PUBLIC
void flushq(
queue_t *q,
int how);
104 ORTP_PUBLIC
void mblk_init(
mblk_t *mp);
106 ORTP_PUBLIC
void mblk_meta_copy(
const mblk_t *source,
mblk_t *dest);
109 ORTP_PUBLIC
mblk_t *allocb(
size_t size,
int unused);
113 ORTP_PUBLIC
mblk_t *esballoc(uint8_t *buf,
size_t size,
int pri,
void (*freefn)(
void*) );
116 ORTP_PUBLIC
void freeb(
mblk_t *m);
120 ORTP_PUBLIC
void freemsg(
mblk_t *mp);
129 ORTP_PUBLIC
size_t msgdsize(
const mblk_t *mp);
132 ORTP_PUBLIC
void msgpullup(
mblk_t *mp,
size_t len);
140 ORTP_PUBLIC
mblk_t * appendb(
mblk_t *mp,
const char *data,
size_t size, bool_t pad);
141 ORTP_PUBLIC
void msgappend(
mblk_t *mp,
const char *data,
size_t size, bool_t pad);
145 #define qempty(q) (&(q)->_q_stopper==(q)->_q_stopper.b_next)
146 #define qfirst(q) ((q)->_q_stopper.b_next!=&(q)->_q_stopper ? (q)->_q_stopper.b_next : NULL)
147 #define qbegin(q) ((q)->_q_stopper.b_next)
148 #define qlast(q) ((q)->_q_stopper.b_prev!=&(q)->_q_stopper ? (q)->_q_stopper.b_prev : NULL)
149 #define qend(q,mp) ((mp)==&(q)->_q_stopper)
150 #define qnext(q,mp) ((mp)->b_next)
165 float current_extremum;
166 uint64_t extremum_time;
172 ORTP_PUBLIC
void ortp_extremum_init(
ortp_extremum *obj,
int period);
173 ORTP_PUBLIC
void ortp_extremum_record_min(
ortp_extremum *obj, uint64_t curtime,
float value);
174 ORTP_PUBLIC
void ortp_extremum_record_max(
ortp_extremum *obj, uint64_t curtime,
float value);
175 ORTP_PUBLIC
float ortp_extremum_get_current(
ortp_extremum *obj);
179 ORTP_PUBLIC
float ortp_extremum_get_previous(
ortp_extremum *obj);
Definition: str_utils.h:41
Definition: str_utils.h:49
Definition: str_utils.h:78
Definition: str_utils.h:70
Definition: str_utils.h:152
Definition: str_utils.h:164