do I need a convertor?

Well, I think this is a simple question…
I’m writing a down producer like this one:

io_net_registrant_t raw_reg =
{
_REG_PRODUCER_DOWN,
“raw.so”,
NULL, // our top type (none)
“en”, // our bottom type
NULL,
&raw_funcs, // pointer to our functions
0 // #dependencies
};

To produce data downward I think this is ok, but, If I want to receive
data from the ethernet driver (en0), do I need to change the top_type of
the down producer to something like top_type=data and them write a
en_data convertor???

Thanks for the help!
Cesar

You don’t need a top type; however down producers
are always connected to up producers via a convertor.
So in your scenario, you would need a bot type
something like “my_raw” then a “my_raw” <-> “en”
convertor.

If you want to skip the convertor step, make a
_REG_FILTER_ABOVE with top type = bot type = “en”.

-seanb

Cesar Ida <cesarida@inf.ufrgs.br> wrote:

Well, I think this is a simple question…
I’m writing a down producer like this one:

io_net_registrant_t raw_reg =
{
_REG_PRODUCER_DOWN,
“raw.so”,
NULL, // our top type (none)
“en”, // our bottom type
NULL,
&raw_funcs, // pointer to our functions
0 // #dependencies
};

To produce data downward I think this is ok, but, If I want to receive
data from the ethernet driver (en0), do I need to change the top_type of
the down producer to something like top_type=data and them write a
en_data convertor???

Thanks for the help!
Cesar