netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libxtables: Introduce xtables_afinfo
@ 2009-02-07 17:05 jamal
  2009-02-07 19:05 ` Jan Engelhardt
  0 siblings, 1 reply; 7+ messages in thread
From: jamal @ 2009-02-07 17:05 UTC (permalink / raw)
  To: kaber, Jan Engelhardt; +Cc: Pablo Neira Ayuso, netfilter-devel

[-- Attachment #1: Type: text/plain, Size: 155 bytes --]


I am going to incrementally send these changes over a period of time
until i resolve all my issues; i hope this is fine with your process.

cheers,
jamal

[-- Attachment #2: ipxt01 --]
[-- Type: text/plain, Size: 1653 bytes --]

commit 74350de063cc4bc1f57b5db89ae035cde7fe895b
Author: Jamal Hadi Salim <hadi@cyberus.ca>
Date:   Sat Feb 7 11:54:09 2009 -0500

    This change allows me to compile the following
    little program.
    Otherwise  we get symbol failures with afinfo
    
    -----
     #include "./include/xtables.h"
     #include <stdlib.h>
    
     /*
      * gcc simp-ipt.c -L /lib/xtables -lxtables -ldl
     */
     char *lib_dir;
     unsigned int global_option_offset = 0;
     const char *program_version = XTABLES_VERSION;
     const char *program_name = "tc-ipt";
     struct xtables_afinfo afinfo = {
            .libprefix      = "libxt_",
     };
    
     void exit_error(enum exittype status, const char *msg, ...)
     {
    	exit(status);
     }
    
     int main(int argc, char **argv) {
    
            return 0;
     }
    -----

diff --git a/include/xtables.h.in b/include/xtables.h.in
index 02a832d..9e45c8b 100644
--- a/include/xtables.h.in
+++ b/include/xtables.h.in
@@ -249,6 +249,28 @@ extern void save_string(const char *value);
 /* Present in both iptables.c and ip6tables.c */
 extern u_int16_t parse_protocol(const char *s);
 
+
+/* protocol family dependent informations */
+struct xtables_afinfo {
+	/* protocol family */
+	int family;
+
+	/* prefix of library name (ex "libipt_" */
+	char *libprefix;
+
+	/* used by setsockopt (ex IPPROTO_IP */
+	int ipproto;
+
+	/* kernel module (ex "ip_tables" */
+	char *kmod;
+
+	/* optname to check revision support of match */
+	int so_rev_match;
+
+	/* optname to check revision support of match */
+	int so_rev_target;
+};
+
 #ifdef XTABLES_INTERNAL
 #	include <xtables/internal.h>
 #endif

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-02-09 20:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-07 17:05 [PATCH] libxtables: Introduce xtables_afinfo jamal
2009-02-07 19:05 ` Jan Engelhardt
2009-02-07 19:43   ` jamal
2009-02-09 14:43     ` Patrick McHardy
2009-02-09 15:38       ` Pablo Neira Ayuso
2009-02-09 15:39         ` Patrick McHardy
2009-02-09 20:45       ` jamal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).