Files
openairinterface5g/common/utils/T/tracer/utils.h
T
Cedric Roux 2e64d54e9e the tracee (lte-softmodem) now sends the content of T_messages.txt
as special events.

If we store all received events to a file, this dump is now
self-contained. Helps to analyze traces.

Some functions have also been factorized in the process, too much
duplication.

(Also tracer/Makefile was forgotten in previous commit, included
in this one...)
2016-05-25 14:15:47 +02:00

44 lines
1.3 KiB
C

#ifndef _UTILS_H_
#define _UTILS_H_
void new_thread(void *(*f)(void *), void *data);
void sleepms(int ms);
/****************************************************************************/
/* list */
/****************************************************************************/
typedef struct list {
struct list *last, *next;
void *data;
} list;
list *list_remove_head(list *l);
list *list_append(list *l, void *data);
/****************************************************************************/
/* socket */
/****************************************************************************/
void socket_send(int socket, void *buffer, int size);
int get_connection(char *addr, int port);
int fullread(int fd, void *_buf, int count);
/****************************************************************************/
/* buffer */
/****************************************************************************/
typedef struct {
int osize;
int omaxsize;
char *obuf;
} OBUF;
void PUTC(OBUF *o, char c);
void PUTS(OBUF *o, char *s);
void PUTS_CLEAN(OBUF *o, char *s);
void PUTI(OBUF *o, int i);
void PUTUL(OBUF *o, unsigned long i);
#endif /* _UTILS_H_ */