Skip navigation.
Home
The QNX Community Portal

View topic - Registering a filter module with io-net

Registering a filter module with io-net

Read-only archive of qnx.ddk (Writing device drivers for scanners, video card, optical mouse, etc) at inn.qnx.com

Registering a filter module with io-net

Postby ashish19 » Tue May 15, 2007 11:22 am

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

}
ashish19
Active Member
 
Posts: 18
Joined: Wed May 09, 2007 10:46 am

Re: Registering a filter module with io-net

Postby seanb » Tue May 15, 2007 1:07 pm

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.


# 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


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.
seanb
QNX Master
 
Posts: 133
Joined: Fri Jul 28, 2006 5:36 pm

Re: Registering a filter module with io-net

Postby seanb » Tue May 15, 2007 1:17 pm

Sean Boudreau <seanb@qnx.com> wrote:
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.


# 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


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.

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

-seanb
seanb
QNX Master
 
Posts: 133
Joined: Fri Jul 28, 2006 5:36 pm


Return to qnx.ddk

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest