Are you sure?

The error indicates the struct inet_protocol has changed as well..  more
likely the 2.6 section in it's entire is what should be used on RH ASv3,
not only the change in arguments to inet_add/del_protocol.

Regards
Henrik

On Fri, 16 Jul 2004, Pierre Spielmann wrote:

> 
> Redhat seems to have backported some network parts of the 2.6 kernel 
> into their 2.4.XX one.
> You would have to change the following part to look like:
> 
> -------------- snip --------------
> #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
> static struct inet_protocol ipwccp_protocol = {
>     .handler    = ip_wccp_rcv
> };
> static inline void wccp_add_protocol(void) { 
> inet_add_protocol(&ipwccp_protocol, IPPROTO_GRE); }
> static inline int wccp_del_protocol(void) { return 
> inet_del_protocol(&ipwccp_protocol, IPPROTO_GRE); 
> }
> #else
> static struct inet_protocol ipwccp_protocol = {
>   ip_wccp_rcv,     
>   NULL,           
>   0,            
>   IPPROTO_GRE, 
>   0,          
>   NULL,      
>   "GRE"     
> };
> static inline void wccp_add_protocol(void) { 
> inet_add_protocol(&ipwccp_protocol, IPPROTO_GRE); }
> static inline int wccp_del_protocol(void) { return 
> inet_del_protocol(&ipwccp_protocol, IPPROTO_GRE); 
> }
> #endif
> 
> ------------- snap -----------
> 
> 
> this should compile properly
> 
> bye Pierre
> 
> 
> 
> 
> On Thu, Jul 08, 2004 at 01:48:34AM +0200, Henrik Nordstrom wrote:
> > Quite likely it is trivial modifications needed, but as I am not using 
> > RHAS 3 or know anyone slightly familiar with Linux programming who do I am 
> > of limited guidance here.
> > 
> > It would not suprice me if RHAS 3 has the same requirements as Linux-2.6. 
> > See the ip_wccp.c source for hints on Linux-2.4 / Linux-2.6 difference.
> > 
> > 
> > 
> > On Wed, 7 Jul 2004 [EMAIL PROTECTED] wrote:
> > 
> > > Henrik, I am writing hoping that you can throw some light in resolving the 
> > > following problem.  I have been trying to compile ip_wccp.c under Red Hat 
> > > Advanced Server 3 without any luck.  These is the output: 
> > > 
> > > ip_wccp.c:133: warning: excess elements in struct initializer
> > > ip_wccp.c:133: warning: (near initialization for `ipwccp_protocol')
> > > ip_wccp.c:134: warning: excess elements in struct initializer
> > > ip_wccp.c:134: warning: (near initialization for `ipwccp_protocol')
> > > ip_wccp.c:135: warning: excess elements in struct initializer
> > > ip_wccp.c:135: warning: (near initialization for `ipwccp_protocol')
> > > ip_wccp.c:137: warning: excess elements in struct initializer
> > > ip_wccp.c:137: warning: (near initialization for `ipwccp_protocol')
> > > ip_wccp.c: In function `wccp_add_protocol':
> > > ip_wccp.c:138: too few arguments to function 
> > > `inet_add_protocol_Rsmp_dc5483d7'
> > > ip_wccp.c: In function `wccp_del_protocol':
> > > ip_wccp.c:139: too few arguments to function 
> > > `inet_del_protocol_Rsmp_23842692'
> > > 
> > > Reading your comments on the squid forum 
> > > http://www.mail-archive.com/[EMAIL PROTECTED]/msg11795.html, you 
> > > mention that this kernel version handles these functions differently than 
> > > other Linux version.  I would like to know if there is a work-around to 
> > > this problem using RHAS 3?  Is there an updated version of ip_wccp.c?  Any 
> > > suggestions? 
> > > 
> > > Thank you for your prompt response, 
> > > 
> > > Reynaldo Corral
> > 
> 

Reply via email to