diff -Nur a/libxt_layer7.c b/libxt_layer7.c
---- a/libxt_layer7.c 1970-01-01 01:00:00.000000000 +0100
-+++ b/libxt_layer7.c 2008-08-22 16:00:52.000000000 +0200
+--- a/extensions/libxt_layer7.c 1970-01-01 01:00:00.000000000 +0100
++++ b/extensions/libxt_layer7.c 2008-08-22 16:00:52.000000000 +0200
@@ -0,0 +1,368 @@
+/*
+ Shared library add-on to iptables for layer 7 matching support.
+ /* sanity check. First non-comment non-blank
+ line must be the same as the file name. */
+ if(strcmp(line, protoname))
-+ exit_error(OTHER_PROBLEM,
++ xtables_error(OTHER_PROBLEM,
+ "Protocol name (%s) doesn't match file name (%s). Bailing out\n",
+ line, filename);
+
+ if(strlen(line) >= MAX_PROTOCOL_LEN)
-+ exit_error(PARAMETER_PROBLEM,
++ xtables_error(PARAMETER_PROBLEM,
+ "Protocol name in %s too long!", filename);
+ strncpy(info->protocol, line, MAX_PROTOCOL_LEN);
+
+ else if(datatype == pattern)
+ {
+ if(strlen(line) >= MAX_PATTERN_LEN)
-+ exit_error(PARAMETER_PROBLEM, "Pattern in %s too long!", filename);
++ xtables_error(PARAMETER_PROBLEM, "Pattern in %s too long!", filename);
+ strncpy(info->pattern, line, MAX_PATTERN_LEN);
+
+ datatype = done;
+ break;
+ }
+ else
-+ exit_error(OTHER_PROBLEM, "Internal error");
++ xtables_error(OTHER_PROBLEM, "Internal error");
+ }
+
+ if(datatype != done)
-+ exit_error(OTHER_PROBLEM, "Failed to get all needed data from %s", filename);
++ xtables_error(OTHER_PROBLEM, "Failed to get all needed data from %s", filename);
+
+ if(line) free(line);
+ fclose(f);
+ case 'A' ... 'F':
+ return c - 'A' + 10;
+ default:
-+ exit_error(OTHER_PROBLEM, "hex2dec: bad value!\n");
++ xtables_error(OTHER_PROBLEM, "hex2dec: bad value!\n");
+ return 0;
+ }
+}
+ if (n < 0)
+ {
+ perror("scandir");
-+ exit_error(OTHER_PROBLEM, "Couldn't open %s\n", dirname);
++ xtables_error(OTHER_PROBLEM, "Couldn't open %s\n", dirname);
+ }
+ else
+ {
+ int c = snprintf(filename, MAX_FN_LEN, "%s/%s/%s.pat", dir, subdirs[n], s);
+
+ if(c > MAX_FN_LEN)
-+ exit_error(OTHER_PROBLEM,
++ xtables_error(OTHER_PROBLEM,
+ "Filename beginning with %s is too long!\n", filename);
+
+ /* read in the pattern from the file */
+ }
+
+ if(!done)
-+ exit_error(OTHER_PROBLEM,
++ xtables_error(OTHER_PROBLEM,
+ "Couldn't find a pattern definition file for %s.\n", s);
+
+ /* process \xHH escapes and tolower everything. (our regex lib has no
+
+ case 'd':
+ if(strlen(argv[optind-1]) >= MAX_FN_LEN)
-+ exit_error(PARAMETER_PROBLEM, "directory name too long\n");
++ xtables_error(PARAMETER_PROBLEM, "directory name too long\n");
+
+ strncpy(l7dir, argv[optind-1], MAX_FN_LEN);
+
+static void final_check(unsigned int flags)
+{
+ if (!flags)
-+ exit_error(PARAMETER_PROBLEM,
++ xtables_error(PARAMETER_PROBLEM,
+ "LAYER7 match: You must specify `--l7proto'");
+}
+
+ xtables_register_match(&layer7);
+}
diff -Nur a/libxt_layer7.man b/libxt_layer7.man
---- a/libxt_layer7.man 1970-01-01 01:00:00.000000000 +0100
-+++ b/libxt_layer7.man 2008-08-22 16:00:52.000000000 +0200
+--- a/extensions/libxt_layer7.man 1970-01-01 01:00:00.000000000 +0100
++++ b/extensions/libxt_layer7.man 2008-08-22 16:00:52.000000000 +0200
@@ -0,0 +1,14 @@
+This module matches packets based on the application layer data of
+their connections. It uses regular expression matching to compare