OpenQNX :: The QNX Community Portal

Oct 07, 2008 - 12:14 PM
Google
  Web openqnx.com   
     Create an account Home · Submit News · QNX Forums · QNX Download · Search   
_
Main Menu
Who's Online
There are 44 unlogged users and 1 registered user online.

You can log-in or register for a user account here.

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
ashish19
Post subject: Registering a filter module with io-net  PostPosted: May 15, 2007 - 11:22 AM
Active Member


Joined: May 09, 2007
Posts: 18

Hi,

I have written a very simple filter module for io-net but I am getting following error while I try to load it.


# mount -vvvv -Tio-net nfm-filter.so
Parsed: mount from [nfm-filter.so] mount on [NULL] type [io-net]
exec: mount_io-net -o implied -o nostat nfm-filter.so /
Using internal mount (mount_io-net not found)
Type [io-net] Flags 0x80080000
Device [nfm-filter.so] Directory [/]
Options []
mount: Can't mount / (type io-net)
mount: Possible reason: No such device or address


Please help me. I have tried my module with absolute path also i.e.
# mount -vvvv -Tio-net /tmp/active/bin/nfm-filter.so

but it also gives same error.

Following is the code snippet that io-net will access from my module.

static io_net_registrant_t filter_reg = {
_REG_FILTER_ABOVE,
"nfm_filter.so",
"en",
"en",
NULL,
&filter_funcs,
0
};

static int my_filter_init(void *dll_hdl, dispatch_t *dpp, io_net_self_t *ion, char *options)
{
filter_dll_hdl = dll_hdl;
filter_ion = ion;
filter_dpp = dpp;

if(filter_ion->reg(filter_dll_hdl, &filter_reg, &filter_reg_hdl, NULL, NULL) == -1)
{
fprintf(stderr, "\nreg-ERROR ");
return (-1);
}

}
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
seanb
Post subject: Re: Registering a filter module with io-net  PostPosted: May 15, 2007 - 01:07 PM
QNX Master


Joined: Jul 28, 2006
Posts: 72

ashish19 <ashish_its@yahoo.co-dot-in.no-spam.invalid> wrote:
Quote:
Hi,

I have written a very simple filter module for io-net but I am getting
following error while I try to load it.


Quote:
# mount -vvvv -Tio-net nfm-filter.so
Parsed: mount from [nfm-filter.so] mount on [NULL] type
exec: mount_io-net -o implied -o nostat nfm-filter.so /
Using internal mount (mount_io-net not found)
Type [io-net] Flags 0x80080000
Device [nfm-filter.so] Directory [/]
Options []
mount: Can't mount / (type io-net)
mount: Possible reason: No such device or address


Quote:
Please help me. I have tried my module with absolute path also i.e.
# mount -vvvv -Tio-net /tmp/active/bin/nfm-filter.so

but it also gives same error.

Following is the code snippet that io-net will access from my module.

static io_net_registrant_t filter_reg = {
_REG_FILTER_ABOVE,
"nfm_filter.so",
"en",
"en",
NULL,
&filter_funcs,
0
};

static int my_filter_init(void *dll_hdl, dispatch_t *dpp,
io_net_self_t *ion, char *options)
{
filter_dll_hdl = dll_hdl;
filter_ion = ion;
filter_dpp = dpp;

if(filter_ion->reg(filter_dll_hdl, &filter_reg,
&filter_reg_hdl, NULL, NULL) == -1)
{
fprintf(stderr, "\nreg-ERROR ");
return (-1);
}

}


Do you have a io_net_dll_entry symbol? This struct is the
initial entry point io-net looks for:

io_net_dll_entry_t io_net_dll_entry = {
2,
my_filter_init,
NULL
};

io-net should then at least poke your my_filter_init() func.
 
 View user's profile Send private message  
Reply with quote Back to top
seanb
Post subject: Re: Registering a filter module with io-net  PostPosted: May 15, 2007 - 01:17 PM
QNX Master


Joined: Jul 28, 2006
Posts: 72

Sean Boudreau <seanb@qnx.com> wrote:
Quote:
ashish19 <ashish_its@yahoo.co-dot-in.no-spam.invalid> wrote:
Hi,

I have written a very simple filter module for io-net but I am getting
following error while I try to load it.


Quote:
# mount -vvvv -Tio-net nfm-filter.so
Parsed: mount from [nfm-filter.so] mount on [NULL] type
exec: mount_io-net -o implied -o nostat nfm-filter.so /
Using internal mount (mount_io-net not found)
Type [io-net] Flags 0x80080000
Device [nfm-filter.so] Directory [/]
Options []
mount: Can't mount / (type io-net)
mount: Possible reason: No such device or address


Quote:
Please help me. I have tried my module with absolute path also i.e.
# mount -vvvv -Tio-net /tmp/active/bin/nfm-filter.so

but it also gives same error.

Following is the code snippet that io-net will access from my module.

static io_net_registrant_t filter_reg = {
_REG_FILTER_ABOVE,
"nfm_filter.so",
"en",
"en",
NULL,
&filter_funcs,
0
};

static int my_filter_init(void *dll_hdl, dispatch_t *dpp,
io_net_self_t *ion, char *options)
{
filter_dll_hdl = dll_hdl;
filter_ion = ion;
filter_dpp = dpp;

if(filter_ion->reg(filter_dll_hdl, &filter_reg,
&filter_reg_hdl, NULL, NULL) == -1)
{
fprintf(stderr, "\nreg-ERROR ");
return (-1);
}

}


Quote:
Do you have a io_net_dll_entry symbol? This struct is the
initial entry point io-net looks for:

io_net_dll_entry_t io_net_dll_entry = {
2,
my_filter_init,
NULL
};

io-net should then at least poke your my_filter_init() func.

And your my_filter_init() should return EOK on success. Looks
like you're running off the end and returning void.

-seanb
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Credits
All logos and trademarks in this site are property of their respective owners. The comments are property of their posters.
Powered by OpenQNX: The QNX Community Portal Site
QNX and the QNX logo are registered trademarks of QNX Software Systems.