Skip to contentSkip to conversation

Two comments on the H.323 conntrack/NAT helper

DISCUSSION Adrian Bunk 3 participants 7 messages Mar 24, 2006 – Mar 29, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Two comments on the H.323 conntrack/NAT helper:
- the function prototypes in ip_nat_helper_h323.c are _ugly_, please move them to a header file
- is there a reason for not using EXPORT_SYMBOL_GPL?

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#1 lore raw

[The hotmail address of the author doesn't work, CCed sourceforge-address]

Quoted 3 lines · Adrian Bunk

Two comments on the H.323 conntrack/NAT helper:
- the function prototypes in ip_nat_helper_h323.c are _ugly_, please move them to a header file

Their ugliness is because of the current API, which cleaned up quite a lot of the surrounding code, but requires this ugliness from each helper. I would like to keep them visible as a reminder that a cleaner solution is wanted, but moving them to header files certainly sound like a good idea to eliminate the risk of prototype conflicts. But please do this for all helpers at once.

Quoted 1 line

- is there a reason for not using EXPORT_SYMBOL_GPL?

I would prefer that too.

#2 lore raw

----- Original Message ----- From: "Patrick McHardy" <[email protected]>
To: "Adrian Bunk" <[email protected]>
Cc: <[email protected]>; <[email protected]>; <[email protected]>; "Jing Min Zhao" <[email protected]>; <[email protected]>
Sent: Thursday, March 23, 2006 9:02 PM
Subject: Re: Two comments on the H.323 conntrack/NAT helper

Quoted 15 lines

[The hotmail address of the author doesn't work, CCed sourceforge-address]

Quoted 3 lines · Adrian Bunk

Two comments on the H.323 conntrack/NAT helper:
- the function prototypes in ip_nat_helper_h323.c are _ugly_, please move them to a header file

Their ugliness is because of the current API, which cleaned up quite a lot of the surrounding code, but requires this ugliness from each helper. I would like to keep them visible as a reminder that a cleaner solution is wanted, but moving them to header files certainly sound like a good idea to eliminate the risk of prototype conflicts. But please do this for all helpers at once.

Quoted 5 lines
Quoted 1 line

- is there a reason for not using EXPORT_SYMBOL_GPL?

I would prefer that too.

Sure, I'll do that.

Thanks

Jing Min Zhao

#3 lore raw
In reply to Patrick McHardy

----- Original Message ----- From: "Patrick McHardy" <[email protected]>
To: "Adrian Bunk" <[email protected]>
Cc: <[email protected]>; <[email protected]>; <[email protected]>; "Jing Min Zhao" <[email protected]>; <[email protected]>
Sent: Thursday, March 23, 2006 9:02 PM
Subject: Re: Two comments on the H.323 conntrack/NAT helper

Quoted 15 lines

[The hotmail address of the author doesn't work, CCed sourceforge-address]

Quoted 3 lines · Adrian Bunk

Two comments on the H.323 conntrack/NAT helper:
- the function prototypes in ip_nat_helper_h323.c are _ugly_, please move them to a header file

Their ugliness is because of the current API, which cleaned up quite a lot of the surrounding code, but requires this ugliness from each helper. I would like to keep them visible as a reminder that a cleaner solution is wanted, but moving them to header files certainly sound like a good idea to eliminate the risk of prototype conflicts. But please do this for all helpers at once.

Quoted 5 lines
Quoted 1 line

- is there a reason for not using EXPORT_SYMBOL_GPL?

I would prefer that too.

I've moved those prototypes. But the move involves moving of two header files:
ip_conntrack_helper_h323_asn1.h and ip_conntrack_helper_h323_types.h. This is because ip_conntrack_h323.h now has to include ip_conntrack_helper_h323_asn1.h and thus ip_conntrack_helper_h323_types.h, so they are moved from net/ipv4/netfilter/ to include/linux/netfilter_ipv4/ to make sure other header files like ip_conntrack_h323.h and ip_conntrack.h be able to find them.

Is this ok or you have a better idea?

Thanks a lot!

Jing Min Zhao

#4 lore raw
Quoted 11 lines · Jing Min Zhao

I've moved those prototypes. But the move involves moving of two header files:
ip_conntrack_helper_h323_asn1.h and ip_conntrack_helper_h323_types.h. This is because ip_conntrack_h323.h now has to include ip_conntrack_helper_h323_asn1.h and thus ip_conntrack_helper_h323_types.h, so they are moved from net/ipv4/netfilter/ to include/linux/netfilter_ipv4/ to
make sure other header files like ip_conntrack_h323.h and ip_conntrack.h be able to find them.

Is this ok or you have a better idea?

I can't think of a better solution as long as we have the typedefs.

#5 lore raw

----- Original Message ----- From: "Patrick McHardy" <[email protected]>
To: "Jing Min Zhao" <[email protected]>
Cc: <[email protected]>; <[email protected]>
Sent: Wednesday, March 29, 2006 5:09 AM
Subject: Re: Two comments on the H.323 conntrack/NAT helper

Quoted 11 lines
Quoted 10 lines · Jing Min Zhao

I've moved those prototypes. But the move involves moving of two header files:
ip_conntrack_helper_h323_asn1.h and ip_conntrack_helper_h323_types.h. This is because ip_conntrack_h323.h now has to include ip_conntrack_helper_h323_asn1.h and thus ip_conntrack_helper_h323_types.h, so they are moved from net/ipv4/netfilter/ to include/linux/netfilter_ipv4/ to
make sure other header files like ip_conntrack_h323.h and ip_conntrack.h be able to find them.

Quoted 5 lines
Quoted 1 line

Is this ok or you have a better idea?

I can't think of a better solution as long as we have the typedefs.

This is the new release against 2.6.16.

Changes:

1. Added new parameter "default_rrq_ttl". This is used to specify a default
timeToLive (in seconds) for registering an endpoint that doesn't send keep-alive RRQ and there is no timeToLive in RRQ and RCF. In this
situation, normally the RAS connection and call signal expectation will expire quickly (udp connection expire in 180 seconds by default). This may not be what people want when they register endpoints for receiving calls. By setting this parameter to a longer time, such endpoints like Netmeeting can register once and stay alive for a longer time to receive calls from outside of firewall. The default value is 300 (seconds).

2. Moved some extern function prototypes to ip_conntrack_h323.h (suggested by Adrian Bunk)

3. Made get_h245_addr static (suggested by Adrian Bunk)

4. Changed to use EXPORT_SYMBOL_GPL (suggested by Adrian Bunk)

Best regards,

Jing Min Zhao

#6 lore raw
In reply to Adrian Bunk

----- Original Message ----- From: "Adrian Bunk" <[email protected]>
To: "Jing Min Zhao" <[email protected]>
Cc: <[email protected]>; <[email protected]>; <[email protected]>
Sent: Thursday, March 23, 2006 7:13 PM
Subject: Two comments on the H.323 conntrack/NAT helper

Quoted 1 line

Two comments on the H.323 conntrack/NAT helper:

Thank you for your advice.

Quoted 2 lines

- the function prototypes in ip_nat_helper_h323.c are _ugly_, please move them to a header file

Correct, I'll do that.

Quoted 2 lines

- is there a reason for not using EXPORT_SYMBOL_GPL?

No, I just forgot it. I'll change this too.

Quoted 1 line

cu

Hope I can get more advice from you.

Quoted 9 lines

Adrian

Signature · 4 lines
      "Is there not promise of rain?" Ling Tan asked suddenly out
       of the darkness. There had been need of rain for many days.
      "Only a promise," Lao Er said.
                                      Pearl S. Buck - Dragon Seed

That's Hepburn :-)

Quoted 2 lines