CA Loopback driver
Version 0.0.1
NooneImportant

This driver creates a fake CA device at /dev/dvb/adapter<num>/ca0 and ties
that device to proc/ca_emu_<num>.

It is expected that a userspace application will parse the data pulled from the
/proc file-handle, and use it as applicable.  Note that this is a one way
protocol, and there is no way to pass data back from the userspace application
to the kernel.  This means that only CA_SET ioctls are supported.  Also,
read and write calls to the ca0 device will result in failure, as these methods
are not forwarded.

COMPILING
---------
The caloopback device has only been tested on the 2.6.15 kernel with hg/DVB
drivers:3809

I would expect it to work fine on any 2.6 linux kernel, however.

You will likley need to have your linux kernel source available in the
standard location : /lib/modules/<kernel version>/source/

to compile:

make

as root:
make install


USAGE
-----

the caloopback module must be loaded AFTER all dvb devices, and must be removed
prior to all dvb devices being unloaded.  This is especially important for
hotpluggable DVB devices like USB boards.

to load (as root):
modprobe caloopback devnum=x,y,...
where x,y,... correspond to each dvb adapter you wish to create a loopback
device for.

For example:
modprobe caloopback devnum=2    : Create /dev/dvb/adapter2/ca0
modprobe caloopback devnum=0,2  : Create /dev/dvb/adapter0/ca0 AND
                                         /dev/dvb/adapter2/ca0

To unload:
rmmod caloopback

TESTING
-------
There are 2 test applications included:
gcc -o reader reader.c
gcc -o writer writer.c

After loading the caloopback device on adapter <n>:
in one term: ./reader <n>
in another term: ./writer<n>

You should see data being sent to the screen in the 'reader' pane.

