I have written kernel(2.4) module to communicate with user application using
"Netlink Socket".
I am getting compilation error "Dereferencing pointer to incomplete type"
in kernel module for "nlh = (struct nlmsghdr *) skb->data" line and also
not able include "net/sock.h" header file.
plz help me how can solve this
Thanks
shashidhara
6 3628
Hi,
What is the type of data(skb->data)?
Raghu
Hi,
What is the type of data(skb->data)?
Raghu
Data type is "struct sk_buff"
Data type is "struct sk_buff"
And what is the type of your variable 'skb'? Because that's the one you're dereferencing
and the compiler objects agains that becasuse it seems to an incomplete type,
i.e. it is declared but not defined somewhere.
kind regards,
Jos
data type is "struct sk_buff".
This is defined in linux/skbuff.h header file.
I am not able to include linux/skbuff.h and net/sock.h header files.
If i include these header files ,i will get many errors like "dereferencing pointer ...." and also some macros are not declared.
Why i cant include these headers file. Plz help me Sir.
Thanking u
Shashidhara HN
data type is "struct sk_buff".
This is defined in linux/skbuff.h header file.
I am not able to include linux/skbuff.h and net/sock.h header files.
If i include these header files ,i will get many errors like "dereferencing pointer ...." and also some macros are not declared.
Why i cant include these headers file. Plz help me Sir.
You have to find *other* .h files that define the structures and types and include
the linux/skbuff.h etc. files themselves. Always try to find the files highest in the
hierarchy, i.e. stay away as much as possible from the 'linux' subdirectory.
'grep' and 'man' are your friends here.
kind regards,
Jos
You have to find *other* .h files that define the structures and types and include
the linux/skbuff.h etc. files themselves. Always try to find the files highest in the
hierarchy, i.e. stay away as much as possible from the 'linux' subdirectory.
'grep' and 'man' are your friends here.
kind regards,
Jos
Thanks a lot sir, I got It.
--
Shashidhara HN
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Pushkar Pradhan |
last post by:
I have some functions which take as i/p a buffer (it can be float, char,
or 16 bit, int etc.). The result is another o/p buffer, its type is also
flexible (it could be a float, char etc.).
I try...
|
by: Neo |
last post by:
Hi Folks,
#include<stdio.h>
int main()
{
int (*p);
int arr;
int i;
|
by: Alexei A. Frounze |
last post by:
Hi all,
I have a question regarding the gcc behavior (gcc version 3.3.4).
On the following test program it emits a warning:
#include <stdio.h>
int aInt2 = {0,1,2,4,9,16};
int aInt3 =...
|
by: Alexei A. Frounze |
last post by:
Seems like, to make sure that a pointer doesn't point to an object/function,
NULL (or simply 0) is good enough for both kind of pointers, data pointers
and function pointers as per 6.3.2.3:
3 An...
|
by: Steven |
last post by:
Hello,
I get the following message during compilation:
`dereferencing pointer to incomplete type'
It stems from the compare function I use with qsort() and I am not
quite sure how to fix it....
|
by: friend.05 |
last post by:
I have three files.
graph.h:
My header file where I have typedef for my structure and function
delcaration
typedef struct _ipc_actors ipc_graph_actors;
typedef ipc_graph_type...
|
by: Pritam |
last post by:
line 7: error: dereferencing pointer to incomplete type
1. #include<stdio.h>
2. #include<sys/stat.h>
3. #include<stdlib.h>
4. void execname() {
5. struct task_struct *my;
6. my =...
|
by: tejesh |
last post by:
I am trying to compile the following code
int backend_sm_run(struct interface_data *ctx)
{
xsup_assert((ctx != NULL), "ctx != NULL", TRUE);
xsup_assert((ctx->statemachine != NULL),...
|
by: Anuz |
last post by:
Hi all,
While compiling a driver, I am getting this error:
error: dereferencing pointer to incomplete type
int __kc_adapter_clean(struct net_device *netdev, int *budget)
{
/*some...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
| |