Merge pull request #15098 from donaldsharp/lib_zebra_h_cleanup_2

Lib zebra h cleanup 2
This commit is contained in:
Donatas Abraitis 2024-01-11 14:50:21 +02:00 committed by GitHub
commit 67e8ef293f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
55 changed files with 84 additions and 18 deletions

View file

@ -5,6 +5,8 @@ Copyright 2011 by Matthieu Boutier and Juliusz Chroboczek
/* include zebra library */
#include <zebra.h>
#include <fcntl.h>
#include "getopt.h"
#include "if.h"
#include "log.h"

View file

@ -11,6 +11,7 @@ Copyright 2011, 2012 by Matthieu Boutier and Juliusz Chroboczek
#include <sys/time.h>
#include <sys/param.h>
#include <time.h>
#include <fcntl.h>
#include "babeld.h"

View file

@ -12,6 +12,9 @@
#include <zebra.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/un.h>
#include "bfd.h"

View file

@ -4,6 +4,7 @@
*/
#include <zebra.h>
#include <fcntl.h>
#include "zebra.h"
#include "stream.h"

View file

@ -4,6 +4,7 @@
*/
#include <zebra.h>
#include <sys/stat.h>
#include "log.h"
#include "stream.h"

View file

@ -8,6 +8,9 @@
*/
#include <zebra.h>
#include <fcntl.h>
#if ISIS_METHOD == ISIS_METHOD_BPF
#include <net/if.h>
#include <netinet/if_ether.h>

View file

@ -6,6 +6,7 @@
*/
#include <zebra.h>
#include <sys/stat.h>
#include <sys/un.h>
#include "ldpd.h"

View file

@ -9,6 +9,9 @@
*/
#include <zebra.h>
#include <signal.h>
#include <fcntl.h>
#include <sys/wait.h>
#include "ldpd.h"

View file

@ -9,6 +9,7 @@
*/
#include <zebra.h>
#include <fcntl.h>
#include "ldpd.h"
#include "ldpe.h"

View file

@ -4,6 +4,7 @@
*/
#include <zebra.h>
#include <fcntl.h>
#ifdef SNMP_AGENTX
#include <net-snmp/net-snmp-config.h>

View file

@ -11,6 +11,9 @@
#include <zebra.h>
#include <sys/utsname.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <lib/version.h>
#include "command.h"

View file

@ -6,6 +6,8 @@
/* #define DEBUG */
#include <zebra.h>
#include <signal.h>
#include <sys/resource.h>
#include "frrevent.h"

View file

@ -5,6 +5,9 @@
*/
#include <zebra.h>
#include <signal.h>
#include <pthread.h>
#ifdef HAVE_PTHREAD_NP_H
#include <pthread_np.h>

View file

@ -6,7 +6,11 @@
*/
#include <zebra.h>
#include <signal.h>
#include <sys/stat.h>
#include <sys/un.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/wait.h>

View file

@ -7,6 +7,8 @@
* Copyright (c) 2023, LabN Consulting, L.L.C.
*/
#include <zebra.h>
#include <sys/stat.h>
#include "debug.h"
#include "network.h"
#include "sockopt.h"

View file

@ -5,6 +5,7 @@
*/
#include <zebra.h>
#include <fcntl.h>
#ifdef HAVE_NETNS
#undef _GNU_SOURCE

View file

@ -5,6 +5,7 @@
*/
#include <zebra.h>
#include <fcntl.h>
#include "log.h"
#include "network.h"
#include "lib_errors.h"

View file

@ -5,6 +5,7 @@
*/
#include <zebra.h>
#include <sys/stat.h>
#include "libfrr.h"
#include "lib/version.h"

View file

@ -5,6 +5,7 @@
*/
#include <zebra.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <log.h>
#include "lib/version.h"

View file

@ -7,6 +7,7 @@
*/
#include <zebra.h>
#include <pwd.h>
#include <grp.h>
#ifdef HAVE_LCAPS

View file

@ -4,6 +4,8 @@
*/
#include <zebra.h>
#include <signal.h>
#include <sigevent.h>
#include <log.h>
#include <memory.h>

View file

@ -13,6 +13,7 @@
#include "if.h"
#include <sys/un.h>
#ifdef __OpenBSD__
#include <net/route.h>
#include <netmpls/mpls.h>
#endif

View file

@ -5,6 +5,7 @@
*/
#include <zebra.h>
#include <sys/stat.h>
#include <sys/un.h>
#include "frrevent.h"

View file

@ -4,6 +4,7 @@
*/
#include <zebra.h>
#include <string.h>
#include "vector.h"
#include "memory.h"

View file

@ -6,6 +6,8 @@
#include <zebra.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <lib/version.h>
#include <sys/types.h>
#include <sys/types.h>

View file

