Ignore:
Timestamp:
Mar 20, 2007 10:36:54 PM (17 years ago)
Author:
bennylp
Message:

Today's work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjnath/include/pjnath/stun_auth.h

    r1080 r1089  
    156156 
    157157            /** 
     158             * Get the credential to be put in outgoing message. 
     159             * 
     160             * @param msg       The outgoing message where the credential is 
     161             *                  to be applied. 
     162             * @param user_data The user data as specified in the credential. 
     163             * @param pool      Pool where the callback can allocate memory 
     164             *                  to fill in the credential. 
     165             * @param realm     On return, the callback may specify the realm 
     166             *                  if long term credential is desired, otherwise 
     167             *                  this string must be set to empty. 
     168             * @param username  On return, the callback must fill in with the 
     169             *                  username. 
     170             * @param nonce     On return, the callback may optionally fill in 
     171             *                  this argument with NONCE value if desired, 
     172             *                  otherwise this argument must be set to empty. 
     173             * @param data_type On return, the callback must set this argument 
     174             *                  with the type of password in the data argument. 
     175             * @param data      On return, the callback must set this with 
     176             *                  the password, encoded according to data_type 
     177             *                  argument. 
     178             * 
     179             * @return          The callback must return PJ_SUCCESS, otherwise 
     180             *                  the message transmission will be cancelled. 
     181             */ 
     182            pj_status_t (*get_cred)(const pj_stun_msg *msg, 
     183                                    void *user_data, 
     184                                    pj_pool_t *pool, 
     185                                    pj_str_t *realm, 
     186                                    pj_str_t *username, 
     187                                    pj_str_t *nonce, 
     188                                    int *data_type, 
     189                                    pj_str_t *data); 
     190 
     191            /** 
    158192             * Get the password for the specified username. This function  
    159193             * is also used to check whether the username is valid. 
    160194             * 
     195             * @param msg       The STUN message where the password will be 
     196             *                  applied to. 
    161197             * @param user_data The user data as specified in the credential. 
    162198             * @param realm     The realm as specified in the message. 
     
    176212             *                  username is not valid. 
    177213             */ 
    178             pj_status_t (*get_password)(void *user_data,  
     214            pj_status_t (*get_password)(const pj_stun_msg *msg, 
     215                                        void *user_data,  
    179216                                        const pj_str_t *realm, 
    180217                                        const pj_str_t *username, 
     
    188225             * PJ_FALSE, 438 (Stale Nonce) response will be created. 
    189226             * 
     227             * @param msg       The STUN message where the nonce was received. 
    190228             * @param user_data The user data as specified in the credential. 
    191229             * @param realm     The realm as specified in the message. 
     
    196234             *                  NONCE can be accepted. 
    197235             */ 
    198             pj_bool_t   (*verify_nonce)(void *user_data, 
     236            pj_bool_t   (*verify_nonce)(const pj_stun_msg *msg, 
     237                                        void *user_data, 
    199238                                        const pj_str_t *realm, 
    200239                                        const pj_str_t *username, 
Note: See TracChangeset for help on using the changeset viewer.