proto_ipv4: don't trim length of pkt_buff
[netsniff-ng.git] / src / tprintf.h
blobfa6f8cefa3d61aac7b3d71d78e1cf8309db27b31
1 /*
2 * netsniff-ng - the packet sniffing beast
3 * By Daniel Borkmann <daniel@netsniff-ng.org>
4 * Copyright 2009, 2010 Daniel Borkmann.
5 * Subject to the GPL, version 2.
6 */
8 #ifndef TPRINTF_H
9 #define TPRINTF_H
11 #define DEFAULT_TTY_SIZE 80
13 extern void tprintf_init(void);
14 extern void tprintf(char *msg, ...);
15 extern void tprintf_flush(void);
16 extern void tprintf_cleanup(void);
17 extern size_t tprintf_get_free_count(void);
19 #define __reset "0"
20 #define __bold "1"
21 #define __black "30"
22 #define __red "31"
23 #define __green "32"
24 #define __yellow "33"
25 #define __blue "34"
26 #define __magenta "35"
27 #define __cyan "36"
28 #define __white "37"
29 #define __on_black "40"
30 #define __on_red "41"
31 #define __on_green "42"
32 #define __on_yellow "43"
33 #define __on_blue "44"
34 #define __on_magenta "45"
35 #define __on_cyan "46"
36 #define __on_white "47"
38 #define colorize_start(fore) "\033[" __##fore "m"
39 #define colorize_start_full(fore, back) "\033[" __##fore ";" __on_##back "m"
40 #define colorize_end() "\033[" __reset "m"
41 #define colorize_str(fore, text) \
42 colorize_start(fore) text colorize_end()
43 #define colorize_full_str(fore, back, text) \
44 colorize_start_full(fore, back) text colorize_end()
46 #endif /* TPRINTF_H */