RE: [squid-users] Compile ip_wccp.c on linux-2.4.21-4.EL

From: James Zhao <jzhao@dont-contact.us>
Date: Wed, 12 May 2004 17:57:01 -0400

by looking into the protocol.h from both kernel, they are indeed different.

from 2.4.20-8:

struct inet_protocol
{
        int (*handler)(struct sk_buff *skb);
        void (*err_handler)(struct sk_buff *skb, u32
info);
        struct inet_protocol *next;
        unsigned char protocol;
        unsigned char copy:1;
        void *data;
        const char *name;
};

from 2.4.21-4.EL:

struct inet_protocol
{
        int (*handler)(struct sk_buff *skb);
        void (*err_handler)(struct sk_buff *skb, u32
info);
        int no_policy;
};

It looks like the ip_wccp.c need to be updated.

James Zhao
Email: jzhao@cv.net

-----Original Message-----
From: James Zhao [mailto:jzhao@cv.net]
Sent: Wednesday, May 12, 2004 5:35 PM
To: squid-users@squid-cache.org
Subject: [squid-users] Compile ip_wccp.c on linux-2.4.21-4.EL

Hello,

I successfully compiled ip_wccp.c
(http://www.squid-cache.org/WCCP-support/Linux/) on a linux-2.4.20-8 system
using the following command: (following the procedure from
http://www.ultri.cx/tech/squid/gre-transparent.html)

#gcc -D__KERNEL__ -I/usr/src/linux-2.4.20-8/include -Wall -Wstrict-prototype
s -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
-fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -DMODULE
 -DMODVERSIONS -include
/usr/src/linux-2.4.20-8/include/linux/modversions.h -nostdinc -iwithprefix
include -DKBUILD_BASENAME=cpufreq
-DEXPORT_SYMTAB -c ip_wccp.c

I just got a system with linux-2.4.21-4.EL, but when I tried to compile
ip_wccp.c using similar command. (Replacing the kernel version)

#gcc -D__KERNEL__ -I/usr/src/linux-2.4.21-4.EL/include -Wall -Wstrict-protot
ypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
-fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -DMODULE
 -DMODVERSIONS -include
/usr/src/linux-2.4.21-4.EL/include/linux/modversions.h -nostdinc -iwithpref
ix include -DKBUILD_BASENAME=cpufreq
-DEXPORT_SYMTAB -c ip_wccp.c

I got the following error:

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'

What am I missing? Any header files need to be modified?

Thanks in advance.

James Zhao
Email: jzhao@cv.net
Received on Wed May 12 2004 - 15:57:09 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Jun 01 2004 - 12:00:01 MDT