All of lore.kernel.org
 help / color / mirror / Atom feed
* How to utilize DVB Network API
@ 2009-03-10 20:03 Bob Ingraham
  0 siblings, 0 replies; only message in thread
From: Bob Ingraham @ 2009-03-10 20:03 UTC (permalink / raw)
  To: linux-media

Hello All,

The documentation leaves the Network section of the API as "To be written..."

I've looked at the header file, and it may be straightforward to call, but...

Does anyone know how to properly invoke this part of the API?

Is it correct to assume that the point of the network API is to create a "virtual" network interface that I can treat like any other NIC (unidirectional, of course)?

My goal is to receive multicast packets using a Skystar 2 DVB-S card (rev 2.6), using standard multicast join and UDP receive calls.

The dvb_net_if structure has the following fields:

        __u16 pid;      // This is obvious
        __u16 if_num;   // Don't know exactly what goes here???
        __u8  feedtype; // This is either 0 (MPE) or 1 (ULE)

For example, does the following code snippet the proper way to go about this?

struct dbv_net_if dni;
int sd;

dni.pid = 3022;  // My MPEG2 PID
dni.if_num = 0;  // ???
dni.feedtype = DVB_NET_FEEDTYPE_MPE;

sd = open("/dev/dvb/adapter0/net0", O_RDONLY);
ioctl(sd, NET_ADD_IF, &dni);

Now, do I read packets from /dev/dvb/adapter0/net0 using my sd descriptor?

Or do I at this point open a standard UDP socket and start listening for packets from the satellite interface?

Any help in clearing my basic confusion would be much appreciated.

Thank-you!

Bob

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-03-10 20:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-10 20:03 How to utilize DVB Network API Bob Ingraham

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.