Commits

Shlomi Fish  committed be644a7

Added the PF_INET protocol to the ipq_create_handle() call (API change)

  • Participants
  • Parent commits fcd4ba0

Comments (0)

Files changed (5)

File C/arbitrator/Makefile

 
 OBJECTS_PROTO = conn.o delayer.o fcs_dm.o main.o packet_logic.o pqueue.o queue.o rand.o redblack.o rwlock.o str2int_dict.o switcher.o text_queue_in.o text_queue_out.o
 
-DEBUG = 0
+DEBUG = 1
 
-CC = kgcc
+CC = gcc
 
 ifeq ($(DEBUG),1)
 	OPT_FLAGS = -g
 	$(CC) -Wall -o $@ $(OBJECTS) -lipq -lpthread -lm
 
 clean:
-	rm -f arb $(OBJECTS)
+	rm -f arb $(OBJECTS)
+

File C/arbitrator/Makefile.kernel

 OBJECTS_PROTO = conn.o delayer.o fcs_dm.o ip_queue.o k_stdlib.o main.o packet_logic.o pqueue.o queue.o rand.o redblack.o rwlock.o str2int_dict.o switcher.o text_queue_in.o text_queue_out.o
 
 #CFLAGS = -DUSE_TEXT_QUEUE_IN -DUSE_TEXT_QUEUE_OUT -D__KERNEL__ -DMODULE -DLINUX -I/usr/src/linux/include/ -g -Wall
-UML = 0
+UML = 1
 
 DEBUG = 0
 
-I386 = 0
+I386 = 1
 
 
 ifeq ($(DEBUG),1)
 COMMON_FLAGS_POST = -DMODULE -D__KERNEL__ -DUSE_TEXT_QUEUE_IN -DUSE_TEXT_QUEUE_OUT 
 
 ifeq ($(UML),1)
-	#UML_BASE_DIR = /home/shlomi/Download/unpack/kernel/User-Mode-Linux/kernel/linux
+	UML_BASE_DIR = /home/shlomi/Download/unpack/kernel/User-Mode-Linux/kernel/linux
 	#UML_BASE_DIR = /home/project/Download/unpack/User-Mode-Linux/kernel/linux
-	UML_BASE_DIR = /home/project/Download/unpack/User-Mode-Linux/kernel/2.4.9/linux
+	#UML_BASE_DIR = /home/project/Download/unpack/User-Mode-Linux/kernel/2.4.9/linux
 	CFLAGS = $(COMMON_FLAGS_PRE) -I$(UML_BASE_DIR)/include -I$(UML_BASE_DIR)/arch/um/include -U__i386__ -DUM_FASTCALL -DNESTING=0 -D__arch_um__ -DSUBARCH="i386" $(COMMON_FLAGS_POST)
 else
 	CFLAGS = $(COMMON_FLAGS_PRE) -I/usr/src/linux/include $(COMMON_FLAGS_POST)

File C/arbitrator/ip_queue.c

 #include <net/sock.h>
 #include <net/route.h>
 
-#include <linux/netfilter_ipv4/ip_queue.h>
+#include <linux/netfilter_ipv4/libipq.h>
 #include <linux/netfilter_ipv4/ip_tables.h>
 
 #include "queue.h"

File C/arbitrator/k_ipq.h

 #include <net/sock.h>
 #include <net/route.h>
 
-#include <linux/netfilter_ipv4/ip_queue.h>
+#include <linux/netfilter_ipv4/libipq.h>
 #include <linux/netfilter_ipv4/ip_tables.h>
 
 

File C/arbitrator/main.c

     printf("(c) 2001\n");
 
 #ifndef __KERNEL__
-    h = ipq_create_handle(0);
+    h = ipq_create_handle(0, PF_INET);
     if (h == NULL)
     {
         die(h);