[Fwd: --Dereferencing point to incomplete type]

[Fwd: --Dereferencing point to incomplete type]

Post by Marco Fabian » Thu, 10 Aug 2000 04:00:00



Hallo,
I'm trying to compile a my kernel module regarding QoS-Linux. I need to
access to some information stored in the variable called "handle" and
"stats". But I get the error "Dereferencing point to incomplete type".
......What does it mean?

Thanks in advance for the help.
Marco

-------------------------
|        MODULE            |
-------------------------
#include <linux/kernel.h>
#include <linux/module.h>

#include <linux/netdevice.h>
#include <linux/pkt_sched.h>
#include <linux/pkt_cls.h>

int init_module()
{
struct device *device;
struct Qdisc *qdisc;
struct tc_stats stats;
u32 handle;

        device=dev_base;
        for(; device != NULL; device=device->next)
        {
                printk("\n------Scheda: %s ------\n",device->name);

        printk("Queue Discipline:\n");
        qdisc=device->qdisc;
        handle=qdisc->handle;   /* HERE IS THE ERROR*/
        stats=qdisc->stats;        /* HERE IS THE ERROR*/

        printk("Statistical of Qdisc:\n");
        printk("Handle=Major:%x
Minor:%x\n",TC_H_MAJ(handle),TC_H_MIN(handle));
        printk("DROP packet%d",stats.drops);
    .......
        }
return 0;

Quote:}

void cleanup_module()
{
        printk("...Auf Widersehen\n\n");

Quote:}

------------------------------------
|           STRUCT  (Simplified)       |
------------------------------------
Inside  <linux/pkt_sched.h> there is:
struct Qdisc
{
 struct Qdisc_head h;
 u32                          handle;
 struct tc_stats           stats;

Quote:};

--------------------------------------
Inside  <linux/netdevice.h> there is:
struct device
{
 char   *name;
 struct device  *next;
 struct Qdisc  *qdisc;
Quote:};

 
 
 

[Fwd: --Dereferencing point to incomplete type]

Post by Kaz Kylhe » Thu, 10 Aug 2000 04:00:00




Quote:

>Hallo,
>I'm trying to compile a my kernel module regarding QoS-Linux. I need to
>access to some information stored in the variable called "handle" and
>"stats". But I get the error "Dereferencing point to incomplete type".
>......What does it mean?

[ snip ]

Quote:>int init_module()
>{
>struct device *device;
>struct Qdisc *qdisc;
>struct tc_stats stats;

[ snip ]

Quote:>        handle=qdisc->handle;   /* HERE IS THE ERROR*/
>        stats=qdisc->stats;        /* HERE IS THE ERROR*/

The error means that the pointer points to an incomplete type, struct Qdisc.
None of the header files provide a complete declaration for that type,
they merely introduce the tag.

The problem is that you included <linux/pkt_sched.h> rather than
<net/pkt_sched.h>.

Quote:>Inside  <linux/pkt_sched.h> there is:
>struct Qdisc
>{
> struct Qdisc_head h;
> u32                          handle;
> struct tc_stats           stats;
>};

That is incorrect.  The struct declaration above is in
/usr/src/linux/include/net/pkt_sched.h, not in
/usr/src/linux/include/linux/pkt_sched.h.

These are distinct headers with different contents.

Quote:>--------------------------------------
>Inside  <linux/netdevice.h> there is:
>struct device
>{
> char   *name;
> struct device  *next;
> struct Qdisc  *qdisc;
>};

If there is no prior declaration of ``struct Qdict'', the above will actually
cause it to be declared in the surrounding scope. So that is where you
are picking up the incomplete type.

--
Any hyperlinks appearing in this article were inserted by the unscrupulous
operators of a Usenet-to-web gateway, without obtaining the proper permission
of the author, who does not endorse any of the linked-to products or services.

 
 
 

1. --Dereferencing point to incomplete type

Hallo,
I'm trying to compile a my kernel module regarding QoS-Linux. I need to
access to some information stored in the variable called "handle" and
"stats". But I get the error "Dereferencing point to incomplete type".
......What does it mean?

Thanks in advance for the help.
Marco

-------------------------
|        MODULE            |
-------------------------
#include <linux/kernel.h>
#include <linux/module.h>

#include <linux/netdevice.h>
#include <linux/pkt_sched.h>
#include <linux/pkt_cls.h>

int init_module()
{
struct device *device;
struct Qdisc *qdisc;
struct tc_stats stats;
u32 handle;

        device=dev_base;
        for(; device != NULL; device=device->next)
        {
                printk("\n------Scheda: %s ------\n",device->name);

        printk("Queue Discipline:\n");
        qdisc=device->qdisc;
        handle=qdisc->handle;   /* HERE IS THE ERROR*/
        stats=qdisc->stats;        /* HERE IS THE ERROR*/

        printk("Statistical of Qdisc:\n");
        printk("Handle=Major:%x
Minor:%x\n",TC_H_MAJ(handle),TC_H_MIN(handle));
        printk("DROP packet%d",stats.drops);
    .......
        }
return 0;

void cleanup_module()
{
        printk("...Auf Widersehen\n\n");

------------------------------------
|           STRUCT  (Simplified)       |
------------------------------------
Inside  <linux/pkt_sched.h> there is:
struct Qdisc
{
 struct Qdisc_head h;
 u32                          handle;
 struct tc_stats           stats;

--------------------------------------
Inside  <linux/netdevice.h> there is:
struct device
{
 char   *name;
 struct device  *next;
 struct Qdisc  *qdisc;

2. gated 3.5A11 binaries on sunsite

3. : dereferencing pointer to incomplete type

4. Help!!!

5. 2.5.5 -- filesystems.c:30: In function `sys_nfsservctl': dereferencing pointer to incomplete type

6. Could some one fill me in???

7. Dereferencing pointer to incomplete type

8. 'Find'. what a strange command

9. 2.5.18 -- build failure -- suspend.c:1052: dereferencing pointer to incomplete type

10. dereferencing pointer to incomplete type?

11. Solving "dereferencing pointer to incomplete type" error

12. "dereferencing pointer to incomplete type"