--Dereferencing point to incomplete type

--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:};

 
 
 

--Dereferencing point to incomplete type

Post by Karl Heinz Buchegge » 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?

Imagine:

  struct foo* pPtr;
  pPtr->n = 0;

Question: Is this ok?
Answer: We don't know, since we dont know what struct foo
 looks like. You are dereferencing a pointer to an incomplete
 type.

-----------------------------------------------------------
Karl Heinz Buchegger


 
 
 

1. [Fwd: --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. PPP connection to 3com AccessBuilder

3. : dereferencing pointer to incomplete type

4. PCI init issues

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

6. dynamically changing xterm title

7. Dereferencing pointer to incomplete type

8. Can't get X running on a Diamond Stealth 3D 2000 Pro

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"