|
reSIProcate/rutil
9694
|
00001 #ifndef UDP_HXX 00002 #define UDP_HXX 00003 00004 00005 #ifdef __MACH__ 00006 # ifdef __APPLE__ 00007 # include <sys/socket.h> 00008 # if !defined(_BSD_SOCKLEN_T_) && !defined(_SOCKLEN_T) 00009 typedef int socklen_t; 00010 # endif 00011 # else 00012 typedef int socklen_t; 00013 # endif 00014 #endif 00015 00016 #include "rutil/Socket.hxx" 00017 00021 resip::Socket 00022 openPort( unsigned short port, unsigned int interfaceIp, 00023 bool verbose); 00024 00025 00027 bool 00028 getMessage( resip::Socket fd, char* buf, int* len, 00029 UInt32* srcIp, unsigned short* srcPort, 00030 bool verbose); 00031 00032 00034 bool 00035 sendMessage( resip::Socket fd, char* msg, int len, 00036 unsigned int dstIp, unsigned short dstPort, 00037 bool verbose); 00038 00039 /* ==================================================================== 00040 * The Vovida Software License, Version 1.0 00041 * 00042 * Redistribution and use in source and binary forms, with or without 00043 * modification, are permitted provided that the following conditions 00044 * are met: 00045 * 00046 * 1. Redistributions of source code must retain the above copyright 00047 * notice, this list of conditions and the following disclaimer. 00048 * 00049 * 2. Redistributions in binary form must reproduce the above copyright 00050 * notice, this list of conditions and the following disclaimer in 00051 * the documentation and/or other materials provided with the 00052 * distribution. 00053 * 00054 * 3. The names "VOCAL", "Vovida Open Communication Application Library", 00055 * and "Vovida Open Communication Application Library (VOCAL)" must 00056 * not be used to endorse or promote products derived from this 00057 * software without prior written permission. For written 00058 * permission, please contact vocal@vovida.org. 00059 * 00060 * 4. Products derived from this software may not be called "VOCAL", nor 00061 * may "VOCAL" appear in their name, without prior written 00062 * permission of Vovida Networks, Inc. 00063 * 00064 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED 00065 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 00066 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND 00067 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA 00068 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES 00069 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL, 00070 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00071 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 00072 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 00073 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00074 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 00075 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 00076 * DAMAGE. 00077 * 00078 */ 00079 00080 // Local Variables: 00081 // mode:c++ 00082 // c-file-style:"ellemtel" 00083 // c-file-offsets:((case-label . +)) 00084 // indent-tabs-mode:nil 00085 // End: 00086 00087 #endif
1.7.5.1