Gentoo Archives: gentoo-commits

From: Jeroen Roovers <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/sniffit/files/, net-analyzer/sniffit/
Date: Fri, 31 Jan 2020 21:59:07
Message-Id: 1580507938.457fd2e783ff78605a8811bd088b407e8d41df7d.jer@gentoo
1 commit: 457fd2e783ff78605a8811bd088b407e8d41df7d
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jan 31 21:58:40 2020 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 31 21:58:58 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=457fd2e7
7
8 net-analyzer/sniffit: Fix CFLAGS=-fno-common
9
10 Package-Manager: Portage-2.3.86, Repoman-2.3.20
11 Closes: https://bugs.gentoo.org/show_bug.cgi?id=707406
12 Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
13
14 .../sniffit/files/sniffit-0.4.0-fno-common.patch | 181 +++++++++++++++++++++
15 net-analyzer/sniffit/sniffit-0.4.0.ebuild | 1 +
16 2 files changed, 182 insertions(+)
17
18 diff --git a/net-analyzer/sniffit/files/sniffit-0.4.0-fno-common.patch b/net-analyzer/sniffit/files/sniffit-0.4.0-fno-common.patch
19 new file mode 100644
20 index 00000000000..6a576acf1d2
21 --- /dev/null
22 +++ b/net-analyzer/sniffit/files/sniffit-0.4.0-fno-common.patch
23 @@ -0,0 +1,181 @@
24 +--- a/src/sn_data.h
25 ++++ b/src/sn_data.h
26 +@@ -101,7 +101,7 @@
27 + char IP[256];
28 + unsigned long SNIFLEN; /* bytes we need to snif */
29 + short DEST_PORT, SRC_PORT; /* destination port */
30 +-char non_printable, *logging_device;
31 ++char non_printable;
32 +
33 + /**** Global data (packets) *************************************************/
34 + int PROTO_HEAD; /* Base Protocol head length (ethernet, PPP ,....) */
35 +@@ -147,43 +147,6 @@
36 + /**** Global data (plugins) *************************************************/
37 + char Plugin_Active[10];
38 +
39 +-/**** Global data (interactive) *********************************************/
40 +-#ifdef INCLUDE_INTERFACE
41 +-
42 +-/**** shared memory pointers ************************************************/
43 +-char *SHARED, *connection_data, *timing, *running_connections,
44 +- *logged_connections;
45 +-int *LISTlength, *DATAlength, memory_id;
46 +-unsigned int *TCP_nr_of_packets, *ICMP_nr_of_packets, *UDP_nr_of_packets;
47 +-unsigned int *IP_nr_of_packets;
48 +-unsigned long *TCP_bytes_in_packets, *UDP_bytes_in_packets;
49 +-int *DESC_LEN;
50 +-
51 +-/**** data structures *******************************************************/
52 +-struct snif_mask *mask;
53 +-struct shared_logged_conn *log_conn;
54 +-FILE *log_dev_stream;
55 +-struct stat log_dev_stat;
56 +-
57 +-volatile int LOGGING=0, screen_busy=0;
58 +-char PACKET_INFO;
59 +-int POINTpos=0, LISTpos=0;
60 +-unsigned char COLOR_AVAIL=0;
61 +-
62 +-/**** screen **************************************************************/
63 +-int MASK_WINDOW_ROWS, MASK_WINDOW_COLS;
64 +-int MAIN_WINDOW_ROWS, MAIN_WINDOW_COLS;
65 +-int INFO_WINDOW_ROWS, INFO_WINDOW_COLS;
66 +-int DATA_WINDOW_ROWS, DATA_WINDOW_COLS;
67 +-int INFO_WINDOW_X, INFO_WINDOW_Y;
68 +-int MASK_WINDOW_X, MASK_WINDOW_Y;
69 +-int DATA_WINDOW_X, DATA_WINDOW_Y;
70 +-
71 +-WINDOW *menu_window;
72 +-struct box_window data_box, main_box, mask_box, packets_box;
73 +-int Pid=0;
74 +-#endif
75 +-
76 + /* DEBUG section */
77 + #ifdef DEBUG
78 + FILE *debug_dev;
79 +--- a/src/sn_global.h
80 ++++ b/src/sn_global.h
81 +@@ -4,7 +4,6 @@
82 + /* currently some option data */
83 +
84 + char SNIFMODE, DUMPMODE, PROTOCOLS, ASC, WILDCARD, CFG_FILE, NO_CHKSUM;
85 +-char INTERACTIVE_EXTEND;
86 + int LOGPARAM;
87 + /* All option shit */
88 +
89 +--- a/src/sn_interface.c
90 ++++ b/src/sn_interface.c
91 +@@ -18,37 +18,37 @@
92 + #include "sn_generation.h"
93 + #include "sn_resolv.h"
94 +
95 +-/*** extern stuff ********/
96 +-extern char *SHARED, *connection_data, *timing, *running_connections,
97 ++/*** global stuff ********/
98 ++char *SHARED, *connection_data, *timing, *running_connections,
99 + *logged_connections;
100 +-extern int *LISTlength, *DATAlength, memory_id;
101 +-extern unsigned int *TCP_nr_of_packets, *ICMP_nr_of_packets, *UDP_nr_of_packets; unsigned int *IP_nr_of_packets;
102 +-extern unsigned long *TCP_bytes_in_packets, *UDP_bytes_in_packets;
103 +-extern int *DESC_LEN; /* For the connection desciption */
104 +-
105 +-extern char INTERACTIVE_EXTEND;
106 +-
107 +-extern struct snif_mask *mask;
108 +-extern struct shared_logged_conn *log_conn;
109 +-extern FILE *log_dev_stream;
110 +-extern struct stat log_dev_stat;
111 +-
112 +-extern volatile int LOGGING, screen_busy;
113 +-extern char PACKET_INFO;
114 +-extern int POINTpos, LISTpos;
115 +-extern unsigned char COLOR_AVAIL;
116 +-
117 +-extern WINDOW *menu_window;
118 +-extern struct box_window data_box, main_box, mask_box, packets_box;
119 +-extern int Pid;
120 +-extern char *logging_device;
121 ++int *LISTlength, *DATAlength, memory_id;
122 ++unsigned int *TCP_nr_of_packets, *ICMP_nr_of_packets, *UDP_nr_of_packets; unsigned int *IP_nr_of_packets;
123 ++unsigned long *TCP_bytes_in_packets, *UDP_bytes_in_packets;
124 ++int *DESC_LEN; /* For the connection desciption */
125 ++
126 ++char INTERACTIVE_EXTEND;
127 ++
128 ++struct snif_mask *mask;
129 ++struct shared_logged_conn *log_conn;
130 ++FILE *log_dev_stream;
131 ++struct stat log_dev_stat;
132 ++
133 ++volatile int LOGGING, screen_busy;
134 ++char PACKET_INFO;
135 ++int POINTpos, LISTpos;
136 ++unsigned char COLOR_AVAIL;
137 ++
138 ++WINDOW *menu_window;
139 ++struct box_window data_box, main_box, mask_box, packets_box;
140 ++int Pid;
141 ++char *logging_device;
142 +
143 +
144 + /*** Screen Parameters ***/
145 +-extern int MASK_WINDOW_ROWS, MASK_WINDOW_COLS, MAIN_WINDOW_ROWS, MAIN_WINDOW_COLS;
146 +-extern int INFO_WINDOW_ROWS, INFO_WINDOW_COLS, DATA_WINDOW_ROWS, DATA_WINDOW_COLS;
147 +-extern int INFO_WINDOW_X, INFO_WINDOW_Y, MASK_WINDOW_X, MASK_WINDOW_Y;
148 +-extern int DATA_WINDOW_X, DATA_WINDOW_Y;
149 ++int MASK_WINDOW_ROWS, MASK_WINDOW_COLS, MAIN_WINDOW_ROWS, MAIN_WINDOW_COLS;
150 ++int INFO_WINDOW_ROWS, INFO_WINDOW_COLS, DATA_WINDOW_ROWS, DATA_WINDOW_COLS;
151 ++int INFO_WINDOW_X, INFO_WINDOW_Y, MASK_WINDOW_X, MASK_WINDOW_Y;
152 ++int DATA_WINDOW_X, DATA_WINDOW_Y;
153 +
154 +
155 + /*** Sreen operations ***/
156 +--- a/src/sn_interface.h
157 ++++ b/src/sn_interface.h
158 +@@ -1,9 +1,46 @@
159 + /* Sniffit Data File */
160 +
161 ++#include <sys/types.h>
162 ++#include <sys/stat.h>
163 ++#include <unistd.h>
164 + #include "pcap.h"
165 +
166 + typedef void (*sig_hand)(int ); /* sighandler_t gave errors, weird */
167 +
168 ++/*** global stuff ********/
169 ++extern unsigned int *IP_nr_of_packets;
170 ++extern char *SHARED, *connection_data, *timing, *running_connections,
171 ++ *logged_connections;
172 ++extern int *LISTlength, *DATAlength, memory_id;
173 ++extern unsigned int *TCP_nr_of_packets, *ICMP_nr_of_packets, *UDP_nr_of_packets;
174 ++extern unsigned int *IP_nr_of_packets;
175 ++extern unsigned long *TCP_bytes_in_packets, *UDP_bytes_in_packets;
176 ++extern int *DESC_LEN; /* For the connection desciption */
177 ++
178 ++extern char INTERACTIVE_EXTEND;
179 ++
180 ++extern struct snif_mask *mask;
181 ++extern struct shared_logged_conn *log_conn;
182 ++extern FILE *log_dev_stream;
183 ++extern struct stat log_dev_stat;
184 ++
185 ++extern volatile int LOGGING, screen_busy;
186 ++extern char PACKET_INFO;
187 ++extern int POINTpos, LISTpos;
188 ++extern unsigned char COLOR_AVAIL;
189 ++
190 ++extern WINDOW *menu_window;
191 ++extern struct box_window data_box, main_box, mask_box, packets_box;
192 ++extern int Pid;
193 ++extern char *logging_device;
194 ++
195 ++
196 ++/*** Screen Parameters ***/
197 ++extern int MASK_WINDOW_ROWS, MASK_WINDOW_COLS, MAIN_WINDOW_ROWS, MAIN_WINDOW_COLS;
198 ++extern int INFO_WINDOW_ROWS, INFO_WINDOW_COLS, DATA_WINDOW_ROWS, DATA_WINDOW_COLS;
199 ++extern int INFO_WINDOW_X, INFO_WINDOW_Y, MASK_WINDOW_X, MASK_WINDOW_Y;
200 ++extern int DATA_WINDOW_X, DATA_WINDOW_Y;
201 ++
202 + int add_itemlist(char *, char *, char *);
203 + void child_exit (void);
204 + void clear_shared_mem(char);
205
206 diff --git a/net-analyzer/sniffit/sniffit-0.4.0.ebuild b/net-analyzer/sniffit/sniffit-0.4.0.ebuild
207 index a4e8e10f506..6761ff0d80e 100644
208 --- a/net-analyzer/sniffit/sniffit-0.4.0.ebuild
209 +++ b/net-analyzer/sniffit/sniffit-0.4.0.ebuild
210 @@ -19,6 +19,7 @@ DEPEND="
211 ${RDEPEND}
212 "
213 PATCHES=(
214 + "${FILESDIR}"/${PN}-0.4.0-fno-common.patch
215 "${FILESDIR}"/${PN}-0.4.0-tinfo.patch
216 )
217 S=${WORKDIR}/${PN}-${P}