From 5ead7d42066286031cdd75b833fc9d3a2f6b3a53 Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Tue, 4 Jun 2013 12:22:03 +0200 Subject: [PATCH] misc: cleanup header comments Remove header comments where appropriate. And also clean up colorize a bit. Signed-off-by: Daniel Borkmann --- bpf.h | 6 ------ built_in.h | 9 ++------- colorize.h | 8 ++++++++ colors.h | 5 ----- csum.h | 6 ------ ct_servmgmt.h | 6 ------ ct_usermgmt.h | 6 ------ curvetun.h | 6 ------ geoip.h | 6 ------ hash.h | 8 +------- ipv4.h | 7 ------- ipv6.h | 7 ------- locking.h | 6 ------ mac80211.h | 6 ------ oui.h | 6 ------ protos.h | 6 ------ tprintf.h | 11 +---------- trafgen_conf.h | 6 ------ xmalloc.h | 6 ------ 19 files changed, 12 insertions(+), 115 deletions(-) create mode 100644 colorize.h diff --git a/bpf.h b/bpf.h index 942f54e6..4e5fd311 100644 --- a/bpf.h +++ b/bpf.h @@ -1,9 +1,3 @@ -/* - * netsniff-ng - the packet sniffing beast - * Copyright 2009, 2010 Daniel Borkmann. - * Subject to the GPL, version 2. - */ - #ifndef BPF_I_H #define BPF_I_H diff --git a/built_in.h b/built_in.h index ea812578..1cca2d78 100644 --- a/built_in.h +++ b/built_in.h @@ -1,13 +1,8 @@ -/* - * netsniff-ng - the packet sniffing beast - * Copyright 2009-2012 Daniel Borkmann. - * Parts taken from the Linux kernel, GPL, version 2. - * Subject to the GPL, version 2. - */ - #ifndef BUILT_IN_H #define BUILT_IN_H +/* Parts taken from the Linux kernel, GPL, version 2. */ + #include #include #include diff --git a/colorize.h b/colorize.h new file mode 100644 index 00000000..928deb2c --- /dev/null +++ b/colorize.h @@ -0,0 +1,8 @@ +#ifndef COLORIZE_H +#define COLORIZE_H + +#define colorize_start(fore) "\033[" __##fore "m" +#define colorize_start_full(fore, back) "\033[" __##fore ";" __on_##back "m" +#define colorize_end() "\033[" __reset "m" + +#endif /* COLORIZE_H */ diff --git a/colors.h b/colors.h index 7675583a..ee4cd12f 100644 --- a/colors.h +++ b/colors.h @@ -1,8 +1,3 @@ -/* netsniff-ng - the packet sniffing beast - * Copyright 2009, 2010 Daniel Borkmann. - * Subject to the GPL, version 2. - */ - #ifndef COLORS_H #define COLORS_H diff --git a/csum.h b/csum.h index fceef2c0..cf4599a6 100644 --- a/csum.h +++ b/csum.h @@ -1,9 +1,3 @@ -/* - * netsniff-ng - the packet sniffing beast - * Copyright 2010 Emmanuel Roullit. - * Subject to the GPL, version 2. - */ - #ifndef CSUM_H #define CSUM_H diff --git a/ct_servmgmt.h b/ct_servmgmt.h index 228a08a2..9c5cd848 100644 --- a/ct_servmgmt.h +++ b/ct_servmgmt.h @@ -1,9 +1,3 @@ -/* - * netsniff-ng - the packet sniffing beast - * Copyright 2011 Daniel Borkmann. - * Subject to the GPL, version 2. - */ - #ifndef CT_SERVMGMT_H #define CT_SERVMGMT_H diff --git a/ct_usermgmt.h b/ct_usermgmt.h index d7caae0c..ff9d6016 100644 --- a/ct_usermgmt.h +++ b/ct_usermgmt.h @@ -1,9 +1,3 @@ -/* - * netsniff-ng - the packet sniffing beast - * Copyright 2011 Daniel Borkmann. - * Subject to the GPL, version 2. - */ - #ifndef CT_USERMGMT_H #define CT_USERMGMT_H diff --git a/curvetun.h b/curvetun.h index 76b2a8fc..46a3d4b7 100644 --- a/curvetun.h +++ b/curvetun.h @@ -1,9 +1,3 @@ -/* - * netsniff-ng - the packet sniffing beast - * Copyright 2011 Daniel Borkmann. - * Subject to the GPL, version 2. - */ - #ifndef CURVETUN_H #define CURVETUN_H diff --git a/geoip.h b/geoip.h index 2098ef8c..b6884e72 100644 --- a/geoip.h +++ b/geoip.h @@ -1,9 +1,3 @@ -/* - * netsniff-ng - the packet sniffing beast - * Copyright 2013 Daniel Borkmann. - * Subject to the GPL, version 2. - */ - #ifndef GEOIPH_H #define GEOIPH_H diff --git a/hash.h b/hash.h index 8e261743..84c222a8 100644 --- a/hash.h +++ b/hash.h @@ -1,9 +1,3 @@ -/* - * netsniff-ng - the packet sniffing beast - * Copyright 2009, 2010 Daniel Borkmann. - * Subject to the GPL, version 2. - */ - #ifndef HASH_H #define HASH_H @@ -83,4 +77,4 @@ static inline unsigned int hash_name(const char *name, int namelen) return hash; } -#endif +#endif /* HASH_H */ diff --git a/ipv4.h b/ipv4.h index 98a17039..70048134 100644 --- a/ipv4.h +++ b/ipv4.h @@ -1,10 +1,3 @@ -/* - * netsniff-ng - the packet sniffing beast - * Copyright (C) 2009, 2010 Daniel Borkmann - * Copyright (C) 2012 Christoph Jaeger - * Subject to the GPL, version 2. - */ - #ifndef IPV4_H #define IPV4_H diff --git a/ipv6.h b/ipv6.h index a55a5657..29e86a07 100644 --- a/ipv6.h +++ b/ipv6.h @@ -1,10 +1,3 @@ -/* - * netsniff-ng - the packet sniffing beast - * Copyright (C) 2009, 2010 Daniel Borkmann - * Copyright (C) 2012 Christoph Jaeger - * Subject to the GPL, version 2. - */ - #ifndef IPV6_H #define IPV6_H diff --git a/locking.h b/locking.h index 3d27939c..95f13418 100644 --- a/locking.h +++ b/locking.h @@ -1,9 +1,3 @@ -/* - * netsniff-ng - the packet sniffing beast - * Copyright 2011 Daniel Borkmann. - * Subject to the GPL, version 2. - */ - #ifndef LOCKING_H #define LOCKING_H diff --git a/mac80211.h b/mac80211.h index 9d340ac1..78036257 100644 --- a/mac80211.h +++ b/mac80211.h @@ -1,9 +1,3 @@ -/* - * netsniff-ng - the packet sniffing beast - * Copyright 2012 Daniel Borkmann. - * Subject to the GPL, version 2. - */ - #ifndef MAC80211_H #define MAC80211_H diff --git a/oui.h b/oui.h index 4ad616e0..564e4a1e 100644 --- a/oui.h +++ b/oui.h @@ -1,9 +1,3 @@ -/* - * netsniff-ng - the packet sniffing beast - * Copyright 2012 Daniel Borkmann. - * Subject to the GPL, version 2. - */ - #ifndef OUI_H #define OUI_H diff --git a/protos.h b/protos.h index 127e1d37..23bf7449 100644 --- a/protos.h +++ b/protos.h @@ -1,9 +1,3 @@ -/* - * netsniff-ng - the packet sniffing beast - * Copyright 2009, 2010 Daniel Borkmann. - * Subject to the GPL, version 2. - */ - #ifndef PROTOS_H #define PROTOS_H diff --git a/tprintf.h b/tprintf.h index dc4349af..b2ca69ea 100644 --- a/tprintf.h +++ b/tprintf.h @@ -1,14 +1,9 @@ -/* - * netsniff-ng - the packet sniffing beast - * Copyright 2009, 2010 Daniel Borkmann. - * Subject to the GPL, version 2. - */ - #ifndef TPRINTF_H #define TPRINTF_H #include "built_in.h" #include "colors.h" +#include "colorize.h" extern void tprintf_init(void); extern void tprintf(char *msg, ...) __check_format_printf(1, 2); @@ -18,10 +13,6 @@ extern void tprintf_cleanup(void); extern void tputchar_safe(int c); extern void tputs_safe(const char *str, size_t len); -#define colorize_start(fore) "\033[" __##fore "m" -#define colorize_start_full(fore, back) "\033[" __##fore ";" __on_##back "m" -#define colorize_end() "\033[" __reset "m" - #define DEFAULT_TTY_SIZE 80 #endif /* TPRINTF_H */ diff --git a/trafgen_conf.h b/trafgen_conf.h index 7281b59b..f92e14c2 100644 --- a/trafgen_conf.h +++ b/trafgen_conf.h @@ -1,9 +1,3 @@ -/* - * netsniff-ng - the packet sniffing beast - * Copyright 2009, 2010 Daniel Borkmann. - * Subject to the GPL, version 2. - */ - #ifndef TRAFGEN_CONF #define TRAFGEN_CONF diff --git a/xmalloc.h b/xmalloc.h index 3285eb32..21ce84de 100644 --- a/xmalloc.h +++ b/xmalloc.h @@ -1,9 +1,3 @@ -/* - * netsniff-ng - the packet sniffing beast - * Copyright 2009, 2010 Daniel Borkmann. - * Subject to the GPL, version 2. - */ - #ifndef XMALLOC_H #define XMALLOC_H -- 2.11.4.GIT