← Back to team overview

rohc team mailing list archive

Re: tun2udp

 

 I get much help from your valuable suggestion and thanks a lot.
And, would you please give me a data flow description of the packet from
the application user to the server?

I think the IP packets are routed as the following:
                sendto TUN                               read from
TUN                                                    sendto remote
app(RTP) -------------->TUN(IP/UDP/RTP) ------------------->my process use
ROHC(ROHC)-------------------->remote(IP/UDP/ROHC)
                                     recvfrom
remote                                 write to
TUN                                    recvfrom TUN
remote(IP/UDP/ROHC)-------------------->my
process(ROHC)--------------------->TUN(IP/UDP/RTP)-------------------->app(RTP)




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

> On Fri, 14 Jun 2013 09:17:49 +0800,
> 宋鑫 <songxinwest@xxxxxxxxx> wrote:
>
> > 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?
>
> Send it as usual.
>
> > 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.
>
> No, you don't need extra work. Use sendto as usual. That's why any stock
> VoIP application will work without any change.
>
> See https://en.wikipedia.org/wiki/TUN/TAP
>
> 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

References