diff --git a/src/fnettrace-dns/main.c b/src/fnettrace-dns/main.c index d4cba4bb2..f35d60019 100644 --- a/src/fnettrace-dns/main.c +++ b/src/fnettrace-dns/main.c @@ -17,15 +17,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include "fnettrace_dns.h" -#include "../include/gcov_wrapper.h" -#include -#include -#include -#include -#include -#include -#define MAX_BUF_SIZE (64 * 1024) +#include "../include/fnettrace_common.h" static int arg_nolocal = 0; static char last[512] = {'\0'}; diff --git a/src/fnettrace-icmp/fnettrace_icmp.h b/src/fnettrace-icmp/fnettrace_icmp.h deleted file mode 100644 index f6e1daf1f..000000000 --- a/src/fnettrace-icmp/fnettrace_icmp.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2014-2026 Firejail Authors - * - * This file is part of firejail project - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ -#ifndef FNETTRACE_SNI_H -#define FNETTRACE_SNI_H - -#include "../include/common.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif diff --git a/src/fnettrace-icmp/main.c b/src/fnettrace-icmp/main.c index 4c39a7544..5ab993f1c 100644 --- a/src/fnettrace-icmp/main.c +++ b/src/fnettrace-icmp/main.c @@ -17,15 +17,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include "fnettrace_icmp.h" -#include "../include/gcov_wrapper.h" -#include -#include -#include -#include -#include -#include -#define MAX_BUF_SIZE (64 * 1024) +#include "../include/fnettrace_common.h" char *type_description[19] = { "Echo reply", diff --git a/src/fnettrace-sni/fnettrace_sni.h b/src/fnettrace-sni/fnettrace_sni.h deleted file mode 100644 index f6e1daf1f..000000000 --- a/src/fnettrace-sni/fnettrace_sni.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2014-2026 Firejail Authors - * - * This file is part of firejail project - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ -#ifndef FNETTRACE_SNI_H -#define FNETTRACE_SNI_H - -#include "../include/common.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif diff --git a/src/fnettrace-sni/main.c b/src/fnettrace-sni/main.c index 0ad15cc03..16482d76c 100644 --- a/src/fnettrace-sni/main.c +++ b/src/fnettrace-sni/main.c @@ -17,15 +17,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include "fnettrace_sni.h" -#include "../include/gcov_wrapper.h" -#include -#include -#include -#include -#include -#include -#define MAX_BUF_SIZE (64 * 1024) +#include "../include/fnettrace_common.h" static char last[512] = {'\0'}; diff --git a/src/fnettrace-dns/fnettrace_dns.h b/src/include/fnettrace_common.h similarity index 77% rename from src/fnettrace-dns/fnettrace_dns.h rename to src/include/fnettrace_common.h index f7501269d..5e174f482 100644 --- a/src/fnettrace-dns/fnettrace_dns.h +++ b/src/include/fnettrace_common.h @@ -17,18 +17,20 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef FNETTRACE_DNS_H -#define FNETTRACE_DNS_H +#ifndef FNETTRACE_COMMON_H +#define FNETTRACE_COMMON_H -#include "../include/common.h" -#include -#include -#include -#include -#include +#include "common.h" +#include "gcov_wrapper.h" + +#include #include -#include -#include -#include +#include +#include +#include +#include +#include + +#define MAX_BUF_SIZE (64 * 1024) #endif