⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 transmitter.h

📁 radius协议源码÷The Radius Stack will connect to a Radius Server. This stack implementation is built upo
💻 H
字号:
/*transmitter.h       (c) 1999-2000 Derek J Smithies (dereks@ibm.net) *                           Indranet Technologies ltd (lara@indranet.co.nz) * * This file is derived from vic, http://www-nrg.ee.lbl.gov/vic/ * Their copyright notice is below. *//* * Copyright (c) 1993-1995 The Regents of the University of California. * All rights reserved. *  * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the *    documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software *    must display the following acknowledgement: * 	This product includes software developed by the Network Research * 	Group at Lawrence Berkeley National Laboratory. * 4. Neither the name of the University nor of the Laboratory may be used *    to endorse or promote products derived from this software without *    specific prior written permission. *  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#) $Header: /home/cvsroot/openh323/src/vic/transmitter.h,v 1.2 2000/02/04 05:16:24 craigs Exp $ (LBL) */#ifndef vic_transmitter_h#define vic_transmitter_h#include <ptlib.h>#if 0#ifdef WIN32#include <winsock.h>#else#include <sys/param.h>#include <sys/socket.h>#include <sys/uio.h>#endif#endif/* * Largest (user-level) packet size generated by our rtp applications. * Individual video formats may use smaller mtu's. */#define RTP_MTU 1024#define MAXHDR 24#include "dct.h"/* * The base object for performing the outbound path of * the application level protocol. */class Transmitter {    public:	Transmitter();        virtual ~Transmitter();	struct buffer {		struct buffer* next;		/*		 * make buffer twice as big as necessary so we can		 * run off end while doing in-place encoding.		 */		u_char data[2 * RTP_MTU];	};	struct pktbuf {		struct pktbuf* next;    	        int lenHdr,lenBuf;		u_char hdr[MAXHDR];		buffer* buf;	};        virtual int  mtu() { return 1024; }  //Maximum transfer unit.	void StoreOnePacket(pktbuf*);                //Returns a pointer to buffer in the next packet, + length of buffer;        //Frees the packet from the queue.        void GetNextPacket(u_char ** hptr,u_char ** bptr, u_int & hlen, u_int & blen);        //Returns true if there are packets still in the queue.        int PacketsOutStanding();	pktbuf* alloch();	pktbuf* alloc();    protected:        void PurgeBufferQueue(pktbuf *queue);	/*	 * Buffer allocation hooks.	 */	void ReleaseOnePacket(pktbuf*);	/* packet transmission queue */	pktbuf* head_;	pktbuf* tail_;	static u_int   seqno_;    private:	static pktbuf* freehdrs_;	static buffer* freebufs_;	static int nbufs_;	static int nhdrs_;};#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -