rohc team mailing list archive
-
rohc team
-
Mailing list archive
-
Message #01114
Re: tun2udp
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
Attachment:
signature.asc
Description: PGP signature
Follow ups
References