Commit 62eaa836 authored by Sven Eckelmann's avatar Sven Eckelmann Committed by Marek Lindner

batctl: Add missing includes and remove unused includes

Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
parent 5f666b69
......@@ -21,14 +21,15 @@
#include <stdio.h>
#include <stdint.h>
#include <stdio.h>
#include <limits.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <stddef.h>
#include <netinet/ether.h>
#include "main.h"
#include "bat-hosts.h"
#include "hash.h"
#include "functions.h"
......
......@@ -24,7 +24,7 @@
#ifndef _BATCTL_BAT_HOSTS_H
#define _BATCTL_BAT_HOSTS_H
#include <netinet/ether.h>
#include <net/ethernet.h>
#define HOST_NAME_MAX_LEN 50
#define CONF_DIR_LEN 256
......
......@@ -19,14 +19,15 @@
*
*/
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <stddef.h>
#include <netinet/ether.h>
#include "main.h"
#include "bisect_iv.h"
#include "bat-hosts.h"
#include "hash.h"
......
......@@ -23,12 +23,7 @@
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include <dirent.h>
#include "main.h"
#include "debug.h"
#include "debugfs.h"
#include "functions.h"
......
......@@ -22,6 +22,9 @@
#ifndef _BATCTL_DEBUG_H
#define _BATCTL_DEBUG_H
#include <stddef.h>
#include "main.h"
#define DEBUG_BATIF_PATH_FMT "%s/batman_adv/%s"
#define DEBUG_TRANSTABLE_GLOBAL "transtable_global"
#define DEBUG_LOG "log"
......
......@@ -19,14 +19,12 @@
*/
#include "debugfs.h"
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <sys/vfs.h>
#include <sys/types.h>
#include <stdio.h>
#include <string.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/statfs.h>
#ifndef DEBUGFS_MAGIC
#define DEBUGFS_MAGIC 0x64626720
......
......@@ -21,9 +21,6 @@
#ifndef __DEBUGFS_H__
#define __DEBUGFS_H__
#include <sys/mount.h>
#include <string.h>
#ifndef MAX_PATH
# define MAX_PATH 256
#endif
......
......@@ -33,6 +33,8 @@
#include <errno.h>
#include <fcntl.h>
#include <sys/time.h>
#include <netinet/in.h>
#include <stdint.h>
#include "main.h"
#include "functions.h"
......
......@@ -22,7 +22,8 @@
#ifndef _BATCTL_FUNCTIONS_H
#define _BATCTL_FUNCTIONS_H
#include <netinet/if_ether.h>
#include <net/ethernet.h>
#include <stddef.h>
#define ETH_STR_LEN 17
......
......@@ -26,15 +26,14 @@
#include <string.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <linux/if.h>
#include <linux/sockios.h>
#include <linux/ethtool.h>
#include <stdint.h>
#include "main.h"
#include "ioctl.h"
#include "debugfs.h"
/* code borrowed from ethtool */
static int statistics_custom_get(int fd, struct ifreq *ifr)
......
......@@ -19,9 +19,6 @@
*
*/
#include <stddef.h> /* offsetof() */
#ifndef _LINUX_LIST_H
#define _LINUX_LIST_H
......
......@@ -21,9 +21,7 @@
#include <sys/types.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
......@@ -38,7 +36,6 @@
#include "bisect_iv.h"
#include "ioctl.h"
#include "functions.h"
#include <err.h>
char mesh_dfl_iface[] = "bat0";
char module_ver_path[] = "/sys/module/batman_adv/version";
......
......@@ -30,6 +30,11 @@
#include <fcntl.h>
#include <string.h>
#include <math.h>
#include <stddef.h>
#include <stdint.h>
#include <sys/select.h>
#include <sys/time.h>
#include <linux/if_ether.h>
#include "main.h"
#include "ping.h"
......
......@@ -25,7 +25,6 @@
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include <dirent.h>
#include "main.h"
......
......@@ -22,6 +22,8 @@
#ifndef _BATCTL_SYS_H
#define _BATCTL_SYS_H
#include "main.h"
#define SYS_BATIF_PATH_FMT "/sys/class/net/%s/mesh/"
#define SYS_LOG_LEVEL "log_level"
#define SYS_LOG "log"
......
......@@ -36,8 +36,12 @@
#include <netinet/udp.h>
#include <netinet/ip_icmp.h>
#include <netinet/if_ether.h>
#include <net/ethernet.h>
#include <stddef.h>
#include <stdint.h>
#include <sys/select.h>
#include <sys/socket.h>
#include "main.h"
#include "tcpdump.h"
#include "packet.h"
#include "bat-hosts.h"
......
......@@ -23,7 +23,10 @@
#define _BATCTL_TCPDUMP_H
#include <netpacket/packet.h>
#include <net/ethernet.h>
#include <linux/if_ether.h>
#include <net/if_arp.h>
#include <sys/types.h>
#include "main.h"
#include "list-batman.h"
#ifndef ARPHRD_IEEE80211_PRISM
......
......@@ -28,6 +28,10 @@
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <linux/if_ether.h>
#include <stddef.h>
#include <sys/select.h>
#include <sys/time.h>
#include "main.h"
#include "traceroute.h"
......
......@@ -19,7 +19,6 @@
*
*/
#include <netinet/in.h>
#include <stdio.h>
#include <stdlib.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment