[linux-dvb] IPv6 support in DVB drivers

matthieu castet castet.matthieu at free.fr
Wed Apr 20 21:11:14 CEST 2005


Johannes Stezenbach wrote:
> Bertrand Mazieres wrote:
>>My understanding is that current LinuxTV drivers do not offer the
>>ability to receive IPv6 encapsulated streams, at this stage.
>>It seems a minor change in the dvb_net.c would enable decapsulation of
>>IPv6 packets.
>>Could such a change, as described at
>>http://instinct-wp8.no-ip.org/ipv6/ be incorporated so that future
>>versions of the drivers do support IPv6 as well as IPv4 in MPE
>>protocol implementation ?
> Yes, I will apply your proposed changes to dvb_net.
I don't know how is encapsulated ip in dvb, but this patch seem quite 
ugly : why we can't read the protocol in the llc header ?

For the atm it is done like that :
         if (!clip_vcc->encap || skb->len < RFC1483LLC_LEN || 
             llc_oui,sizeof(llc_oui))) skb->protocol = htons(ETH_P_IP);
         else {
                 skb->protocol = ((u16 *) skb->data)[3];

where RFC1483LLC_LEN=8 and
static const unsigned char llc_oui[] = {
         0xaa,   /* DSAP: non-ISO */
         0xaa,   /* SSAP: non-ISO */
         0x03,   /* Ctrl: Unnumbered Information Command PDU */
         0x00,   /* OUI: EtherType */
         0x00 };

In sumary if there no llc header we are in vcmux mode and we assume IPV4 
and otherwise we read the protocol in the LLC header.

Also instead of removing the first 8 Bytes by hand which could be 
expensive, couldn't use the kernel network utils like skb_pull ?


More information about the linux-dvb mailing list