Changeset 1052 for pjproject/trunk/pjlib-util/src/pjlib-util/stun_msg.c
- Timestamp:
- Mar 9, 2007 11:25:11 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib-util/src/pjlib-util/stun_msg.c
r1049 r1052 51 51 } stun_err_msg_map[] = 52 52 { 53 { PJ_STUN_S TATUS_TRY_ALTERNATE,"Try Alternate"},54 { PJ_STUN_S TATUS_BAD_REQUEST,"Bad Request"},55 { PJ_STUN_S TATUS_UNAUTHORIZED,"Unauthorized"},56 { PJ_STUN_S TATUS_UNKNOWN_ATTRIBUTE, "Unknown Attribute"},57 { PJ_STUN_S TATUS_STALE_CREDENTIALS, "Stale Credentials"},58 { PJ_STUN_S TATUS_INTEGRITY_CHECK_FAILURE,"Integrity Check Failure"},59 { PJ_STUN_S TATUS_MISSING_USERNAME, "Missing Username"},60 { PJ_STUN_S TATUS_USE_TLS, "Use TLS"},61 { PJ_STUN_S TATUS_MISSING_REALM,"Missing Realm"},62 { PJ_STUN_S TATUS_MISSING_NONCE,"Missing Nonce"},63 { PJ_STUN_S TATUS_UNKNOWN_USERNAME, "Unknown Username"},64 { PJ_STUN_S TATUS_NO_BINDING,"No Binding"},65 { PJ_STUN_S TATUS_STALE_NONCE,"Stale Nonce"},66 { PJ_STUN_S TATUS_TRANSITIONING, "Transitioning"},67 { PJ_STUN_S TATUS_WRONG_USERNAME, "Wrong Username"},68 { PJ_STUN_S TATUS_UNSUPP_TRANSPORT_PROTO,"Unsupported Transport Protocol"},69 { PJ_STUN_S TATUS_INVALID_IP_ADDR, "Invalid IP Address"},70 { PJ_STUN_S TATUS_INVALID_PORT,"Invalid Port"},71 { PJ_STUN_S TATUS_OPER_TCP_ONLY,"Operation for TCP Only"},72 { PJ_STUN_S TATUS_CONNECTION_FAILURE,"Connection Failure"},73 { PJ_STUN_S TATUS_CONNECTION_TIMEOUT,"Connection Timeout"},74 { PJ_STUN_S TATUS_ALLOCATION_QUOTA_REACHED,"Allocation Quota Reached"},75 { PJ_STUN_S TATUS_SERVER_ERROR,"Server Error"},76 { PJ_STUN_S TATUS_INSUFFICIENT_CAPACITY,"Insufficient Capacity"},77 { PJ_STUN_S TATUS_GLOBAL_FAILURE, "Global Failure"}53 { PJ_STUN_SC_TRY_ALTERNATE, "Try Alternate"}, 54 { PJ_STUN_SC_BAD_REQUEST, "Bad Request"}, 55 { PJ_STUN_SC_UNAUTHORIZED, "Unauthorized"}, 56 { PJ_STUN_SC_UNKNOWN_ATTRIBUTE, "Unknown Attribute"}, 57 { PJ_STUN_SC_STALE_CREDENTIALS, "Stale Credentials"}, 58 { PJ_STUN_SC_INTEGRITY_CHECK_FAILURE, "Integrity Check Failure"}, 59 { PJ_STUN_SC_MISSING_USERNAME, "Missing Username"}, 60 { PJ_STUN_SC_USE_TLS, "Use TLS"}, 61 { PJ_STUN_SC_MISSING_REALM, "Missing Realm"}, 62 { PJ_STUN_SC_MISSING_NONCE, "Missing Nonce"}, 63 { PJ_STUN_SC_UNKNOWN_USERNAME, "Unknown Username"}, 64 { PJ_STUN_SC_NO_BINDING, "No Binding"}, 65 { PJ_STUN_SC_STALE_NONCE, "Stale Nonce"}, 66 { PJ_STUN_SC_TRANSITIONING, "Active Destination Already Set"}, 67 { PJ_STUN_SC_WRONG_USERNAME, "Wrong Username"}, 68 { PJ_STUN_SC_UNSUPP_TRANSPORT_PROTO, "Unsupported Transport Protocol"}, 69 { PJ_STUN_SC_INVALID_IP_ADDR, "Invalid IP Address"}, 70 { PJ_STUN_SC_INVALID_PORT, "Invalid Port"}, 71 { PJ_STUN_SC_OPER_TCP_ONLY, "Operation for TCP Only"}, 72 { PJ_STUN_SC_CONNECTION_FAILURE, "Connection Failure"}, 73 { PJ_STUN_SC_CONNECTION_TIMEOUT, "Connection Timeout"}, 74 { PJ_STUN_SC_ALLOCATION_QUOTA_REACHED, "Allocation Quota Reached"}, 75 { PJ_STUN_SC_SERVER_ERROR, "Server Error"}, 76 { PJ_STUN_SC_INSUFFICIENT_CAPACITY, "Insufficient Capacity"}, 77 { PJ_STUN_SC_GLOBAL_FAILURE, "Global Failure"} 78 78 }; 79 79 … … 382 382 { 383 383 { 384 /* ID 0x8021 is not assigned */ 385 NULL, 386 NULL, 387 NULL 388 }, 389 { 390 /* PJ_STUN_ATTR_SERVER, */ 391 "SERVER", 392 &decode_string_attr, 393 &encode_string_attr 394 }, 395 { 396 /* PJ_STUN_ATTR_ALTERNATE_SERVER, */ 397 "ALTERNATE-SERVER", 398 &decode_ip_addr_attr, 399 &encode_ip_addr_attr 400 }, 401 { 402 /* PJ_STUN_ATTR_REFRESH_INTERVAL, */ 403 "REFRESH-INTERVAL", 404 &decode_uint_attr, 405 &encode_uint_attr 406 }, 407 { 408 /* Unassigned, 0x8025 */ 409 NULL, 410 NULL, 411 NULL 412 }, 413 { 414 /* Padding, 0x8026 */ 415 NULL, 416 NULL, 417 NULL 418 }, 419 { 420 /* Padding, 0x8027 */ 421 NULL, 422 NULL, 423 NULL 424 }, 425 { 384 426 /* PJ_STUN_ATTR_FINGERPRINT, */ 385 427 "FINGERPRINT", 386 428 &decode_uint_attr, 387 429 &encode_uint_attr 388 }, 389 { 390 /* PJ_STUN_ATTR_SERVER, */ 391 "SERVER", 392 &decode_string_attr, 393 &encode_string_attr 394 }, 395 { 396 /* PJ_STUN_ATTR_ALTERNATE_SERVER, */ 397 "ALTERNATE-SERVER", 398 &decode_ip_addr_attr, 399 &encode_ip_addr_attr 400 }, 401 { 402 /* PJ_STUN_ATTR_REFRESH_INTERVAL, */ 403 "REFRESH-INTERVAL", 404 &decode_uint_attr, 405 &encode_uint_attr 406 }, 430 } 407 431 }; 408 432 … … 1650 1674 if (p_response) { 1651 1675 pj_stun_msg_create_response(pool, msg, 1652 PJ_STUN_S TATUS_BAD_REQUEST,1676 PJ_STUN_SC_BAD_REQUEST, 1653 1677 &err_msg, p_response); 1654 1678 } … … 1671 1695 */ 1672 1696 if (p_response) { 1673 unsigned err_code = PJ_STUN_S TATUS_UNKNOWN_ATTRIBUTE;1697 unsigned err_code = PJ_STUN_SC_UNKNOWN_ATTRIBUTE; 1674 1698 1675 1699 status = pj_stun_msg_create_response(pool, msg, … … 1706 1730 1707 1731 pj_stun_msg_create_response(pool, msg, 1708 PJ_STUN_S TATUS_BAD_REQUEST,1732 PJ_STUN_SC_BAD_REQUEST, 1709 1733 &e, p_response); 1710 1734 } … … 1727 1751 e = pj_str("MESSAGE-INTEGRITY already present"); 1728 1752 pj_stun_msg_create_response(pool, msg, 1729 PJ_STUN_S TATUS_BAD_REQUEST,1753 PJ_STUN_SC_BAD_REQUEST, 1730 1754 NULL, p_response); 1731 1755 } … … 1741 1765 e = pj_str("FINGERPRINT already present"); 1742 1766 pj_stun_msg_create_response(pool, msg, 1743 PJ_STUN_S TATUS_BAD_REQUEST,1767 PJ_STUN_SC_BAD_REQUEST, 1744 1768 NULL, p_response); 1745 1769 } … … 1755 1779 e = pj_str("Invalid attribute order"); 1756 1780 pj_stun_msg_create_response(pool, msg, 1757 PJ_STUN_S TATUS_BAD_REQUEST,1781 PJ_STUN_SC_BAD_REQUEST, 1758 1782 NULL, p_response); 1759 1783 } … … 1770 1794 e = pj_str("Too many attributes"); 1771 1795 pj_stun_msg_create_response(pool, msg, 1772 PJ_STUN_S TATUS_BAD_REQUEST,1796 PJ_STUN_SC_BAD_REQUEST, 1773 1797 &e, p_response); 1774 1798 }
Note: See TracChangeset
for help on using the changeset viewer.