Compiling VLANping on FreeBSD

Thanks to Justin Hohner for sending his changes to VLANping so that it would compile cleanly under FreeBSD. Here are the diffs:


# diff -u orig/hack_library.h hack_library.h
— orig/hack_library.h Wed Oct 25 18:46:09 2006
+++ hack_library.h Tue Nov 7 23:21:20 2006
@@ -33,6 +33,7 @@
#include <stdlib.h>
#include <stdbool.h>
#include <fcntl.h>
+#include <sys/time.h>

int Str2IP ( char *str, int *ipNum );
int DumpPacket ( char *psPacket, int packetSize );

# diff -u orig/Makefile Makefile
— orig/Makefile Wed Oct 25 21:04:23 2006
+++ Makefile Wed Nov 8 02:02:58 2006
@@ -1,5 +1,5 @@
vlanping: vlanping.c vlanping.h
– gcc -I../hack_library vlanping.c -lnet ../hack_library/hack_library.o -o vlanping
+ gcc -I../hack_library vlanping.c -lnet -L/usr/local/lib ../hack_library/hack_library.o -o vlanping

clean:
rm -f vlanping

# diff -u orig/vlanping.h vlanping.h
— orig/vlanping.h Wed Oct 25 21:16:55 2006
+++ vlanping.h Wed Nov 8 02:06:23 2006
@@ -31,15 +31,12 @@
#ifndef __VLANPING_H
#define __VLANPING_H

-#include <libnet.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <sys/ioctl.h>
#include <netinet/in.h>
-#include <net/if.h>
-#include <linux/sockios.h>

#include <sys/socket.h>
#include <netinet/in.h>
@@ -54,6 +51,7 @@
#include <sys/stat.h>
#include <fcntl.h>

+#include “/usr/local/include/libnet.h”
#include “hack_library.h”

#define __VLANPING_VERSION “vlanping – Version 1.0”

Advertisements
Explore posts in the same categories: VoIP Security

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: