uh, here's the ebtables patch. :)

Jason


diff -ur ebtables-v1.0/INSTALL ebtables-v1.0-jl1/INSTALL
--- ebtables-v1.0/INSTALL       Tue Jul 31 10:49:57 2001
+++ ebtables-v1.0-jl1/INSTALL   Fri Oct 12 16:20:58 2001
@@ -1,7 +1,7 @@
 FOLLOW THESE SIMPLE GUIDELINES:
 -------------------------------
 
-If /usr/src/linux contains the patched kernel for brepf:
+If /usr/src/linux contains the patched kernel for ebtables:
        %make
 Otherwise:
        %make KERNEL_DIR=<<where-the-patched-kernel-is>>
@@ -9,9 +9,9 @@
 WHAT GETS INSTALLED?
 --------------------
 
-- the brepf manual gets installed in /usr/local/man/man8
+- the ebtables manual gets installed in /usr/local/man/man8
   To put the manual somewhere else, do a make MANDIR=<<man-path/man>>, the
-  Makefile will append /man8/brepf.8.
+  Makefile will append /man8/ebtables.8.
 - ebt_protocolnames is placed in /etc/
 - ebtables.c is compiled to ebtables into the same directory
 
diff -ur ebtables-v1.0/Makefile ebtables-v1.0-jl1/Makefile
--- ebtables-v1.0/Makefile      Thu Sep 27 13:03:12 2001
+++ ebtables-v1.0-jl1/Makefile  Fri Oct 12 16:26:13 2001
@@ -1,25 +1,24 @@
-#brepf Makefile
+# ebtables Makefile
 
-ifndef KERNEL_DIR
-KERNEL_DIR=/usr/src/linux
-endif
+KERNEL_DIR?=/usr/src/linux
 EBTABLES_VERSION:=1.0
 
-ifndef MANDIR
-MANDIR:=/usr/local/man
-endif
-CFLAGS:=-I$(KERNEL_DIR)/include
-
-default: $(MANDIR)/man8/ebtables.8 ebtables /etc/ebt_protocolnames
+MANDIR?=/usr/local/man
+CFLAGS:=-I$(KERNEL_DIR)/include -Wall
 
 ebtables: ebtables.c $(KERNEL_DIR)/include/linux/ebtables.h \
-$(KERNEL_DIR)/include/linux/br_db.h
+               $(KERNEL_DIR)/include/linux/br_db.h
        $(CC) $(CFLAGS) $< -o $@
 
 $(MANDIR)/man8/ebtables.8: ebtables.8
        mkdir -p $(MANDIR)/man8
-       cp $< $@
+       install -m 0644 -o root -g root $< $@
 
 /etc/ebt_protocolnames: ebt_protocolnames
        mkdir -p /etc
-       cp $< $@
+       install -m 0644 -o root -g root $< $@
+
+install: $(MANDIR)/man8/ebtables.8 ebtables /etc/ebt_protocolnames
+
+clean:
+       -rm -f ebtables
Binary files ebtables-v1.0/ebt_protocolnames and ebtables-v1.0-jl1/ebt_protocolnames 
differ
diff -ur ebtables-v1.0/ebtables.8 ebtables-v1.0-jl1/ebtables.8
--- ebtables-v1.0/ebtables.8    Mon Sep 24 15:50:41 2001
+++ ebtables-v1.0-jl1/ebtables.8        Fri Oct 12 16:21:49 2001
@@ -23,18 +23,18 @@
 .SH NAME
 ebtables \- ethernet bridge packet table administration
 .SH SYNOPSIS
-.BR "brepf -[ADI] " "chain rule-specification [options]"
+.BR "ebtables -[ADI] " "chain rule-specification [options]"
 .br
-.BR "brepf -P " "chain target"
+.BR "ebtables -P " "chain target"
 .br
-.BR "brepf -[FLZ] [" "chain" "]"
+.BR "ebtables -[FLZ] [" "chain" "]"
 .br
-.B "brepf -L DB"
+.B "ebtables -L DB"
 .br
-.BR "brepf -[cd] [" "y/n" "]"
+.BR "ebtables -[cd] [" "y/n" "]"
 .br
 .SH DESCRIPTION
-.B Brepf
+.B ebtables
 is used to set up, maintain, and inspect the tables of Ethernet frame
 rules in the Linux kernel. It works analogous as iptables, but is less
 complicated. This man page is written with the man page of iptables
