← Back to team overview

rohc team mailing list archive

Re: tun2udp


Yes, I know what you mean,but my question is about this:
>For outcoming traffic :
>1/ read on TUN interface: you get one IP/UDP/RTP packet
if I create a TUN,  how to send a packet to a TUN with my application?For
example, if my application create a RTP packet, without ROHC, I only need
to use "sendto" to send this packet, but with ROHC, first I need to
complete the RTP packet with IP/UDP header, then send this IP/UDP/RTP
packet to TUN.
If I don't want to constuct the IP/UDP/RTP packet myself,how to complete
the RTP packet with IP/UDP header in another way?

2013/6/14 Didier Barvaux <didier@xxxxxxxxxxx>

> Hello 宋鑫,
> > About ROHC I would like to ask you for the call before compression of
> > IP / UDP / RTP packet, how are the IP / UDP headers come from?
> > For example, if do not use ROHC, we can directly send RTP packets to
> > the peer through the UDP socket,  use the "sendto" function which will
> > automatically fix the packet with IP / UDP header
> > But with ROHC, before send the ROHC packet I need to fix all headers.
> > if use tun, the packet read from it is a complete IP packet, how to
> > wirte a IP packet to the tun?
> > I want to know how you solve this problem or similar problems
> For outcoming traffic :
>  1/ read on TUN interface: you get one IP/UDP/RTP packet
>  2/ compress the IP/UDP/RTP packet: you get one ROHC packet
>  3/ write the ROHC packet as the UDP payload on the UDP socket:
>     one IP/UDP/ROHC packet is transmitted over the network
> For incoming traffic :
>  1/ read on UDP socket: you get the UDP payload, ie a ROHC packet
>  2/ decompress the ROHC packet: you get one IP/UDP/RTP packet
>  3/ write the IP/UDP/RTP packet on TUN (you don't have to build the
>     IP and UDP headers, they come from the decompressed ROHC packet).
> Regards,
> Didier
> _______________________________________________
> Mailing list: https://launchpad.net/~rohc
> Post to     : rohc@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~rohc
> More help   : https://help.launchpad.net/ListHelp

Follow ups