Hi, I have a RTP question for the protocol gurus out there. I looked at RFC 1889 for RTP (http://www.ietf.org/rfc/rfc1889.txt) and borrowed the following code from it: /* * * RTP data header * */ typedef struct { unsigned int version:2; /* protocol version */ unsigned int p:1; /* padding flag */ unsigned int x:1; /* header extension flag */ unsigned int cc:4; /* CSRC count */ unsigned int m:1; /* marker bit */ unsigned int pt:7; /* payload type */ u_int16_t seq; /* sequence number */ u_int32_t ts; /* timestamp */ u_int32_t ssrc; /* synchronization source */ u_int32_t csrc[1]; /* optional CSRC list */ } rtp_hdr_t; I am running on i386 Linux. I create a packet, where I set the version number to 2, the payload type to 32, and everything else to zero. When I ship this packet over the network via UDP, Ethereal decodes the packet with a version number of 0. The first byte of the packet, according to Ethereal, is 0xa (10). Am I doing things wrong? Do I need to redefine my struct depending on what byte order I am in? Thanks. -- Craig Rodrigues http://www.gis.net/~craigr rodrigc@xxxxxxxxxxxx
Powered by MHonArc 2.6.10