@ -17,16 +17,9 @@
#include <stdlib.h>
#include <stddef.h>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
#include <string.h>
#include <pwd.h>
#ifdef HAVE_STROPTS_H
#include <stropts.h>
#endif /* HAVE_STROPTS_H */
#include <sys/select.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/param.h>
#ifdef HAVE_SYS_SYSCTL_H
@ -44,9 +37,7 @@
#endif /* HAVE_SYS_KSYM_H */
#include <sys/time.h>
#include <time.h>
#include <limits.h>
#include <inttypes.h>
#include <stdbool.h>
#ifdef HAVE_SYS_ENDIAN_H
#include <sys/endian.h>
#endif
@ -92,8 +83,6 @@
#include <net/if_var.h>
#endif /* HAVE_NET_IF_VAR_H */
#include <net/route.h>
#ifndef HAVE_NETLINK
#define RT_TABLE_MAIN 0
#define RT_TABLE_LOCAL RT_TABLE_MAIN
@ -122,7 +111,6 @@
#include <netinet6/in.h>
#endif /* HAVE_NETINET6_IN_H */
#ifdef HAVE_NETINET6_IP6_H
#include <netinet6/ip6.h>
#endif /* HAVE_NETINET6_IP6_H */
@ -236,12 +224,6 @@ struct in_pktinfo {
/* default zebra TCP port for zclient */
#define ZEBRA_PORT 2600
/*
* The compiler.h header is used for anyone using the CPP_NOTICE
* since this is universally needed, let's add it to zebra.h
*/
#include "compiler.h"
/* Zebra route's types are defined in route_types.h */
#include "lib/route_types.h"

View file

@ -4,6 +4,8 @@
*/
#include "zebra.h"
#include <sys/stat.h>
#include <fcntl.h>
#ifdef HAVE_GLIBC_BACKTRACE
#include <execinfo.h>

View file

@ -13,6 +13,7 @@
*/
#include "zebra.h"
#include <fcntl.h>
#include "frrsendmmsg.h"

View file

@ -5,6 +5,7 @@
#include "zebra.h"
#include <fcntl.h>
#include <sys/un.h>
#include <syslog.h>

View file

@ -5,6 +5,7 @@
#include "zebra.h"
#include <fcntl.h>
#include <errno.h>
#include <linux/if_packet.h>
#include <sys/ioctl.h>

View file

@ -10,6 +10,7 @@
#include <string.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <fcntl.h>
#include "frrevent.h"
#include "zbuf.h"

View file

@ -4,6 +4,7 @@
*/
#include "zebra.h"
#include <sys/stat.h>
#ifdef CRYPTO_OPENSSL
#include <openssl/evp.h>

View file

@ -5,6 +5,7 @@
*/
#include <zebra.h>
#include <sys/stat.h>
#ifdef CRYPTO_OPENSSL
#include <openssl/evp.h>

View file

@ -5,6 +5,7 @@
*/
#include <zebra.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/socket.h>

View file

@ -7,6 +7,7 @@
*/
#include <zebra.h>
#include <fcntl.h>
#include "qobj.h"
#include "vty.h"

View file

@ -3,6 +3,7 @@
*/
#include <zebra.h>
#include <sys/stat.h>
#include <lib/version.h>
#include "getopt.h"

View file

@ -5,6 +5,7 @@
*/
#include <zebra.h>
#include <sys/stat.h>
#include <lib/version.h>
#include "getopt.h"

View file

@ -7,6 +7,7 @@
*/
#include <zebra.h>
#include <sys/stat.h>
#include "frrevent.h"
#include "vty.h"

View file

@ -5,6 +5,7 @@
*/
#include <zebra.h>
#include <sys/stat.h>
#include "frrevent.h"
#include "vty.h"

View file

@ -3,6 +3,7 @@
*/
#include <zebra.h>
#include <sys/stat.h>
#include <lib/version.h>
#include "getopt.h"

View file

@ -1,4 +1,5 @@
#include <zebra.h>
#include <sys/stat.h>
#include "getopt.h"
#include "frrevent.h"

View file

@ -7,6 +7,7 @@
#define REALLY_NEED_PLAIN_GETOPT 1
#include <zebra.h>
#include <sys/stat.h>
#include <unistd.h>

View file

@ -5,6 +5,7 @@
#include <zebra.h>
#include <pwd.h>
#include <grp.h>
#include <sys/un.h>

View file

@ -5,6 +5,8 @@
#include <zebra.h>
#include <signal.h>
#include <sys/stat.h>
#include <sys/un.h>
#include <setjmp.h>
#include <pwd.h>

View file

@ -6,6 +6,11 @@
*/
#include <zebra.h>
#include <signal.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "frrevent.h"
#include <log.h>
#include <network.h>

View file

@ -6,6 +6,8 @@
*/
#include <zebra.h>
#include <signal.h>
#include <sys/wait.h>
#include "memory.h"

View file

@ -6,6 +6,8 @@
#include <zebra.h>
#include <net/route.h>
#if !defined(GNU_LINUX) && !defined(OPEN_BSD)
#include "if.h"

View file

@ -4,6 +4,7 @@
*/
#include <zebra.h>
#include <fcntl.h>
#ifdef HAVE_NETLINK
#include <linux/netlink.h>

View file

@ -5,6 +5,8 @@
#include <zebra.h>
#include <net/route.h>
#ifndef HAVE_NETLINK
#include <net/if_types.h>

View file

@ -6,6 +6,7 @@
* Donald Sharp
*/
#include <zebra.h>
#include <fcntl.h>
#ifdef HAVE_NETLINK /* Netlink OSes only */

View file

@ -6,6 +6,8 @@
#include <zebra.h>
#include <net/route.h>
#ifndef HAVE_NETLINK
#ifdef __OpenBSD__

View file

@ -6,6 +6,8 @@
#include <zebra.h>
#include <net/route.h>
#if !defined(GNU_LINUX)
#include "memory.h"

View file

@ -4,6 +4,7 @@
*/
#include <zebra.h>
#include <sys/stat.h>
#ifdef HAVE_NETLINK

View file

@ -5,6 +5,8 @@
*/
#include <zebra.h>
#include <sys/stat.h>
#include <fcntl.h>
#ifdef GNU_LINUX
#include <linux/if_link.h>

View file

@ -5,6 +5,7 @@
*/
#include <zebra.h>
#include <fcntl.h>
#ifdef HAVE_NETLINK
#ifdef HAVE_NETNS