@@ -112,7 +112,7 @@
 List all rules in the selected chain. If no chain is selected, all chains
 are listed. If the chainname equals 
 .BR DB ,
-.B brepf
+.B ebtables
 will try to show the database. This database gives a survey of the kind of
 frames that pass the different bridge hooks. It uses the interfaces where
 the frame came in or will go out, the protocol field and the hook. This
@@ -154,10 +154,10 @@
 protocol number. Instead, all frames where the protocol field is used as
 the length field are assumed to be of the same 'protocol'. The protocol
 name used in
-.B brepf
+.B ebtables
 for these frames is
 .BR LENGTH .
-The file /etc/brepf_protocolnames can be used to show readable
+The file /etc/ebt_protocolnames can be used to show readable
 characters instead of hexadecimal numbers for the protocols. For example,
 .I 0x0800
 will be represented by 
@@ -305,7 +305,7 @@
 .BR "-c --count " "[\fIy/n\fP]"
 .IR "" "Enable (" y ") or disable (" n ") the counters. This can be done per table."
 .SH FILES
-.I /etc/brepf_protocolnames
+.I /etc/ebt_protocolnames
 .SH BUGS
 Please report bugs to the author.
 .SH AUTHOR
diff -ur ebtables-v1.0/ebtables.c ebtables-v1.0-jl1/ebtables.c
--- ebtables-v1.0/ebtables.c    Tue Sep 25 14:00:27 2001
+++ ebtables-v1.0-jl1/ebtables.c        Fri Oct 12 16:50:32 2001
@@ -31,12 +31,9 @@
 #include <ctype.h>
 #include <stdarg.h>
 #include <limits.h>
+#include <sys/socket.h>
 #include <linux/ebtables.h>
 #include <linux/br_db.h> // the database
-#include <linux/socket.h>
-#include <linux/netfilter_bridge.h>
-#include <linux/if.h>
-#include <linux/in.h> /* IPPROTO_IP */
 
 // used for keeping the rule counters right during rule adds or deletes
 #define CNT_NORM 0
@@ -285,7 +282,7 @@
 }
 
 /* helper function: processes a line of data from the file brebt_protocolnames */
-get_a_line(char *buffer, char *value, FILE *ifp){
+int get_a_line(char *buffer, char *value, FILE *ifp){
        int i, hlp;
        char anotherhlp;
 
@@ -390,7 +387,6 @@
 static void list_em(int chainnr){
        int i, space = 0, counterbegin = 0;
        struct ebt_entry *hlp;
-       unsigned short protohlp;
        char name[21];
 
        hlp = (struct ebt_entry *) ( ((char *)pointers[chainnr]) + sizeof(struct 
ebt_entries));
@@ -714,7 +710,6 @@
 // parse the chain name and return the corresponding nr
 int get_chainnr(char* arg){
        int i = -1, j = 0;
-       char *buffer;
 
        // database is special case (not really a chain)
        if (!strcmp(arg, DATABASEHOOKNAME))
@@ -741,7 +736,6 @@
 /* used for the loglevel of the target LOG */
 int name_to_loglevel(char* arg){
        int i = 0, c_val = prioritynames[0].c_val;
-       char *buffer;
        
        while (c_val != -1){
                if (!strcmp(arg, prioritynames[i].c_name))
@@ -991,7 +985,7 @@
 
 /* execute command A */
 static void add_rule(){
-       int i, j, k, cnthlp = 0, add_size = 0;
+       int j, k, cnthlp = 0, add_size = 0;
        char *tmp, *hlp, *add_kernel;
        struct ebt_entry *new;
        struct ebt_entries *change;
@@ -1287,7 +1281,7 @@
 
 // tell the kernel to zero his counters for the specific table
 void zero_counters(int zerochain){
-       unsigned char *t, zc;
+       unsigned char *t;
        int l;  
 
        if (! (t = (unsigned char *)malloc(sizeof(unsigned char) + sizeof(int))))
@@ -1388,7 +1382,7 @@
 
 // set the ip mask and ip address
 void parse_ip_address(char *address, unsigned char kind){
-       char *p, *buff;
+       char *p;
        int i;
 
        // first the mask
_______________________________________________
Bridge mailing list
[EMAIL PROTECTED]
http://www.math.leidenuniv.nl/mailman/listinfo/bridge

Reply via email to