Navigation


Changeset 10:c5c99c73c2bf in freeDiameter for freeDiameter/fdd.y


Ignore:
Timestamp:
Sep 25, 2009, 4:12:08 PM (15 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Added some extensions and functions in the daemon

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freeDiameter/fdd.y

    r8 r10  
    6363{
    6464        if (ploc->first_line != ploc->last_line)
    65                 fprintf(stderr, "%s:%d.%d-%d.%d : %s\n", conf->conf_file, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
     65                fprintf(stderr, "%s:%d.%d-%d.%d : %s\n", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
    6666        else if (ploc->first_column != ploc->last_column)
    67                 fprintf(stderr, "%s:%d.%d-%d : %s\n", conf->conf_file, ploc->first_line, ploc->first_column, ploc->last_column, s);
     67                fprintf(stderr, "%s:%d.%d-%d : %s\n", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_column, s);
    6868        else
    69                 fprintf(stderr, "%s:%d.%d : %s\n", conf->conf_file, ploc->first_line, ploc->first_column, s);
     69                fprintf(stderr, "%s:%d.%d : %s\n", conf->cnf_file, ploc->first_line, ploc->first_column, s);
    7070}
    7171
     
    111111                        | conffile localidentity
    112112                        | conffile localrealm
     113                        | conffile tctimer
     114                        | conffile twtimer
    113115                        | conffile localport
    114116                        | conffile localsecport
     117                        | conffile sctpstreams
     118                        | conffile listenon
     119                        | conffile norelay
    115120                        | conffile noip
    116121                        | conffile noip6
     
    119124                        | conffile prefertcp
    120125                        | conffile oldtls
    121                         | conffile sctpstreams
    122                         | conffile listenon
    123                         | conffile tctimer
    124                         | conffile twtimer
    125                         | conffile norelay
    126126                        | conffile loadext
    127127                        ;
     
    129129localidentity:          LOCALIDENTITY '=' QSTRING ';'
    130130                        {
    131                                 conf->diam_id = $3;
     131                                conf->cnf_diamid = $3;
    132132                        }
    133133                        ;
     
    135135localrealm:             LOCALREALM '=' QSTRING ';'
    136136                        {
    137                                 conf->diam_realm = $3;
     137                                conf->cnf_diamrlm = $3;
     138                        }
     139                        ;
     140
     141tctimer:                TCTIMER '=' INTEGER ';'
     142                        {
     143                                CHECK_PARAMS_DO( ($3 > 0),
     144                                        { yyerror (&yylloc, conf, "Invalid value"); YYERROR; } );
     145                                conf->cnf_timer_tc = (unsigned int)$3;
     146                        }
     147                        ;
     148
     149twtimer:                TWTIMER '=' INTEGER ';'
     150                        {
     151                                CHECK_PARAMS_DO( ($3 > 5),
     152                                        { yyerror (&yylloc, conf, "Invalid value"); YYERROR; } );
     153                                conf->cnf_timer_tw = (unsigned int)$3;
    138154                        }
    139155                        ;
     
    143159                                CHECK_PARAMS_DO( ($3 > 0) && ($3 < 1<<16),
    144160                                        { yyerror (&yylloc, conf, "Invalid value"); YYERROR; } );
    145                                 conf->loc_port = (uint16_t)$3;
     161                                conf->cnf_port = (uint16_t)$3;
    146162                        }
    147163                        ;
     
    151167                                CHECK_PARAMS_DO( ($3 > 0) && ($3 < 1<<16),
    152168                                        { yyerror (&yylloc, conf, "Invalid value"); YYERROR; } );
    153                                 conf->loc_port_tls = (uint16_t)$3;
    154                         }
    155                         ;
    156 
    157 noip:                   NOIP ';'
    158                         {
    159                                 conf->flags.no_ip4 = 1;
    160                         }
    161                         ;
    162 
    163 noip6:                  NOIP6 ';'
    164                         {
    165                                 conf->flags.no_ip6 = 1;
    166                         }
    167                         ;
    168 
    169 notcp:                  NOTCP ';'
    170                         {
    171                                 conf->flags.no_tcp = 1;
    172                         }
    173                         ;
    174 
    175 nosctp:                 NOSCTP ';'
    176                         {
    177                                 conf->flags.no_sctp = 1;
    178                         }
    179                         ;
    180 
    181 prefertcp:              PREFERTCP ';'
    182                         {
    183                                 conf->flags.pr_tcp = 1;
    184                         }
    185                         ;
    186 
    187 oldtls:                 OLDTLS ';'
    188                         {
    189                                 conf->flags.tls_alg = 1;
     169                                conf->cnf_port_tls = (uint16_t)$3;
    190170                        }
    191171                        ;
     
    195175                                CHECK_PARAMS_DO( ($3 > 0) && ($3 < 1<<16),
    196176                                        { yyerror (&yylloc, conf, "Invalid value"); YYERROR; } );
    197                                 conf->loc_sctp_str = (uint16_t)$3;
     177                                conf->cnf_sctp_str = (uint16_t)$3;
    198178                        }
    199179                        ;
     
    218198                                free($3);
    219199                                freeaddrinfo(ai);
    220                                 fd_list_insert_before(&conf->loc_endpoints, &ep->chain);
    221                         }
    222                         ;
    223 
    224 tctimer:                TCTIMER '=' INTEGER ';'
    225                         {
    226                                 CHECK_PARAMS_DO( ($3 > 0),
    227                                         { yyerror (&yylloc, conf, "Invalid value"); YYERROR; } );
    228                                 conf->timer_tc = (unsigned int)$3;
    229                         }
    230                         ;
    231 
    232 twtimer:                TWTIMER '=' INTEGER ';'
    233                         {
    234                                 CHECK_PARAMS_DO( ($3 > 5),
    235                                         { yyerror (&yylloc, conf, "Invalid value"); YYERROR; } );
    236                                 conf->timer_tw = (unsigned int)$3;
     200                                fd_list_insert_before(&conf->cnf_endpoints, &ep->chain);
    237201                        }
    238202                        ;
     
    240204norelay:                NORELAY ';'
    241205                        {
    242                                 conf->flags.no_fwd = 1;
     206                                conf->cnf_flags.no_fwd = 1;
     207                        }
     208                        ;
     209
     210noip:                   NOIP ';'
     211                        {
     212                                conf->cnf_flags.no_ip4 = 1;
     213                        }
     214                        ;
     215
     216noip6:                  NOIP6 ';'
     217                        {
     218                                conf->cnf_flags.no_ip6 = 1;
     219                        }
     220                        ;
     221
     222notcp:                  NOTCP ';'
     223                        {
     224                                conf->cnf_flags.no_tcp = 1;
     225                        }
     226                        ;
     227
     228nosctp:                 NOSCTP ';'
     229                        {
     230                                conf->cnf_flags.no_sctp = 1;
     231                        }
     232                        ;
     233
     234prefertcp:              PREFERTCP ';'
     235                        {
     236                                conf->cnf_flags.pr_tcp = 1;
     237                        }
     238                        ;
     239
     240oldtls:                 OLDTLS ';'
     241                        {
     242                                conf->cnf_flags.tls_alg = 1;
    243243                        }
    244244                        ;
Note: See TracChangeset for help on using the changeset viewer.