monitube-data_rtp.h

Go to the documentation of this file.
00001 /*
00002  * $Id: monitube-data_rtp.h 346460 2009-11-14 05:06:47Z ssiano $
00003  *
00004  * This code is provided as is by Juniper Networks SDK Developer Support.
00005  * It is provided with no warranties or guarantees, and Juniper Networks
00006  * will not provide support or maintenance of this code in any fashion.
00007  * The code is provided only to help a developer better understand how
00008  * the SDK can be used.
00009  * 
00010  * Copyright (c) 2008, Juniper Networks, Inc.
00011  * All rights reserved.
00012  */
00013 
00022 #ifndef __MONITUBE_DATA_RTP_H__
00023 #define __MONITUBE_DATA_RTP_H__
00024 
00025 /*** Constants ***/
00026 
00027 #define RTP_VERSION        2  
00028 #define RTP_SEQ_MOD  (1<<16)  
00029 
00030 #define MIN_SEQUENTIAL    2   
00031 
00032 /*** Data structures ***/
00033 
00037 typedef struct rtphdr {
00038 #if BYTE_ORDER == LITTLE_ENDIAN
00039     uint8_t cc:4,        
00040             x:1,         
00041             p:1,         
00042             version:2;   
00043             
00044     uint8_t pt:7,        
00045             m:1;         
00046 #endif
00047 #if BYTE_ORDER == BIG_ENDIAN
00048     uint8_t version:2,   
00049             p:1,         
00050             x:1,         
00051             cc:4;        
00052             
00053     uint8_t m:1,         
00054             pt:7;        
00055 #endif
00056     
00057     uint16_t seq;         
00058     uint32_t ts;          
00059     uint32_t ssrc;        
00060     uint32_t csrc[0];     
00061 } rtp_hdr_t;
00062 
00063 
00067 typedef struct source_s {
00068     uint16_t max_seq;        
00069     uint32_t cycles;         
00070     uint32_t base_seq;       
00071     uint32_t bad_seq;        
00072     uint32_t probation;      
00073     uint32_t received;       
00074     uint32_t expected_prior; 
00075     uint32_t received_prior; 
00076 } source_t;
00077 
00078 
00079 /*** GLOBAL/EXTERNAL Functions ***/
00080 
00092 int
00093 update_seq(source_t * s, uint16_t seq);
00094 
00095 #endif
00096 

2007-2009 Juniper Networks, Inc. All rights reserved. The information contained herein is confidential information of Juniper Networks, Inc., and may not be used, disclosed, distributed, modified, or copied without the prior written consent of Juniper Networks, Inc. in an express license. This information is subject to change by Juniper Networks, Inc. Juniper Networks, the Juniper Networks logo, and JUNOS are registered trademarks of Juniper Networks, Inc. in the United States and other countries. All other trademarks, service marks, registered trademarks, or registered service marks are the property of their respective owners.
Generated on Sun May 30 20:27:02 2010 for SDK Your Net Corporation Monitube IPTV Monitoring Example: monitube-data 1.0 by Doxygen 1.5.1