Commit 8010c98d authored by pdw's avatar pdw
Browse files

0.9pre4.

Merged in FreeBSD fixes.
parent 7a997c4e
......@@ -17,6 +17,7 @@ CFLAGS += -I/usr/include/pcap
# directories:
#LDFLAGS += -L/usr/local/lib
# LDFLAGS += -pg -a
LDFLAGS += -pthread
# PREFIX specifies the base directory for the installation.
PREFIX = /usr/local
......@@ -30,10 +31,10 @@ MANDIR = man
#MANDIR = share/man # FHS-ish
# You shouldn't need to change anything below this point.
VERSION = 0.9pre3
VERSION = 0.9pre4
CFLAGS += -g -Wall "-DIFTOP_VERSION=\"$(VERSION)\""
LDFLAGS += -g
LDLIBS += -lpcap -lpthread -lcurses -lm
LDLIBS += -lpcap -lcurses -lm
SRCS = iftop.c addr_hash.c hash.c ns_hash.c resolver.c ui.c util.c sorted_list.c\
options.c serv_hash.c threadprof.c
......
......@@ -134,7 +134,7 @@ void assign_addr_pair(addr_pair* ap, struct ip* iptr, int flip) {
unsigned short int dst_port = 0;
/* Does this protocol use ports? */
if(iptr->ip_p == IPPROTO_TCP || IP_HL(iptr) == IPPROTO_UDP) {
if(iptr->ip_p == IPPROTO_TCP || iptr->ip_p == IPPROTO_UDP) {
/* We take a slight liberty here by treating UDP the same as TCP */
/* Find the TCP/UDP header */
......
......@@ -35,7 +35,7 @@ void options_read(int argc, char **argv);
/* Make use of SIOCGIFHWADDR work on FreeBSD */
#ifdef __BSD__
#ifndef SIOCGIFHWADDR
#define SIOCGIFHWADDR SIOCGIFADDR
#define ifr_hwaddr ifr_addr
#endif
......
......@@ -2,7 +2,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in_systm.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "ns_hash.h"
......
......@@ -8,6 +8,7 @@
#ifndef __NS_HASH_H_ /* include guard */
#define __NS_HASH_H_
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
......
......@@ -3,8 +3,9 @@
*
*/
#include <netinet/in.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <pthread.h>
#include <stdio.h>
......
......@@ -6,8 +6,12 @@
#ifndef __RESOLVER_H_ /* include guard */
#define __RESOLVER_H_
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in_systm.h>
#include <netinet/in.h>
void resolver_initialise();
void resolve(struct in_addr* addr, char* result, int buflen);
......
......@@ -6,6 +6,7 @@
#ifndef __SERV_HASH_H_ /* include guard */
#define __SERV_HASH_H_
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.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