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

* Re: [PATCH] libxtables: Introduce xtables_afinfo
  2009-02-07 17:05 [PATCH] libxtables: Introduce xtables_afinfo jamal
@ 2009-02-07 19:05 ` Jan Engelhardt
  2009-02-07 19:43   ` jamal
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Engelhardt @ 2009-02-07 19:05 UTC (permalink / raw)
  To: jamal; +Cc: kaber, Pablo Neira Ayuso, netfilter-devel


On Saturday 2009-02-07 18:05, jamal wrote:

>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.

This afinfo thing has been a red LED beam in my eye. I just do not think
iproute2-m_ipt should have to deal with afinfo at all.
..
So I now also dealt with that and moved it according to what I 
think is right - see latest git commit in mine; [77f48c2]

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

* Re: [PATCH] libxtables: Introduce xtables_afinfo
  2009-02-07 19:05 ` Jan Engelhardt
@ 2009-02-07 19:43   ` jamal
  2009-02-09 14:43     ` Patrick McHardy
  0 siblings, 1 reply; 7+ messages in thread
From: jamal @ 2009-02-07 19:43 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: kaber, Pablo Neira Ayuso, netfilter-devel

On Sat, 2009-02-07 at 20:05 +0100, Jan Engelhardt wrote:
> ess.
> 
> This afinfo thing has been a red LED beam in my eye. I just do not think
> iproute2-m_ipt should have to deal with afinfo at all.
> ..
> So I now also dealt with that and moved it according to what I 
> think is right - see latest git commit in mine; [77f48c2]

Ok, tried that looks good. I prefer the approach you have. So
discard the patch i posted.

cheers,
jamal



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

* Re: [PATCH] libxtables: Introduce xtables_afinfo
  2009-02-07 19:43   ` jamal
@ 2009-02-09 14:43     ` Patrick McHardy
  2009-02-09 15:38       ` Pablo Neira Ayuso
  2009-02-09 20:45       ` jamal
  0 siblings, 2 replies; 7+ messages in thread
From: Patrick McHardy @ 2009-02-09 14:43 UTC (permalink / raw)
  To: hadi; +Cc: Jan Engelhardt, Pablo Neira Ayuso, netfilter-devel

jamal wrote:
> On Sat, 2009-02-07 at 20:05 +0100, Jan Engelhardt wrote:
>> ess.
>>
>> This afinfo thing has been a red LED beam in my eye. I just do not think
>> iproute2-m_ipt should have to deal with afinfo at all.
>> ..
>> So I now also dealt with that and moved it according to what I 
>> think is right - see latest git commit in mine; [77f48c2]
> 
> Ok, tried that looks good. I prefer the approach you have. So
> discard the patch i posted.

I'm a bit unsynced right now because I lost a harddisk and couldn't
follow emails. Could you resend the agreed-upon patches that you
want me to apply please?

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

* Re: [PATCH] libxtables: Introduce xtables_afinfo
  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
  1 sibling, 1 reply; 7+ messages in thread
From: Pablo Neira Ayuso @ 2009-02-09 15:38 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: hadi, Jan Engelhardt, netfilter-devel

Patrick McHardy wrote:
> jamal wrote:
>> On Sat, 2009-02-07 at 20:05 +0100, Jan Engelhardt wrote:
>>> ess.
>>>
>>> This afinfo thing has been a red LED beam in my eye. I just do not think
>>> iproute2-m_ipt should have to deal with afinfo at all.
>>> ..
>>> So I now also dealt with that and moved it according to what I think 
>>> is right - see latest git commit in mine; [77f48c2]
>>
>> Ok, tried that looks good. I prefer the approach you have. So
>> discard the patch i posted.
> 
> I'm a bit unsynced right now because I lost a harddisk and couldn't
> follow emails. Could you resend the agreed-upon patches that you
> want me to apply please?

Jan has sent them to netfilter-users instead of netfilter-devel by 
mistake there this morning. Look there.

-- 
"Los honestos son inadaptados sociales" -- Les Luthiers

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

* Re: [PATCH] libxtables: Introduce xtables_afinfo
  2009-02-09 15:38       ` Pablo Neira Ayuso
@ 2009-02-09 15:39         ` Patrick McHardy
  0 siblings, 0 replies; 7+ messages in thread
From: Patrick McHardy @ 2009-02-09 15:39 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: hadi, Jan Engelhardt, netfilter-devel

Pablo Neira Ayuso wrote:
> Patrick McHardy wrote:
>> jamal wrote:
>>> On Sat, 2009-02-07 at 20:05 +0100, Jan Engelhardt wrote:
>>>> ess.
>>>>
>>>> This afinfo thing has been a red LED beam in my eye. I just do not 
>>>> think
>>>> iproute2-m_ipt should have to deal with afinfo at all.
>>>> ..
>>>> So I now also dealt with that and moved it according to what I think 
>>>> is right - see latest git commit in mine; [77f48c2]
>>>
>>> Ok, tried that looks good. I prefer the approach you have. So
>>> discard the patch i posted.
>>
>> I'm a bit unsynced right now because I lost a harddisk and couldn't
>> follow emails. Could you resend the agreed-upon patches that you
>> want me to apply please?
> 
> Jan has sent them to netfilter-users instead of netfilter-devel by 
> mistake there this morning. Look there.

The reason why I'm asking is that I have a huge amount of mails
to catch up with and want to avoid reading through long threads
just to find out that the patch has been withdrawn at the end.

So I prefer a resubmission in any case.

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

* Re: [PATCH] libxtables: Introduce xtables_afinfo
  2009-02-09 14:43     ` Patrick McHardy
  2009-02-09 15:38       ` Pablo Neira Ayuso
@ 2009-02-09 20:45       ` jamal
  1 sibling, 0 replies; 7+ messages in thread
From: jamal @ 2009-02-09 20:45 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: Jan Engelhardt, Pablo Neira Ayuso, netfilter-devel

On Mon, 2009-02-09 at 15:43 +0100, Patrick McHardy wrote:

> Could you resend the agreed-upon patches that you
> want me to apply please?

Ok, I just synced with latest git. I will send you a few patches first.
My path to resolving tc/ipt is to start with being able to take a basic
useless program like:

----------
#include <xtables.h>
int main(int argc, char **argv) {

        return 0;
}
--------

then compile and link with "gcc useless.c -lxtables -ldl"

As it is right now i have to define in the minimal exit_error()

cheers,
jamal


^ permalink raw reply	[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).