Changeset 913 for pjproject


Ignore:
Timestamp:
Jan 29, 2007 4:25:23 AM (18 years ago)
Author:
bennylp
Message:

Initial addition of the new STUN framework files

Location:
pjproject/branches/iceproject
Files:
6 added
4 edited
3 moved

Legend:

Unmodified
Added
Removed
  • pjproject/branches/iceproject/pjlib-util/build/pjlib_util.dsp

    r754 r913  
    130130# Begin Source File 
    131131 
    132 SOURCE="..\src\pjlib-util\stun.c" 
    133 # End Source File 
    134 # Begin Source File 
    135  
    136 SOURCE="..\src\pjlib-util\stun_client.c" 
     132SOURCE="..\src\pjlib-util\stun_endpoint.c" 
     133# End Source File 
     134# Begin Source File 
     135 
     136SOURCE="..\src\pjlib-util\stun_msg.c" 
     137# End Source File 
     138# Begin Source File 
     139 
     140SOURCE="..\src\pjlib-util\stun_simple.c" 
     141# PROP Exclude_From_Build 1 
     142# End Source File 
     143# Begin Source File 
     144 
     145SOURCE="..\src\pjlib-util\stun_simple_client.c" 
     146# PROP Exclude_From_Build 1 
     147# End Source File 
     148# Begin Source File 
     149 
     150SOURCE="..\src\pjlib-util\stun_transaction.c" 
    137151# End Source File 
    138152# Begin Source File 
     
    194208# Begin Source File 
    195209 
    196 SOURCE="..\include\pjlib-util\stun.h" 
     210SOURCE="..\include\pjlib-util\stun_endpoint.h" 
     211# End Source File 
     212# Begin Source File 
     213 
     214SOURCE="..\include\pjlib-util\stun_msg.h" 
     215# End Source File 
     216# Begin Source File 
     217 
     218SOURCE="..\include\pjlib-util\stun_simple.h" 
     219# End Source File 
     220# Begin Source File 
     221 
     222SOURCE="..\include\pjlib-util\stun_transaction.h" 
    197223# End Source File 
    198224# Begin Source File 
  • pjproject/branches/iceproject/pjlib-util/include/pjlib-util.h

    r754 r913  
    3131#include <pjlib-util/resolver.h> 
    3232#include <pjlib-util/scanner.h> 
    33 #include <pjlib-util/stun.h> 
     33//#include <pjlib-util/stun.h> 
    3434#include <pjlib-util/xml.h> 
    3535 
  • pjproject/branches/iceproject/pjlib-util/include/pjlib-util/errno.h

    r754 r913  
    9494 */ 
    9595#define PJLIB_UTIL_ESTUNSYMMETRIC   (PJLIB_UTIL_ERRNO_START+11) /* 320011 */ 
    96  
     96/** 
     97 * @hideinitializer 
     98 * Invalid STUN attribute 
     99 */ 
     100#define PJLIB_UTIL_ESTUNINATTR      (PJLIB_UTIL_ERRNO_START+12) /* 320012 */ 
     101/** 
     102 * @hideinitializer 
     103 * Too many STUN attributes. 
     104 */ 
     105#define PJLIB_UTIL_ESTUNTOOMANYATTR (PJLIB_UTIL_ERRNO_START+13) /* 320013 */ 
     106/** 
     107 * @hideinitializer 
     108 * Unknown STUN attribute. 
     109 */ 
     110#define PJLIB_UTIL_ESTUNUNKNOWNATTR (PJLIB_UTIL_ERRNO_START+14) /* 320014 */ 
     111/** 
     112 * @hideinitializer 
     113 * Expecting STUN response message. 
     114 */ 
     115#define PJLIB_UTIL_ESTUNNOTRESPONSE (PJLIB_UTIL_ERRNO_START+15) /* 320015 */ 
     116/** 
     117 * @hideinitializer 
     118 * Transaction ID mismatch. 
     119 */ 
     120#define PJLIB_UTIL_ESTUNINVALIDID   (PJLIB_UTIL_ERRNO_START+16) /* 320016 */ 
     121 
     122 
     123#define PJ_STATUS_FROM_STUN_CODE(code)  -1 
    97124 
    98125 
  • pjproject/branches/iceproject/pjlib-util/src/pjlib-util/stun_simple.c

    r912 r913  
    1717 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA  
    1818 */ 
    19 #include <pjlib-util/stun.h> 
     19#include <pjlib-util/stun_simple.h> 
    2020#include <pjlib-util/errno.h> 
    2121#include <pj/pool.h> 
  • pjproject/branches/iceproject/pjlib-util/src/pjlib-util/stun_simple_client.c

    r912 r913  
    1717 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA  
    1818 */ 
    19 #include <pjlib-util/stun.h> 
     19#include <pjlib-util/stun_simple.h> 
    2020#include <pjlib-util/errno.h> 
    2121#include <pj/os.h> 
  • pjproject/branches/iceproject/pjlib/include/pj/pool.h

    r877 r913  
    442442 * 
    443443 * @return pointer to the allocated memory. 
     444 * 
     445 * @see PJ_POOL_ALLOC_TYPE 
    444446 */ 
    445447PJ_IDECL(void*) pj_pool_alloc( pj_pool_t *pool, pj_size_t size); 
     
    461463 
    462464/** 
    463  * @def pj_pool_zalloc(pj_pool_t *pool, pj_size_t size) 
    464465 * Allocate storage from the pool and initialize it to zero. 
    465466 * 
     
    468469 * 
    469470 * @return          Pointer to the allocated memory. 
    470  */ 
    471 #define pj_pool_zalloc(pool, size)  pj_pool_calloc(pool, 1, size) 
     471 * 
     472 * @see PJ_POOL_ZALLOC_TYPE 
     473 */ 
     474PJ_INLINE(void*) pj_pool_zalloc(pj_pool_t *pool, pj_size_t size) 
     475{ 
     476    return pj_pool_calloc(pool, 1, size); 
     477} 
     478 
     479 
     480/** 
     481 * This macro allocates memory from the pool and returns the instance of 
     482 * the specified type. It provides a stricker type safety than pj_pool_alloc() 
     483 * since the return value of this macro will be type-casted to the specified 
     484 * type. 
     485 * 
     486 * @param pool      The pool 
     487 * @param type      The type of object to be allocated 
     488 * 
     489 * @return          Memory buffer of the specified type. 
     490 */ 
     491#define PJ_POOL_ALLOC_TYPE(pool,type) \ 
     492            ((type*)pj_pool_alloc(pool, sizeof(type))) 
     493 
     494/** 
     495 * This macro allocates memory from the pool, zeroes the buffer, and  
     496 * returns the instance of the specified type. It provides a stricker type  
     497 * safety than pj_pool_zalloc() since the return value of this macro will be  
     498 * type-casted to the specified type. 
     499 * 
     500 * @param pool      The pool 
     501 * @param type      The type of object to be allocated 
     502 * 
     503 * @return          Memory buffer of the specified type. 
     504 */ 
     505#define PJ_POOL_ZALLOC_TYPE(pool,type) \ 
     506            ((type*)pj_pool_zalloc(pool, sizeof(type))) 
     507 
    472508 
    473509 
Note: See TracChangeset for help on using the changeset viewer.