libxtables: Introduce xtables_afinfo
PATCH 1/1 libxtables: Introduce xtables_afinfo
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
commit 74350de063cc4bc1f57b5db89ae035cde7fe895b
Author: Jamal Hadi Salim <[email protected]> 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;
}
-----include/xtables.h.in +22 -0
@@ -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
Quoted 2 lines · jamal
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]
Quoted 7 lines · Jan Engelhardt
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
Quoted 10 lines · jamal
Quoted 6 lines · Jan Engelhardt
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?
Pablo Neira Ayuso
maintainerQuoted 9 lines · Patrick McHardy
Quoted 8 lines · jamal
Quoted 6 lines · Jan Engelhardt
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]
Quoted 6 lines
Quoted 2 lines
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.
Signature · 1 line
"Los honestos son inadaptados sociales" -- Les Luthiers
Quoted 10 lines · Pablo Neira Ayuso
Quoted 9 lines · Patrick McHardy
Quoted 8 lines · jamal
Quoted 6 lines · Jan Engelhardt
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]
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
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.
Quoted 2 lines · Patrick McHardy
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