Navigation


Changeset 597:f051e3795dae in freeDiameter for extensions/dict_nas_mipv6


Ignore:
Timestamp:
Nov 17, 2010, 7:56:35 PM (13 years ago)
Author:
Francois Bard <francois@tera.ics.keio.ac.jp>
Branch:
default
Children:
598:d46af51c019d, 599:1dade7d4cf2e
Phase:
public
Message:

Updates comments and a compiler dependent piece of code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/dict_nas_mipv6/dict_nas_mipv6.c

    r595 r597  
    3434*********************************************************************************************************/
    3535
    36 /*********************************************************************************************************
     36/*
     37
    3738The following table lists the AVPs needed for the NAS to HAAA server interaction.
    3839We try to keep the structure of the grouped AVP by declaring the contained AVPs just before the grouped AVP they depend on.
     
    4950        MIP6-Agent-Info                         486             5447    Grouped                 yes
    5051
    51 ************************************************************************************************************/
     52*/
    5253
    5354
    5455
    5556#include <freeDiameter/extension.h>
    56 
    57 /*
    58         NOTES TO SELF
    59 
    60         - il faudra verifier les regles particulieres (page 6 de la rfc) 'au moins un des deux avps'
    61 
    62         - IMPLEMENTER LES AVPS QUI MANQUENT
    63 
    64 */
    6557
    6658/* The content of this file follows the same structure as dict_base_proto.c */
     
    139131        /* AVP section */
    140132        {
     133                /* Loading the derived data formats */
     134
     135                struct dict_object * Address_type;
     136                CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Address", &Address_type);
     137
    141138                /* MIP6-Feature-Vector */
    142139                {
     
    158155
    159156                /* MIP-Home-Agent-Address - RFC 4004 */
     157                {
     158                        /*
     159
     160                        */
     161
     162                        struct dict_avp_data data = {
     163                                        334,                                    /* Code */
     164                                        0,                                      /* Vendor */
     165                                        "MIP-Home-Agent-Address",               /* Name */
     166                                        AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY,   /* Fixed flags */
     167                                        AVP_FLAG_MANDATORY,                     /* Fixed flag values */
     168                                        AVP_TYPE_OCTETSTRING                    /* base type of data */
     169                                        };
     170
     171                        CHECK_dict_new( DICT_AVP, &data , Address_type, NULL);
     172                }
    160173
    161174                /* Destination-Host - Base Protocol */
     
    164177
    165178                /* MIP-Home-Agent-Host - RFC 4004 */
     179                {
     180                        /*
     181                        The MIP-Home-Agent-Host AVP (AVP Code 348) is of type Grouped and
     182                        contains the identity of the assigned Home Agent.  If the MIP-Home-
     183                        Agent-Host AVP is present in the AMR, the AAAH MUST copy it into the
     184                        HAR.
     185
     186                         MIP-Home-Agent-Host ::= < AVP Header: 348 >
     187                                                  { Destination-Realm }
     188                                                  { Destination-Host }
     189                                                * [ AVP ]
     190                        */
     191
     192                        struct dict_object * avp;
     193                        struct dict_avp_data data = {
     194                                        348,                                    /* Code */
     195                                        0,                                      /* Vendor */
     196                                        "MIP-Home-Agent-Host",                  /* Name */
     197                                        AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY,   /* Fixed flags */
     198                                        AVP_FLAG_MANDATORY,                     /* Fixed flag values */
     199                                        AVP_TYPE_GROUPED                        /* base type of data */
     200                                        };
     201
     202                        struct local_rules_definition rules[] =
     203                                                {        {  "Destination-Realm",        RULE_REQUIRED, -1, 1 }
     204                                                        ,{  "Destination-Host",         RULE_REQUIRED, -1, 1 }
     205                                                };
     206
     207                        CHECK_dict_new( DICT_AVP, &data , NULL, &avp);
     208                        PARSE_loc_rules( rules, avp );
     209                }
    166210
    167211                /* MIP6-Home-Link-Prefix */
Note: See TracChangeset for help on using the changeset viewer.