Navigation


Changeset 271:411314907b43 in freeDiameter for extensions/app_radgw/rgwx_auth.c


Ignore:
Timestamp:
Apr 20, 2010, 7:34:59 PM (14 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Added translation of Accounting messages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/app_radgw/rgwx_auth.c

    r264 r271  
    4747#define CC_AA                   265     /* AAR */
    4848#define CC_DIAMETER_EAP         268     /* DER */
    49 #define CC_DIAMETER_EAP         268     /* DER */
    5049#define ACV_ART_AUTHORIZE_AUTHENTICATE  3       /* AUTHORIZE_AUTHENTICATE */
    5150#define ACV_OAP_RADIUS                  1       /* RADIUS */
     
    5655/* The state we keep for this plugin */
    5756struct rgwp_config {
    58         struct session_handler * sess_hdl; /* We store RADIUS request authenticator information in the session */
    5957        struct {
    6058                struct dict_object * ARAP_Password;             /* ARAP-Password */
     
    120118               
    121119        } dict; /* cache of the dictionary objects we use */
     120        struct session_handler * sess_hdl; /* We store RADIUS request authenticator information in the session */
    122121        char * confstr;
    123122};
     
    768767                                                if (tag > 0x1F) tag = 0;                                                        \
    769768                                                if (avp_tun[tag] == NULL) {                                                     \
    770                                                         CHECK_FCT( fd_msg_avp_new ( cs->dict.Tunneling, 0, &avp_tun[tag] ) );           \
     769                                                        CHECK_FCT( fd_msg_avp_new ( cs->dict.Tunneling, 0, &avp_tun[tag] ) );   \
    771770                                                        CHECK_FCT( fd_msg_avp_add (*diam_fw, MSG_BRW_LAST_CHILD, avp_tun[tag]));\
    772771                                                }                                                                               \
     
    774773                       
    775774                        /* Convert an attribute to an OctetString AVP and add inside the Tunneling AVP corresponding to the tag */
    776                         #define CONV2DIAM_TUN_STR( _dictobj_ ) {                                                        \
     775                        #define CONV2DIAM_TUN_STR( _dictobj_ ) {                                                \
    777776                                uint8_t tag;                                                                    \
    778777                                CHECK_PARAMS( attr->length >= 3);                                               \
     
    786785                               
    787786                        /* Convert an attribute to a scalar AVP and add inside the Tunneling AVP corresponding to the tag */
    788                         #define CONV2DIAM_TUN_24B( _dictobj_ ) {                                                        \
     787                        #define CONV2DIAM_TUN_24B( _dictobj_ ) {                                                \
    789788                                uint8_t tag;                                                                    \
    790789                                CHECK_PARAMS( attr->length == 6);                                               \
     
    916915static int auth_diam_ans( struct rgwp_config * cs, struct session * session, struct msg ** diam_ans, struct radius_msg ** rad_fw, struct rgw_client * cli )
    917916{
    918         struct msg_hdr *mhdr;
    919917        struct avp *avp, *next, *avp_x, *avp_y, *asid, *aoh;
    920918        struct avp_hdr *ahdr, *sid, *oh;
     
    931929                CHECK_FCT( fd_sess_state_retrieve( cs->sess_hdl, session, &req_auth ) );
    932930        }
    933        
    934         CHECK_FCT( fd_msg_hdr( *diam_ans, &mhdr ) );
    935931       
    936932        /*     
     
    14661462                                                                                break;
    14671463                                                                               
    1468                                                                         case DIAM_ATTR_TUNNEL_ASSIGNEMENT_ID:
    1469                                                                                 CONV2RAD_TUN_STR(RADIUS_ATTR_TUNNEL_ASSIGNEMENT_ID, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 1);
     1464                                                                        case DIAM_ATTR_TUNNEL_ASSIGNMENT_ID:
     1465                                                                                CONV2RAD_TUN_STR(RADIUS_ATTR_TUNNEL_ASSIGNMENT_ID, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 1);
    14701466                                                                                break;
    14711467                                                                               
Note: See TracChangeset for help on using the changeset viewer.