Mercurial > hg > freeDiameter-dtls
diff libfdcore/fdd.y @ 1180:773498f59520
Preparing for future DTLS/SCTP support
author | Sebastien Decugis <sdecugis@freediameter.net> |
---|---|
date | Wed, 05 Jun 2013 15:02:29 +0800 |
parents | cafdcbcb5e79 |
children | 50bf33dc8fe0 |
line wrap: on
line diff
--- a/libfdcore/fdd.y Tue Jun 04 18:41:07 2013 +0800 +++ b/libfdcore/fdd.y Wed Jun 05 15:02:29 2013 +0800 @@ -97,6 +97,7 @@ %token REALM %token PORT %token SECPORT +%token SEC3436 %token NOIP %token NOIP6 %token NOTCP @@ -132,6 +133,7 @@ | conffile twtimer | conffile port | conffile secport + | conffile sec3436 | conffile sctpstreams | conffile listenon | conffile norelay @@ -205,6 +207,14 @@ } ; +sec3436: SEC3436 '=' INTEGER ';' + { + CHECK_PARAMS_DO( ($3 >= 0) && ($3 < 1<<16), + { yyerror (&yylloc, conf, "Invalid value"); YYERROR; } ); + conf->cnf_port_3436 = (uint16_t)$3; + } + ; + sctpstreams: SCTPSTREAMS '=' INTEGER ';' { CHECK_PARAMS_DO( ($3 > 0) && ($3 < 1<<16), @@ -452,6 +462,10 @@ { fddpi.config.pic_flags.sec |= PI_SEC_NONE; } + | peerparams SEC3436 ';' + { + fddpi.config.pic_flags.sctpsec |= PI_SCTPSEC_3436; + } | peerparams REALM '=' QSTRING ';' { fddpi.config.pic_realm = $4;