www.pudn.com > streamrtp.rar > rtpheaderutil.c


/*-------------------------------------------------------------------------
 * rtpheaderutil.c - rtpntoh, rtphton
 *-------------------------------------------------------------------------
 */

#include 

/*------------------------------------------------------------------------
 * rtpntoh - convert header fields from network to host byte order
 *------------------------------------------------------------------------
 */
void
rtpntoh(struct rtp *header)
{
	header->rtp_seq = ntohs(header->rtp_seq);
	header->rtp_time = ntohl(header->rtp_time);
	header->rtp_ssrc = ntohl(header->rtp_ssrc);
}

/*------------------------------------------------------------------------
 * rtohton - convert header fields from host to network byte order
 *------------------------------------------------------------------------
 */
void
rtphton(struct rtp *header)
{
	rtpntoh(header);
}