Ignore:
Timestamp:
Mar 3, 2007 2:16:36 AM (17 years ago)
Author:
bennylp
Message:

Committed today's work on STUN

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib-util/include/pjlib-util/stun_msg.h

    r1021 r1037  
    511511   \endverbatim 
    512512 */ 
    513 typedef struct pj_stun_generic_ip_addr_attr 
     513typedef struct pj_stun_ip_addr_attr 
    514514{ 
    515515    /** 
     
    527527    } addr; 
    528528 
    529 } pj_stun_generic_ip_addr_attr; 
     529} pj_stun_ip_addr_attr; 
    530530 
    531531 
     
    549549 * NONCE attributes, the text MUST be quoted with. 
    550550 */ 
    551 typedef struct pj_stun_generic_string_attr 
     551typedef struct pj_stun_string_attr 
    552552{ 
    553553    /** 
     
    561561    pj_str_t            value; 
    562562 
    563 } pj_stun_generic_string_attr; 
     563} pj_stun_string_attr; 
    564564 
    565565 
     
    568568 * integer value, such as STUN FINGERPRINT and REFRESH-INTERVAL attributes. 
    569569 */ 
    570 typedef struct pj_stun_generic_uint_attr 
     570typedef struct pj_stun_uint_attr 
    571571{ 
    572572    /** 
     
    580580    pj_uint32_t         value; 
    581581 
    582 } pj_stun_generic_uint_attr; 
     582} pj_stun_uint_attr; 
    583583 
    584584 
     
    614614 * bytes. 
    615615 */ 
    616 typedef struct pj_stun_msg_integrity_attr 
     616typedef struct pj_stun_msgint_attr 
    617617{ 
    618618    /** 
     
    626626    pj_uint8_t          hmac[20]; 
    627627 
    628 } pj_stun_msg_integrity_attr; 
     628} pj_stun_msgint_attr; 
    629629 
    630630 
     
    635635 * attribute itself, xor-d with the 32 bit value 0x5354554e 
    636636 */ 
    637 typedef struct pj_stun_generic_uint_attr pj_stun_fingerprint_attr; 
     637typedef struct pj_stun_uint_attr pj_stun_fingerprint_attr; 
    638638 
    639639 
     
    656656 \endverbatim 
    657657 */ 
    658 typedef struct pj_stun_error_code_attr 
     658typedef struct pj_stun_errcode_attr 
    659659{ 
    660660    /** 
     
    683683    pj_str_t            reason; 
    684684 
    685 } pj_stun_error_code_attr; 
     685} pj_stun_errcode_attr; 
    686686 
    687687 
     
    693693 * quotes). 
    694694 */ 
    695 typedef struct pj_stun_generic_string_attr pj_stun_realm_attr; 
     695typedef struct pj_stun_string_attr pj_stun_realm_attr; 
    696696 
    697697 
     
    703703 * values in a server. 
    704704 */ 
    705 typedef struct pj_stun_generic_string_attr pj_stun_nonce_attr; 
     705typedef struct pj_stun_string_attr pj_stun_nonce_attr; 
    706706 
    707707 
     
    740740 * The MAPPED-ADDRESS attribute indicates the mapped transport address. 
    741741 */ 
    742 typedef struct pj_stun_generic_ip_addr_attr pj_stun_mapped_addr_attr; 
     742typedef struct pj_stun_ip_addr_attr pj_stun_mapped_addr_attr; 
    743743 
    744744 
     
    752752 * through NATs which would otherwise interfere with STUN. 
    753753 */ 
    754 typedef struct pj_stun_generic_ip_addr_attr pj_stun_xor_mapped_addr_attr; 
     754typedef struct pj_stun_ip_addr_attr pj_stun_xor_mapped_addr_attr; 
    755755 
    756756 
     
    763763 * SERVER is variable length. 
    764764 */ 
    765 typedef struct pj_stun_generic_string_attr pj_stun_server_attr; 
     765typedef struct pj_stun_string_attr pj_stun_server_attr; 
    766766 
    767767 
     
    772772 * MAPPED-ADDRESS. 
    773773 */ 
    774 typedef struct pj_stun_generic_ip_addr_attr pj_stun_alt_server_attr; 
     774typedef struct pj_stun_ip_addr_attr pj_stun_alt_server_attr; 
    775775 
    776776 
     
    781781 * bindings between the client and server. 
    782782 */ 
    783 typedef struct pj_stun_generic_uint_attr pj_stun_refresh_interval_attr; 
     783typedef struct pj_stun_uint_attr pj_stun_refresh_interval_attr; 
    784784 
    785785 
     
    793793 * RFC 3489-bis standard. 
    794794 */ 
    795 typedef struct pj_stun_generic_ip_addr_attr pj_stun_response_addr_attr; 
     795typedef struct pj_stun_ip_addr_attr pj_stun_response_addr_attr; 
    796796 
    797797 
     
    808808 * RFC 3489-bis standard. 
    809809 */ 
    810 typedef struct pj_stun_generic_ip_addr_attr pj_stun_changed_addr_attr; 
     810typedef struct pj_stun_ip_addr_attr pj_stun_changed_addr_attr; 
    811811 
    812812 
     
    828828 * RFC 3489-bis standard. 
    829829 */ 
    830 typedef struct pj_stun_generic_uint_attr pj_stun_change_request_attr; 
     830typedef struct pj_stun_uint_attr pj_stun_change_request_attr; 
    831831 
    832832/** 
     
    840840 * RFC 3489-bis standard. 
    841841 */ 
    842 typedef struct pj_stun_generic_ip_addr_attr pj_stun_src_addr_attr; 
     842typedef struct pj_stun_ip_addr_attr pj_stun_src_addr_attr; 
    843843 
    844844 
     
    852852 * denial-of-service attacks. 
    853853 */ 
    854 typedef struct pj_stun_generic_ip_addr_attr pj_stun_reflected_from_attr; 
     854typedef struct pj_stun_ip_addr_attr pj_stun_reflected_from_attr; 
    855855 
    856856 
     
    862862 * MESSAGE-INTEGRITY attribute. 
    863863 */ 
    864 typedef struct pj_stun_generic_string_attr pj_stun_username_attr; 
     864typedef struct pj_stun_string_attr pj_stun_username_attr; 
    865865 
    866866 
     
    870870 * PASSWORD attribute. 
    871871 */ 
    872 typedef struct pj_stun_generic_string_attr pj_stun_password_attr; 
     872typedef struct pj_stun_string_attr pj_stun_password_attr; 
    873873 
    874874 
     
    880880 * of seconds remaining until expiration. 
    881881 */ 
    882 typedef struct pj_stun_generic_uint_attr pj_stun_lifetime_attr; 
     882typedef struct pj_stun_uint_attr pj_stun_lifetime_attr; 
    883883 
    884884 
     
    889889 * value represents the sum in the receive and send directions. 
    890890 */ 
    891 typedef struct pj_stun_generic_uint_attr pj_stun_bandwidth_attr; 
     891typedef struct pj_stun_uint_attr pj_stun_bandwidth_attr; 
    892892 
    893893 
     
    897897 * from the STUN relay server. 
    898898 */ 
    899 typedef struct pj_stun_generic_ip_addr_attr pj_stun_remote_addr_attr; 
     899typedef struct pj_stun_ip_addr_attr pj_stun_remote_addr_attr; 
    900900 
    901901 
     
    915915 * address and port that the server allocated to the client. 
    916916 */ 
    917 typedef struct pj_stun_generic_ip_addr_attr pj_stun_relay_addr_attr; 
     917typedef struct pj_stun_ip_addr_attr pj_stun_relay_addr_attr; 
    918918 
    919919 
     
    934934 \endverbatim 
    935935 */ 
    936 typedef struct pj_stun_generic_uint_attr pj_stun_requested_addr_type; 
     936typedef struct pj_stun_uint_attr pj_stun_requested_addr_type; 
    937937 
    938938/** 
     
    954954 \endverbatim   
    955955 */ 
    956 typedef struct pj_stun_generic_uint_attr pj_stun_requested_port_props_attr; 
     956typedef struct pj_stun_uint_attr pj_stun_requested_port_props_attr; 
    957957 
    958958 
     
    963963 * unsigned integer.  Its values are: 0x0000 for UDP and 0x0000 for TCP. 
    964964 */ 
    965 typedef struct pj_stun_generic_uint_attr pj_stun_requested_transport_attr; 
     965typedef struct pj_stun_uint_attr pj_stun_requested_transport_attr; 
    966966 
    967967 
     
    971971 * specific IP address be allocated to it. 
    972972 */ 
    973 typedef struct pj_stun_generic_ip_addr_attr pj_stun_requested_ip_attr; 
     973typedef struct pj_stun_ip_addr_attr pj_stun_requested_ip_attr; 
    974974 
    975975/** 
     
    983983 * to XOR-MAPPED-ADDRESS. 
    984984 */ 
    985 typedef struct pj_stun_generic_ip_addr_attr pj_stun_xor_reflected_from_attr; 
     985typedef struct pj_stun_ip_addr_attr pj_stun_xor_reflected_from_attr; 
    986986 
    987987/** 
     
    992992 * type of 0x0024. 
    993993 */ 
    994 typedef struct pj_stun_generic_uint_attr pj_stun_priority_attr; 
     994typedef struct pj_stun_uint_attr pj_stun_priority_attr; 
    995995 
    996996/** 
     
    10111011 * the STUN-aware NATs along the path. 
    10121012 */ 
    1013 typedef pj_stun_generic_ip_addr_attr pj_stun_xor_internal_addr_attr; 
     1013typedef pj_stun_ip_addr_attr pj_stun_xor_internal_addr_attr; 
    10141014 
    10151015/** 
     
    10191019 * client, the value of the timer used in the server state machine. 
    10201020 */ 
    1021 typedef struct pj_stun_generic_uint_attr pj_stun_timer_val_attr; 
     1021typedef struct pj_stun_uint_attr pj_stun_timer_val_attr; 
    10221022 
    10231023 
     
    10481048 
    10491049/** STUN decoding options */ 
    1050 enum pj_stun_options 
     1050enum pj_stun_decode_options 
    10511051{ 
    10521052    /**  
     
    10631063    PJ_STUN_CHECK_PACKET    = 2 
    10641064}; 
     1065 
    10651066 
    10661067/** 
     
    12081209 * @param pdu_len       The length of the packet buffer. 
    12091210 * @param options       Additional options to be applied in the checking, 
    1210  *                      which can be taken from pj_stun_options. One of the 
    1211  *                      useful option is PJ_STUN_IS_DATAGRAM which means that 
    1212  *                      the pdu represents a whole STUN packet. 
     1211 *                      which can be taken from pj_stun_decode_options. One  
     1212 *                      of the useful option is PJ_STUN_IS_DATAGRAM which  
     1213 *                      means that the pdu represents a whole STUN packet. 
    12131214 * 
    12141215 * @return              PJ_SUCCESS if the PDU is a potentially valid STUN 
    12151216 *                      message. 
    12161217 */ 
    1217 PJ_DECL(pj_status_t) pj_stun_msg_check(const pj_uint8_t *pdu, unsigned pdu_len, 
    1218                                        unsigned options); 
     1218PJ_DECL(pj_status_t) pj_stun_msg_check(const pj_uint8_t *pdu,  
     1219                                       unsigned pdu_len, unsigned options); 
    12191220 
    12201221 
     
    12251226 * @param pdu           The incoming packet to be parsed. 
    12261227 * @param pdu_len       The length of the incoming packet. 
    1227  * @param options       Parsing flags, according to pj_stun_options. 
     1228 * @param options       Parsing flags, according to pj_stun_decode_options. 
    12281229 * @param p_msg         Pointer to receive the parsed message. 
    12291230 * @param p_parsed_len  Optional pointer to receive how many bytes have 
     
    12481249                                        pj_stun_msg **p_response); 
    12491250 
    1250 typedef enum pj_stun_auth_policy_type 
    1251 { 
    1252     PJ_STUN_POLICY_NONE, 
    1253     PJ_STUN_POLICY_STATIC_SHORT_TERM, 
    1254     PJ_STUN_POLICY_STATIC_LONG_TERM, 
    1255     PJ_STUN_POLICY_DYNAMIC 
    1256 } pj_stun_auth_policy_type; 
    1257  
    1258 typedef struct pj_stun_auth_policy 
    1259 { 
    1260     pj_stun_auth_policy_type    type; 
    1261     void                       *user_data; 
    1262  
    1263     union  
    1264     { 
    1265         struct 
    1266         { 
    1267             pj_str_t      username; 
    1268             pj_str_t      password; 
    1269             pj_str_t      nonce; 
    1270         } static_short_term; 
    1271  
    1272         struct 
    1273         { 
    1274             pj_str_t      realm; 
    1275             pj_str_t      username; 
    1276             pj_str_t      password; 
    1277             pj_str_t      nonce; 
    1278         } static_long_term; 
    1279  
    1280         struct 
    1281         { 
    1282             /** 
    1283              * This callback is called by pj_stun_verify_credential() when 
    1284              * server needs to challenge the request with 401 response. 
    1285              * 
    1286              * @param user_data The user data as specified in the policy. 
    1287              * @param pool      Pool to allocate memory. 
    1288              * @param realm     On return, the function should fill in with 
    1289              *                  realm if application wants to use long term 
    1290              *                  credential. Otherwise application should set 
    1291              *                  empty string for the realm. 
    1292              * @param nonce     On return, if application wants to use long 
    1293              *                  term credential, it MUST fill in the nonce 
    1294              *                  with some value. Otherwise  if short term  
    1295              *                  credential is wanted, it MAY set this value. 
    1296              *                  If short term credential is wanted and the 
    1297              *                  application doesn't want to include NONCE, 
    1298              *                  then it must set this to empty string. 
    1299              * 
    1300              * @return          The callback should return PJ_SUCCESS, or 
    1301              *                  otherwise response message will not be  
    1302              *                  created. 
    1303              */ 
    1304             pj_status_t (*get_auth)(void *user_data, 
    1305                                     pj_pool_t *pool, 
    1306                                     pj_str_t *realm, 
    1307                                     pj_str_t *nonce); 
    1308  
    1309             /** 
    1310              * Get the password for the specified username. This function  
    1311              * is also used to check whether the username is valid. 
    1312              * 
    1313              * @param user_data The user data as specified in the policy. 
    1314              * @param realm     The realm as specified in the message. 
    1315              * @param username  The username as specified in the message. 
    1316              * @param pool      Pool to allocate memory when necessary. 
    1317              * @param password  On return, application should fill up this 
    1318              *                  argument with the password. 
    1319              * 
    1320              * @return          The callback should return PJ_SUCCESS if 
    1321              *                  username has been successfully verified 
    1322              *                  and password was obtained. If non-PJ_SUCCESS 
    1323              *                  is returned, it is assumed that the 
    1324              *                  username is not valid. 
    1325              */ 
    1326             pj_status_t (*get_password)(void *user_data,  
    1327                                         const pj_str_t *realm, 
    1328                                         const pj_str_t *username, 
    1329                                         pj_pool_t *pool, 
    1330                                         pj_str_t *password); 
    1331             pj_bool_t   (*require_nonce)(void *user_data, 
    1332                                          const pj_str_t *realm, 
    1333                                          const pj_str_t *username); 
    1334             pj_bool_t   (*verify_nonce)(void *data, 
    1335                                         const pj_str_t *realm, 
    1336                                         const pj_str_t *username, 
    1337                                         const pj_str_t *nonce); 
    1338             pj_status_t (*make_nonce)(void *user_data, 
    1339                                       const pj_str_t *realm, 
    1340                                       const pj_str_t *username, 
    1341                                       pj_pool_t *pool, 
    1342                                       pj_str_t *nonce); 
    1343         } dynamic; 
    1344  
    1345     } data; 
    1346  
    1347 } pj_stun_auth_policy; 
    1348  
    1349  
    1350 /** 
    1351  * Verify credential in the STUN message. Note that before calling this 
    1352  * function, application must have checked that the message contains 
    1353  * PJ_STUN_ATTR_MESSAGE_INTEGRITY attribute by calling pj_stun_msg_find_attr() 
    1354  * function, because this function will reject the message with 401 error 
    1355  * if it doesn't contain PJ_STUN_ATTR_MESSAGE_INTEGRITY attribute. 
    1356  * 
    1357  * @param pkt           The original packet which has been parsed into 
    1358  *                      the message. This packet MUST NOT have been modified 
    1359  *                      after the parsing. 
    1360  * @param pkt_len       The length of the packet. 
    1361  * @param msg           The parsed message to be verified. 
    1362  * @param policy        Pointer to authentication policy. 
    1363  * @param pool          If response is to be created, then memory will 
    1364  *                      be allocated from this pool. 
    1365  * @param p_response    Optional pointer to receive the response message 
    1366  *                      then the credential in the request fails to 
    1367  *                      authenticate. 
    1368  * 
    1369  * @return              PJ_SUCCESS if credential is verified successfully. 
    1370  *                      If the verification fails and \a p_response is not 
    1371  *                      NULL, an appropriate response will be returned in 
    1372  *                      \a p_response. 
    1373  */ 
    1374 PJ_DECL(pj_status_t) pj_stun_verify_credential(const pj_uint8_t *pkt, 
    1375                                                unsigned pkt_len, 
    1376                                                const pj_stun_msg *msg, 
    1377                                                pj_stun_auth_policy *policy, 
    1378                                                pj_pool_t *pool, 
    1379                                                pj_stun_msg **p_response); 
    1380  
    1381  
    13821251/** 
    13831252 * Dump STUN message to a printable string output. 
     
    14311300 * @return              PJ_SUCCESS on success or the appropriate error code. 
    14321301 */ 
    1433 PJ_DECL(pj_status_t)  
    1434 pj_stun_generic_ip_addr_attr_create(pj_pool_t *pool, 
    1435                                     int attr_type,  
    1436                                     pj_bool_t xor_ed, 
    1437                                     const pj_sockaddr_t *addr, 
    1438                                     unsigned addr_len, 
    1439                                     pj_stun_generic_ip_addr_attr **p_attr); 
     1302PJ_DECL(pj_status_t) pj_stun_ip_addr_attr_create(pj_pool_t *pool, 
     1303                                                int attr_type,  
     1304                                                pj_bool_t xor_ed, 
     1305                                                const pj_sockaddr_t *addr, 
     1306                                                unsigned addr_len, 
     1307                                                pj_stun_ip_addr_attr **p_attr); 
    14401308 
    14411309 
     
    14551323 * @return              PJ_SUCCESS on success or the appropriate error code. 
    14561324 */ 
    1457 PJ_DECL(pj_status_t)  
    1458 pj_stun_msg_add_generic_ip_addr_attr(pj_pool_t *pool, 
    1459                                      pj_stun_msg *msg, 
    1460                                      int attr_type,  
    1461                                      pj_bool_t xor_ed, 
    1462                                      const pj_sockaddr_t *addr, 
    1463                                      unsigned addr_len); 
     1325PJ_DECL(pj_status_t) pj_stun_msg_add_ip_addr_attr(pj_pool_t *pool, 
     1326                                                  pj_stun_msg *msg, 
     1327                                                  int attr_type,  
     1328                                                  pj_bool_t xor_ed, 
     1329                                                  const pj_sockaddr_t *addr, 
     1330                                                  unsigned addr_len); 
    14641331 
    14651332/** 
     
    14731340 * @return              PJ_SUCCESS on success or the appropriate error code. 
    14741341 */ 
    1475 PJ_DECL(pj_status_t)  
    1476 pj_stun_generic_string_attr_create(pj_pool_t *pool, 
    1477                                    int attr_type, 
    1478                                    const pj_str_t *value, 
    1479                                    pj_stun_generic_string_attr **p_attr); 
     1342PJ_DECL(pj_status_t) pj_stun_string_attr_create(pj_pool_t *pool, 
     1343                                                int attr_type, 
     1344                                                const pj_str_t *value, 
     1345                                                pj_stun_string_attr **p_attr); 
    14801346 
    14811347/** 
     
    14891355 * @return              PJ_SUCCESS on success or the appropriate error code. 
    14901356 */ 
    1491 PJ_DECL(pj_status_t)  
    1492 pj_stun_msg_add_generic_string_attr(pj_pool_t *pool, 
    1493                                     pj_stun_msg *msg, 
    1494                                     int attr_type, 
    1495                                     const pj_str_t *value); 
     1357PJ_DECL(pj_status_t) pj_stun_msg_add_string_attr(pj_pool_t *pool, 
     1358                                                 pj_stun_msg *msg, 
     1359                                                 int attr_type, 
     1360                                                 const pj_str_t *value); 
    14961361 
    14971362/** 
     
    15051370 * @return              PJ_SUCCESS on success or the appropriate error code. 
    15061371 */ 
    1507 PJ_DECL(pj_status_t)  
    1508 pj_stun_generic_uint_attr_create(pj_pool_t *pool, 
    1509                                  int attr_type, 
    1510                                  pj_uint32_t value, 
    1511                                  pj_stun_generic_uint_attr **p_attr); 
     1372PJ_DECL(pj_status_t) pj_stun_uint_attr_create(pj_pool_t *pool, 
     1373                                              int attr_type, 
     1374                                              pj_uint32_t value, 
     1375                                              pj_stun_uint_attr **p_attr); 
    15121376 
    15131377/** 
     
    15211385 * @return              PJ_SUCCESS on success or the appropriate error code. 
    15221386 */ 
    1523 PJ_DECL(pj_status_t)  
    1524 pj_stun_msg_add_generic_uint_attr(pj_pool_t *pool, 
    1525                                   pj_stun_msg *msg, 
    1526                                   int attr_type, 
    1527                                   pj_uint32_t value); 
     1387PJ_DECL(pj_status_t) pj_stun_msg_add_uint_attr(pj_pool_t *pool, 
     1388                                               pj_stun_msg *msg, 
     1389                                               int attr_type, 
     1390                                               pj_uint32_t value); 
    15281391 
    15291392 
     
    15361399 * @return              PJ_SUCCESS on success or the appropriate error code. 
    15371400 */ 
    1538 PJ_DECL(pj_status_t)  
    1539 pj_stun_msg_integrity_attr_create(pj_pool_t *pool, 
    1540                                   pj_stun_msg_integrity_attr **p_attr); 
     1401PJ_DECL(pj_status_t) pj_stun_msgint_attr_create(pj_pool_t *pool, 
     1402                                                pj_stun_msgint_attr **p_attr); 
     1403 
     1404/**  
     1405 * Create and add STUN MESSAGE-INTEGRITY attribute. 
     1406 * 
     1407 * @param pool          The pool to allocate memory from. 
     1408 * @param msg           The STUN message 
     1409 * 
     1410 * @return              PJ_SUCCESS on success or the appropriate error code. 
     1411 */ 
     1412PJ_DECL(pj_status_t) pj_stun_msg_add_msgint_attr(pj_pool_t *pool, 
     1413                                                 pj_stun_msg *msg); 
    15411414 
    15421415/** 
     
    15511424 * @return              PJ_SUCCESS on success or the appropriate error code. 
    15521425 */ 
    1553 PJ_DECL(pj_status_t)  
    1554 pj_stun_error_code_attr_create(pj_pool_t *pool, 
    1555                                int err_code, 
    1556                                const pj_str_t *err_reason, 
    1557                                pj_stun_error_code_attr **p_attr); 
    1558  
     1426PJ_DECL(pj_status_t) pj_stun_errcode_attr_create(pj_pool_t *pool, 
     1427                                                int err_code, 
     1428                                                const pj_str_t *err_reason, 
     1429                                                pj_stun_errcode_attr **p_attr); 
     1430 
     1431 
     1432/** 
     1433 * Create and add STUN ERROR-CODE attribute to the message. 
     1434 * 
     1435 * @param pool          The pool to allocate memory from. 
     1436 * @param msg           The STUN mesage. 
     1437 * @param err_code      STUN error code. 
     1438 * @param err_reason    Optional STUN error reason. If NULL is given, the 
     1439 *                      standard error reason will be given. 
     1440 * 
     1441 * @return              PJ_SUCCESS on success or the appropriate error code. 
     1442 */ 
     1443PJ_DECL(pj_status_t) pj_stun_msg_add_errcode_attr(pj_pool_t *pool, 
     1444                                                  pj_stun_msg *msg, 
     1445                                                  int err_code, 
     1446                                                  const pj_str_t *err_reason); 
    15591447 
    15601448/** 
     
    15691457 * @return              PJ_SUCCESS on success or the appropriate error code. 
    15701458 */ 
    1571 PJ_DECL(pj_status_t)  
    1572 pj_stun_unknown_attr_create(pj_pool_t *pool, 
    1573                             unsigned attr_cnt, 
    1574                             const pj_uint16_t attr[], 
    1575                             pj_stun_unknown_attr **p_attr); 
     1459PJ_DECL(pj_status_t) pj_stun_unknown_attr_create(pj_pool_t *pool, 
     1460                                                unsigned attr_cnt, 
     1461                                                const pj_uint16_t attr[], 
     1462                                                pj_stun_unknown_attr **p_attr); 
    15761463 
    15771464/** 
     
    15851472 * @return              PJ_SUCCESS on success or the appropriate error code. 
    15861473 */ 
    1587 PJ_DECL(pj_status_t)  
    1588 pj_stun_msg_add_unknown_attr(pj_pool_t *pool, 
    1589                              pj_stun_msg *msg, 
    1590                              unsigned attr_cnt, 
    1591                              const pj_uint16_t attr[]); 
     1474PJ_DECL(pj_status_t) pj_stun_msg_add_unknown_attr(pj_pool_t *pool, 
     1475                                                  pj_stun_msg *msg, 
     1476                                                  unsigned attr_cnt, 
     1477                                                  const pj_uint16_t attr[]); 
    15921478 
    15931479/** 
     
    16041490 * @return              PJ_SUCCESS on success or the appropriate error code. 
    16051491 */ 
    1606 PJ_DECL(pj_status_t) 
    1607 pj_stun_binary_attr_create(pj_pool_t *pool, 
    1608                            int attr_type, 
    1609                            const pj_uint8_t *data, 
    1610                            unsigned length, 
    1611                            pj_stun_binary_attr **p_attr); 
     1492PJ_DECL(pj_status_t) pj_stun_binary_attr_create(pj_pool_t *pool, 
     1493                                                int attr_type, 
     1494                                                const pj_uint8_t *data, 
     1495                                                unsigned length, 
     1496                                                pj_stun_binary_attr **p_attr); 
    16121497 
    16131498/** 
     
    16251510 * @return              PJ_SUCCESS on success or the appropriate error code. 
    16261511 */ 
    1627 PJ_DECL(pj_status_t) 
    1628 pj_stun_msg_add_binary_attr(pj_pool_t *pool, 
    1629                             pj_stun_msg *msg, 
    1630                             int attr_type, 
    1631                             const pj_uint8_t *data, 
    1632                             unsigned length); 
     1512PJ_DECL(pj_status_t) pj_stun_msg_add_binary_attr(pj_pool_t *pool, 
     1513                                                 pj_stun_msg *msg, 
     1514                                                 int attr_type, 
     1515                                                 const pj_uint8_t *data, 
     1516                                                 unsigned length); 
    16331517 
    16341518 
Note: See TracChangeset for help on using the changeset viewer.