Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] IOCTL interface to DVB CA



Hi, I'm wondering how the CA_GET_MSG/CA_SEND_MSG IOCTLs defined in ca.h are 
meant to work.

As well as the EN50221 physical interface code, I've implemented a generic 
buffering system that supports the read()/write() interface for 
sending/receiving transport layer control packets that can also support the 
EN50221 control link layer (not nice!). I wasn't able to use as much as I'd 
hoped directly from the metzler tree unfortunately.

I'm looking to support the IOCTLs as well now. The link layer is done in the 
driver, so all the user has to deal with (for EN50221 style interfaces) are 
transport layer packets.

In the read()/write() interface, the first two bytes written are the slot_id 
and the connection_id. There is one ca device per CA adapter. Each CA device 
can have multiple slots.

In the IOCTL interface, the IOCTLS transfer a structure as follows:
typedef struct ca_msg {
        unsigned int index;
        unsigned int type;
        unsigned int length;
        unsigned char msg[256];
} ca_msg_t;

I assume if you need more than 256 bytes in a message, you just allocate the 
structure large enough, and set length appropriately.

Index must be the slot id the packet is destined for.

I'm guessing type is meant to be some sort of indicator as to which layer the 
packet is at... i.e. transport or session or application, so we can support 
devices which may take packets at any of these layers. Is this right?

I'm assuming since nothing actually implements these two IOCTLs yet, changing 
this structure is not a big problem. I'd probably want to define the 
different message types.. and there will probably have to be some other 
changes to supply the data needed at each layer (e.g. connection_id). I'll 
obviously post such changes to the list for review before actually checking 
them in, as usual.

I'll leave the read()/write() interface as it is for the moment, transferring 
transport layer packets, but at some point in the future, this should maybe 
be looked at as well.


-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index