All of lore.kernel.org
 help / color / mirror / Atom feed
From: Emmanuel Guiton <emmanuel@netlab.hut.fi>
To: netfilter-devel <netfilter-devel@lists.netfilter.org>
Subject: Side effect? - Re: Changing the content of tcp timeouts in ip_conntrack_proto_tcp.c
Date: Thu, 15 Jan 2004 10:26:08 +0200	[thread overview]
Message-ID: <40064EA0.3050603@netlab.hut.fi> (raw)
In-Reply-To: 400542BD.6050706@netlab.hut.fi

Hi!

I was a bit optimistic in my last e-mail. Compilation is totally ok, 
insertion of the modules in the kernel seems to go fine... until I want 
to use them. The nat table does not work anymore.
The ip_tables module seems to be there:
pc104:# iptables -L   
Chain INPUT (policy ACCEPT)
target     prot opt source               destination        

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination        

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination  

But if I try the nat table:
pc104:# iptables -t nat -L
modprobe: Can't locate module ip_tables
iptables v1.2.9: can't initialize iptables table `nat': Table does not 
exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.

If I do not add my function in ip_conntrack_standalone.c, everything's 
ok (well except that I can't use my funciton of course).
To be very precise I just added the following:

In ip_conntrack_standalone.c:
EXPORT_SYMBOL(ip_ct_proto_tcp_set_timeouts);

In ip_conntrack.h:
extern void ip_ct_proto_tcp_set_timeous(/datatypes/);

In ip_conntrack_proto_tcp.c:
void ip_ct_proto_tcp_set_tcp_timeouts(unsigned long new_value, ...)
{
    ...
    ip_ct_tcp_timeout_established = new_value SECS;
    ...
}

And the calls to the function in ipt_MY_TARGET.c:
ip_ct_proto_tcp_set_timeouts(/values/);


What do I do wrong?

           Emmanuel



Emmanuel Guiton wrote:

> KOVACS Krisztian wrote:
>
>>  Hi,
>>
>> On Wed, 2004-01-14 at 13:39, Emmanuel Guiton wrote:
>>  
>>
>>>> Looks like you have not exported this function from ip_conntrack. 
>>>> To use a function from another module than it is defined in the 
>>>> function must first be exported from the module where it is defined.
>>>>     
>>>
>>> Well, I think I did. I defined my function in the 
>>> ip_conntrack_proto_tcp.c and I exported its prototype in 
>>> ip_conntrack.h.
>>> Then I call it in my target module which also uses ip_conntrack.h.
>>>   
>>
>>
>>  You have to explicitly export it using the EXPORT_SYMBOL() (or
>> EXPORT_SYMBOL_GPL) macro in ip_conntrack_standalone.c. It has a lot of
>> other exported symbols, just add another one.
>>
>>  
>>
> Right, it's working now.
> Thanks!
>
>           Emmanuel
>

  reply	other threads:[~2004-01-15  8:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-14 10:34 Changing the content of tcp timeouts in ip_conntrack_proto_tcp.c Emmanuel Guiton
2004-01-14 11:11 ` Henrik Nordstrom
2004-01-14 12:39   ` Emmanuel Guiton
2004-01-14 12:50     ` KOVACS Krisztian
2004-01-14 13:23       ` Emmanuel Guiton
2004-01-15  8:26         ` Emmanuel Guiton [this message]
2004-01-15 13:14           ` Side effect? - " KOVACS Krisztian
2004-01-15 13:32             ` Userspace msg, hw_addr unused? Scott MacKay
2004-01-15 14:00               ` Scott MacKay
2004-01-15 14:19             ` Side effect? - Re: Changing the content of tcp timeouts in ip_conntrack_proto_tcp.c Emmanuel Guiton
2004-01-15 14:29               ` Last minute erratum: I'm stupid. - Re: Side effect? - Re: Changing the content of tcp timeouts Emmanuel Guiton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40064EA0.3050603@netlab.hut.fi \
    --to=emmanuel@netlab.hut.fi \
    --cc=netfilter-devel@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.