Main Page | Class Hierarchy | Class List | File List | Class Members

diameter_eap_parser.hxx

00001 /* BEGIN_COPYRIGHT                                                        */
00002 /*                                                                        */
00003 /* Open Diameter: Open-source software for the Diameter and               */
00004 /*                Diameter related protocols                              */
00005 /*                                                                        */
00006 /* Copyright (C) 2002-2004 Open Diameter Project                          */
00007 /*                                                                        */
00008 /* This library is free software; you can redistribute it and/or modify   */
00009 /* it under the terms of the GNU Lesser General Public License as         */
00010 /* published by the Free Software Foundation; either version 2.1 of the   */
00011 /* License, or (at your option) any later version.                        */
00012 /*                                                                        */
00013 /* This library is distributed in the hope that it will be useful,        */
00014 /* but WITHOUT ANY WARRANTY; without even the implied warranty of         */
00015 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU      */
00016 /* Lesser General Public License for more details.                        */
00017 /*                                                                        */
00018 /* You should have received a copy of the GNU Lesser General Public       */
00019 /* License along with this library; if not, write to the Free Software    */
00020 /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307    */
00021 /* USA.                                                                   */
00022 /*                                                                        */
00023 /* In addition, when you copy and redistribute some or the entire part of */
00024 /* the source code of this software with or without modification, you     */
00025 /* MUST include this copyright notice in each copy.                       */
00026 /*                                                                        */
00027 /* If you make any changes that are appeared to be useful, please send    */
00028 /* sources that include the changed part to                               */
00029 /* diameter-developers@lists.sourceforge.net so that we can reflect your  */
00030 /* changes to one unified version of this software.                       */
00031 /*                                                                        */
00032 /* END_COPYRIGHT                                                          */
00033 
00034 /* $Id: diameter_eap_parser.hxx,v 1.12 2004/06/17 19:10:42 yohba Exp $ */
00035 /* 
00036    diameter_eap_parser.hxx
00037    Parser Data Structure in Diameter EAP Application 
00038    Written by Yoshihiro Ohba
00039    Created December 5, 2003.
00040 */
00041 
00042 #ifndef __DIAMETER_EAP_PARSER_H__
00043 #define __DIAMETER_EAP_PARSER_H__
00044 
00045 #include <vector>
00046 #include "diameter_parser_api.h"
00047 #include "diameter_nasreq_parser.hxx"
00048 
00049 const diameter_unsigned32_t EapApplicationId = 2000;
00050 const AAACommandCode EapCommandCode = 268;
00051 
00052 #if 0
00053 
00054 class tunneling_t
00055 {
00056  public:
00057 
00058   void CopyTo(AAAAvpContainerList &cl)
00059   {
00060     AAAAvpContainerManager cm;
00061     AAAAvpContainer *c;
00062     if (TunnelType.IsSet())
00063       {
00064         c = cm.acquire("Tunnel-Type");
00065         TunnelType.CopyTo(*c, AAA_AVP_ENUM_TYPE);
00066         cl.add(c);
00067       }
00068     if (TunnelMediumType.IsSet())
00069       {
00070         c = cm.acquire("Tunnel-Medium-Type");
00071         TunnelMediumType.CopyTo(*c, AAA_AVP_ENUM_TYPE);
00072         cl.add(c);
00073       }
00074     if (TunnelClientEndpoint.IsSet())
00075       {
00076         c = cm.acquire("Tunnel-Client-Endpoint");
00077         TunnelClientEndpoint.CopyTo(*c, AAA_AVP_UTF8_STRING_TYPE);
00078         cl.add(c);
00079       }
00080     if (TunnelServerEndpoint.IsSet())
00081       {
00082         c = cm.acquire("Tunnel-Server-Endpoint");
00083         TunnelServerEndpoint.CopyTo(*c, AAA_AVP_UTF8_STRING_TYPE);
00084         cl.add(c);
00085       }
00086     if (TunnelPreference.IsSet())
00087       {
00088         c = cm.acquire("Tunnel-Preference");
00089         TunnelPreference.CopyTo(*c, AAA_AVP_UINTEGER32_TYPE);
00090         cl.add(c);
00091       }
00092     if (TunnelClientAuthId.IsSet())
00093       {
00094         c = cm.acquire("Tunnel-Client-Auth-Id");
00095         TunnelClientAuthId.CopyTo(*c, AAA_AVP_UINTEGER32_TYPE);
00096         cl.add(c);
00097       }
00098     if (TunnelServerAuthId.IsSet())
00099       {
00100         c = cm.acquire("Tunnel-Server-Auth-Id");
00101         TunnelServerAuthId.CopyTo(*c, AAA_AVP_UINTEGER32_TYPE);
00102         cl.add(c);
00103       }
00104     if (TunnelPassword.IsSet())
00105       {
00106         c = cm.acquire("Tunnel-Password");
00107         TunnelPassword.CopyTo(*c, AAA_AVP_STRING_TYPE);
00108         cl.add(c);
00109       }
00110     if (TunnelPrivateGroupId.IsSet())
00111       {
00112         c = cm.acquire("Tunnel-Private-Group-Id");
00113         TunnelPrivateGroupId.CopyTo(*c, AAA_AVP_UTF8_STRING_TYPE);
00114         cl.add(c);
00115       }
00116   }
00117   void CopyFrom(AAAAvpContainerList &cl)
00118   {
00119     AAAAvpContainer *c;
00120           
00121     if ((c = cl.search("Tunnel-Type")))
00122       {
00123         TunnelType.CopyFrom(*c);
00124       }
00125     if ((c = cl.search("Tunnel-Medium-Type")))
00126       {
00127         TunnelMediumType.CopyFrom(*c);
00128       }
00129     if ((c = cl.search("Tunnel-Client-Endpoint")))
00130       {
00131         TunnelClientEndpoint.CopyFrom(*c);
00132       }
00133     if ((c = cl.search("Tunnel-Server-Endpoint")))
00134       {
00135         TunnelServerEndpoint.CopyFrom(*c);
00136       }
00137     if ((c = cl.search("Tunnel-Preference")))
00138       {
00139         TunnelPreference.CopyFrom(*c);
00140       }
00141     if ((c = cl.search("Tunnel-Client-Auth-Id")))
00142       {
00143         TunnelClientAuthId.CopyFrom(*c);
00144       }
00145     if ((c = cl.search("Tunnel-Server-Auth-Id")))
00146       {
00147         TunnelServerAuthId.CopyFrom(*c);
00148       }
00149     if ((c = cl.search("Tunnel-Password")))
00150       {
00151         TunnelPassword.CopyFrom(*c);
00152       }
00153     if ((c = cl.search("Tunnel-Private-Group-Id")))
00154       {
00155         TunnelPrivateGroupId.CopyFrom(*c);
00156       }
00157   }
00158   // Required AVPs
00159   AAA_ScholarAttribute<diameter_enumerated_t> TunnelType;
00160   AAA_ScholarAttribute<diameter_enumerated_t> TunnelMediumType;
00161   AAA_ScholarAttribute<diameter_utf8string_t> TunnelClientEndpoint;
00162   AAA_ScholarAttribute<diameter_utf8string_t> TunnelServerEndpoint;
00163   // Optional AVPs
00164   AAA_ScholarAttribute<diameter_unsigned32_t> TunnelPreference;
00165   AAA_ScholarAttribute<diameter_unsigned32_t> TunnelClientAuthId;
00166   AAA_ScholarAttribute<diameter_unsigned32_t> TunnelServerAuthId;
00167   AAA_ScholarAttribute<diameter_octetstring_t> TunnelPassword;
00168   AAA_ScholarAttribute<diameter_utf8string_t> TunnelPrivateGroupId;
00169 };
00170 
00172 class proxyinfo_t
00173 {
00174  public:
00175   void CopyTo(AAAAvpContainerList &cl)
00176   {
00177     AAAAvpContainerManager cm;
00178     AAAAvpContainer *c;
00179     if (ProxyHost.IsSet())
00180       {
00181         c = cm.acquire("Proxy-Host");
00182         ProxyHost.CopyTo(*c, AAA_AVP_DIAMID_TYPE);
00183         cl.add(c);
00184       }
00185     if (ProxyState.IsSet())
00186       {
00187         c = cm.acquire("Proxy-State");
00188         ProxyState.CopyTo(*c, AAA_AVP_STRING_TYPE);
00189         cl.add(c);
00190       }
00191     if (Avp.IsSet())
00192       {
00193         c = cm.acquire("AVP");
00194         Avp.CopyTo(*c, AAA_AVP_CUSTOM_TYPE);
00195         cl.add(c);
00196       }
00197   }
00198   void CopyFrom(AAAAvpContainerList &cl)
00199   {
00200     AAAAvpContainer *c;
00201     if ((c = cl.search("Proxy-Host")))
00202       {
00203         ProxyHost.CopyFrom(*c);
00204       }
00205     if ((c = cl.search("Proxy-State")))
00206       {
00207         ProxyState.CopyFrom(*c);
00208       }
00209     if ((c = cl.search("AVP")))
00210       {
00211         Avp.CopyFrom(*c);
00212       }
00213   }       
00214   // Required AVPs
00215   AAA_ScholarAttribute<diameter_identity_t> ProxyHost;
00216   AAA_ScholarAttribute<diameter_octetstring_t> ProxyState;
00217   // Optional AVPs
00218   AAA_VectorAttribute<avp_t> Avp;
00219 };
00220 #endif
00221 
00223 class DER_Data
00224 {
00225  public:
00226   DER_Data()
00227   {
00228     EapPayload.Set(std::string());
00229   }
00230 
00231   void Clear()
00232   {
00233     SessionId.Clear();
00234     AuthApplicationId.Clear();
00235     OriginHost.Clear();
00236     OriginRealm.Clear();
00237     DestinationRealm.Clear();
00238     AuthRequestType.Clear();
00239     NasPort.Clear();
00240     NasPortId.Clear();
00241     OriginStateId.Clear();
00242     DestinationHost.Clear();
00243     NasIdentifier.Clear();
00244     NasIpAddress.Clear();
00245     NasIpv6Address.Clear();
00246     NasPortType.Clear();
00247     PortLimit.Clear();
00248     UserName.Clear();
00249     EapPayload.Clear();
00250     ServiceType.Clear();
00251     IdleTimeout.Clear();
00252     State.Clear();
00253     AuthorizationLifetime.Clear();
00254     AuthGracePeriod.Clear();
00255     AuthSessionState.Clear();
00256     SessionTimeout.Clear();
00257     CallbackNumber.Clear();
00258     CalledStationId.Clear();
00259     CallingStationId.Clear();
00260     Class.Clear();
00261     OriginatingLineInfo.Clear();
00262     ConnectInfo.Clear();
00263     FramedCompression.Clear();
00264     FramedInterfaceId.Clear();
00265     FramedIpAddress.Clear();
00266     FramedIpv6Prefix.Clear();
00267     FramedIpNetmask.Clear();
00268     FramedMtu.Clear();
00269     FramedProtocol.Clear();
00270     Tunneling.Clear();
00271     ProxyInfo.Clear();
00272     RouteRecord.Clear();
00273     Avp.Clear();
00274   }
00275 
00277   AAA_ScholarAttribute<diameter_utf8string_t> SessionId;
00278   AAA_ScholarAttribute<diameter_unsigned32_t> AuthApplicationId;
00279   AAA_ScholarAttribute<diameter_identity_t>  OriginHost;
00280   AAA_ScholarAttribute<diameter_identity_t>  OriginRealm;
00281   AAA_ScholarAttribute<diameter_identity_t>  DestinationRealm;
00282   /* In RFC3588:
00283 
00284    "8.7.  Auth-Request-Type AVP
00285                                                                                 
00286    The Auth-Request-Type AVP (AVP Code 274) is of type Enumerated and is
00287    included in application-specific auth requests to inform the peers
00288    whether a user is to be authenticated only, authorized only or both.
00289    Note any value other than both MAY cause RADIUS interoperability
00290    issues.  The following values are defined:
00291                                                                                 
00292    AUTHENTICATE_ONLY          1
00293       The request being sent is for authentication only, and MUST
00294       contain the relevant application specific authentication AVPs that
00295       are needed by the Diameter server to authenticate the user.
00296 
00297    AUTHORIZE_ONLY             2
00298       The request being sent is for authorization only, and MUST contain
00299       the application specific authorization AVPs that are necessary to
00300       identify the service being requested/offered.
00301 
00302    AUTHORIZE_AUTHENTICATE     3
00303       The request contains a request for both authentication and
00304       authorization.  The request MUST include both the relevant
00305       application specific authentication information, and authorization
00306       information necessary to identify the service being
00307       requested/offered."
00308 
00309   */
00310   AAA_ScholarAttribute<diameter_enumerated_t> AuthRequestType;
00311   AAA_ScholarAttribute<diameter_unsigned32_t> NasPort;
00312   AAA_ScholarAttribute<diameter_utf8string_t> NasPortId;
00313   AAA_ScholarAttribute<diameter_unsigned32_t> OriginStateId;
00314   AAA_ScholarAttribute<diameter_identity_t>  DestinationHost;
00315   AAA_ScholarAttribute<diameter_utf8string_t> NasIdentifier;
00316   AAA_ScholarAttribute<diameter_octetstring_t> NasIpAddress;
00317   AAA_ScholarAttribute<diameter_octetstring_t> NasIpv6Address;
00318   AAA_ScholarAttribute<diameter_enumerated_t> NasPortType;
00319   /* In draft-ietf-aaa-diameter-nasreq-13.txt:
00320 
00321    "6.5.  Port-Limit AVP
00322                                                                                 
00323    The Port-Limit AVP (AVP Code 62) is of type Unsigned32 and sets the
00324    maximum number of ports to be provided to the user by the NAS.  It
00325    MAY be used in an authentication and/or authorization request as a
00326    hint to the server that multilink PPP [PPPMP] service is desired, but
00327    the server is not required to honor the hint in the corresponding
00328    response."
00329 
00330   */
00331   AAA_ScholarAttribute<diameter_unsigned32_t> PortLimit;
00332   AAA_ScholarAttribute<diameter_utf8string_t> UserName;
00333   AAA_ScholarAttribute<diameter_octetstring_t> EapPayload;
00334   /* In RFC2865:
00335 
00336    "5.6.  Service-Type
00337                                                                                 
00338    Description
00339                                                                                 
00340       This Attribute indicates the type of service the user has
00341       requested, or the type of service to be provided.  It MAY be used
00342       in both Access-Request and Access-Accept packets.  A NAS is not
00343       required to implement all of these service types, and MUST treat
00344       unknown or unsupported Service-Types as though an Access-Reject
00345       had been received instead."
00346 
00347    Value
00348 
00349       The Value field is four octets.
00350                                                                                 
00351        1      Login
00352        2      Framed
00353        3      Callback Login
00354        4      Callback Framed
00355        5      Outbound
00356        6      Administrative
00357        7      NAS Prompt
00358        8      Authenticate Only
00359        9      Callback NAS Prompt
00360       10      Call Check
00361       11      Callback Administrative
00362 
00363   */
00364   AAA_ScholarAttribute<diameter_enumerated_t> ServiceType;
00365   AAA_ScholarAttribute<diameter_unsigned32_t> IdleTimeout;
00366   /* In Section 5.24 of RFC 2865:
00367 
00368    "5.24.  State
00369                                                                                 
00370    Description
00371                                                                                 
00372       This Attribute is available to be sent by the server to the client
00373       in an Access-Challenge and MUST be sent unmodified from the client
00374       to the server in the new Access-Request reply to that challenge,
00375       if any.
00376                                                                                 
00377       This Attribute is available to be sent by the server to the client
00378       in an Access-Accept that also includes a Termination-Action
00379       Attribute with the value of RADIUS-Request.  If the NAS performs
00380       the Termination-Action by sending a new Access-Request upon
00381       termination of the current session, it MUST include the State
00382       attribute unchanged in that Access-Request.
00383                                                                                 
00384       In either usage, the client MUST NOT interpret the attribute
00385       locally.  A packet must have only zero or one State Attribute.
00386       Usage of the State Attribute is implementation dependent."
00387 
00388   */
00389   AAA_ScholarAttribute<diameter_octetstring_t> State;
00390   AAA_ScholarAttribute<diameter_unsigned32_t> AuthorizationLifetime;
00391   AAA_ScholarAttribute<diameter_unsigned32_t> AuthGracePeriod;
00392   /* In Section 8 of RFC3588:
00393 
00394   "An access device that does not expect to send a re-authorization or
00395   a session termination request to the server MAY include the Auth-
00396   Session-State AVP with the value set to NO_STATE_MAINTAINED as a
00397   hint to the server.  If the server accepts the hint, it agrees that
00398   since no session termination message will be received once service
00399   to the user is terminated, it cannot maintain state for the session.
00400   If the answer message from the server contains a different value in
00401   the Auth-Session-State AVP (or the default value if the AVP is
00402   absent), the access device MUST follow the server's directives.
00403   Note that the value NO_STATE_MAINTAINED MUST NOT be set in
00404   subsequent re- authorization requests and answers."
00405 
00406   In Section 8.1 of RFC3588:
00407 
00408   "There are four different authorization session state machines
00409   supported in the Diameter base protocol.  The first two describe a
00410   session in which the server is maintaining session state, indicated
00411   by the value of the Auth-Session-State AVP (or its absence).  One
00412   describes the session from a client perspective, the other from a
00413   server perspective.  The second two state machines are used when the
00414   server does not maintain session state.  Here again, one describes
00415   the session from a client perspective, the other from a server
00416   perspective."
00417 
00418   In Section 8.11 of RFC3588:
00419 
00420   "8.11.  Auth-Session-State AVP
00421                                                                                 
00422   The Auth-Session-State AVP (AVP Code 277) is of type Enumerated and
00423   specifies whether state is maintained for a particular session.  The
00424   client MAY include this AVP in requests as a hint to the server, but
00425   the value in the server's answer message is binding.  The following
00426   values are supported:
00427                                                                                 
00428   STATE_MAINTAINED              0
00429       This value is used to specify that session state is being
00430       maintained, and the access device MUST issue a session termination
00431       message when service to the user is terminated.  This is the
00432       default value.
00433                                                                                 
00434   NO_STATE_MAINTAINED           1
00435       This value is used to specify that no session termination messages
00436       will be sent by the access device upon expiration of the
00437       Authorization-Lifetime."
00438 
00439     */
00440   AAA_ScholarAttribute<diameter_enumerated_t> AuthSessionState;
00441   AAA_ScholarAttribute<diameter_unsigned32_t> SessionTimeout;
00442   /* In draft-ietf-aaa-diameter-nasreq-13.txt:
00443 
00444    "6.2.  Callback-Number AVP
00445                                                                                 
00446    The Callback-Number AVP (AVP Code 19) is of type UTF8String, and
00447    contains a dialing string to be used for callback.  It MAY be used in
00448    an authentication and/or authorization request as a hint to the
00449    server that a Callback service is desired, but the server is not
00450    required to honor the hint in the corresponding response.
00451                                                                                 
00452    The codification of the range of allowed usage of this field is
00453    outside the scope of this specification."
00454                                                                                 
00455   */
00456   AAA_ScholarAttribute<diameter_utf8string_t> CallbackNumber;
00457   AAA_ScholarAttribute<diameter_utf8string_t> CalledStationId;
00458   AAA_ScholarAttribute<diameter_utf8string_t> CallingStationId;
00459   /* RFC3588 
00460 
00461   8.20.  Class AVP
00462                                                                                 
00463   The Class AVP (AVP Code 25) is of type OctetString and is used to by
00464   Diameter servers to return state information to the access device.
00465   When one or more Class AVPs are present in application-specific
00466   authorization answer messages, they MUST be present in subsequent
00467   re-authorization, session termination and accounting messages.
00468   Class AVPs found in a re-authorization answer message override the
00469   ones found in any previous authorization answer message.  Diameter
00470   server implementations SHOULD NOT return Class AVPs that require
00471   more than 4096 bytes of storage on the Diameter client.  A Diameter
00472   client that receives Class AVPs whose size exceeds local available
00473   storage MUST terminate the session.
00474 
00475   */
00476   AAA_VectorAttribute<diameter_octetstring_t> Class;
00477   AAA_ScholarAttribute<diameter_octetstring_t> OriginatingLineInfo;
00478   AAA_ScholarAttribute<diameter_utf8string_t> ConnectInfo;
00479   AAA_VectorAttribute<diameter_enumerated_t> FramedCompression;
00480   AAA_ScholarAttribute<diameter_unsigned64_t> FramedInterfaceId;
00481   AAA_ScholarAttribute<diameter_octetstring_t> FramedIpAddress;
00482   AAA_VectorAttribute<diameter_octetstring_t> FramedIpv6Prefix;
00483   AAA_ScholarAttribute<diameter_octetstring_t> FramedIpNetmask;
00484   /* In draft-ietf-aaa-diameter-nasreq-13.txt:
00485 
00486    "6.9.3.  Framed-MTU AVP
00487                                                                                 
00488    The Framed-MTU AVP (AVP Code 12) is of type Unsigned32 and contains
00489    the Maximum Transmission Unit to be configured for the user, when it
00490    is not negotiated by some other means (such as PPP). This AVP SHOULD
00491    only be present in authorization responses. The MTU value MUST be in
00492    the range of 64 and 65535."
00493 
00494   */
00495   AAA_ScholarAttribute<diameter_unsigned32_t> FramedMtu;
00496   /* In draft-ietf-aaa-diameter-nasreq-13.txt:
00497 
00498    "6.9.1.  Framed-Protocol AVP
00499                                                                                 
00500    The Framed-Protocol AVP (AVP Code 7) is of type Enumerated and
00501    contains the framing to be used for framed access. This AVP MAY be
00502    present in both requests and responses. The supported values are
00503    listed in [RADIUSTypes].  The following list is informational:
00504 
00505        1  PPP
00506        2  SLIP
00507        3  AppleTalk Remote Access Protocol (ARAP)
00508        4  Gandalf proprietary SingleLink/MultiLink protocol
00509        5  Xylogics proprietary IPX/SLIP
00510        6  X.75 Synchronous"
00511 
00512   */
00513   AAA_ScholarAttribute<diameter_enumerated_t> FramedProtocol;
00514   AAA_GroupedVectorAttribute<tunneling_t> Tunneling;
00515   AAA_GroupedVectorAttribute<proxyinfo_t> ProxyInfo;
00516   AAA_VectorAttribute<diameter_identity_t> RouteRecord;
00517   AAA_VectorAttribute<avp_t> Avp;
00518 };
00519 
00521 class DEA_Data
00522 {
00523  public:
00524   DEA_Data() {}
00525 
00526   void Clear()
00527   {
00528     UserName.Clear();
00529     EapPayload.Clear();
00530     EapReissuedPayload.Clear();
00531     EapMasterSessionKey.Clear();
00532     MultiRoundTimeOut.Clear();
00533     AccountingEapAuthMethod.Clear();
00534     OriginStateId.Clear();
00535     PortLimit.Clear();
00536     ServiceType.Clear();
00537     IdleTimeout.Clear();
00538     State.Clear();
00539     Class.Clear();
00540     AuthorizationLifetime.Clear();
00541     AuthGracePeriod.Clear();
00542     AuthSessionState.Clear();
00543     SessionTimeout.Clear();
00544     CallbackNumber.Clear();
00545     FramedAppletalkLink.Clear();
00546     FramedAppletalkNetwork.Clear();
00547     FramedAppletalkZone.Clear();
00548     FramedCompression.Clear();
00549     FramedInterfaceId.Clear();
00550     FramedIpAddress.Clear();
00551     FramedIpv6Prefix.Clear();
00552     FramedIpv6Pool.Clear();
00553     FramedIpv6Route.Clear();
00554     FramedIpNetmask.Clear();
00555     FramedRoute.Clear();
00556     FramedPool.Clear();
00557     FramedIpxNetwork.Clear();
00558     FramedMtu.Clear();
00559     FramedProtocol.Clear();
00560     FramedRouting.Clear();
00561     NasFilterRule.Clear();
00562     Tunneling.Clear();
00563     RedirectHost.Clear();
00564     RedirectHostUsage.Clear();
00565     RedirectMaxCacheTime.Clear();
00566     ProxyInfo.Clear();
00567     Avp.Clear();
00568   }
00569 
00571   AAA_ScholarAttribute<diameter_utf8string_t> SessionId;
00572   AAA_ScholarAttribute<diameter_unsigned32_t> AuthApplicationId;
00573   AAA_ScholarAttribute<diameter_enumerated_t> AuthRequestType;
00574   AAA_ScholarAttribute<diameter_identity_t>  OriginHost;
00575   AAA_ScholarAttribute<diameter_identity_t>  OriginRealm;
00576   AAA_ScholarAttribute<diameter_utf8string_t> UserName;
00577   AAA_ScholarAttribute<diameter_octetstring_t> EapPayload;
00578   AAA_ScholarAttribute<diameter_octetstring_t> EapReissuedPayload;
00579   AAA_ScholarAttribute<diameter_octetstring_t> EapMasterSessionKey;
00580   AAA_VectorAttribute<diameter_unsigned64_t> AccountingEapAuthMethod;
00581   AAA_ScholarAttribute<diameter_unsigned32_t> OriginStateId;
00582   AAA_ScholarAttribute<diameter_unsigned32_t> PortLimit;
00583   AAA_ScholarAttribute<diameter_enumerated_t> ServiceType;
00584   AAA_ScholarAttribute<diameter_unsigned32_t> IdleTimeout;
00585   AAA_ScholarAttribute<diameter_octetstring_t> State;
00586   AAA_VectorAttribute<diameter_octetstring_t> Class;
00587   AAA_ScholarAttribute<diameter_unsigned32_t> AuthorizationLifetime;
00588   AAA_ScholarAttribute<diameter_unsigned32_t> AuthGracePeriod;
00589   AAA_ScholarAttribute<diameter_enumerated_t> AuthSessionState;
00590   AAA_ScholarAttribute<diameter_unsigned32_t> SessionTimeout;
00591   AAA_ScholarAttribute<diameter_utf8string_t> CallbackNumber;
00592   AAA_VectorAttribute<diameter_enumerated_t> FramedCompression;
00593   AAA_ScholarAttribute<diameter_unsigned64_t> FramedInterfaceId;
00594   AAA_ScholarAttribute<diameter_octetstring_t> FramedIpAddress;
00595   AAA_VectorAttribute<diameter_octetstring_t> FramedIpv6Prefix;
00596   AAA_ScholarAttribute<diameter_octetstring_t> FramedIpNetmask;
00597   AAA_ScholarAttribute<diameter_unsigned32_t> FramedMtu;
00598   AAA_ScholarAttribute<diameter_enumerated_t> FramedProtocol;
00599   AAA_VectorAttribute<diameter_ipfilter_rule_t> NasFilterRule;
00600   AAA_GroupedVectorAttribute<tunneling_t> Tunneling;
00601   AAA_GroupedVectorAttribute<proxyinfo_t> ProxyInfo;
00602   AAA_VectorAttribute<avp_t> Avp;
00603   AAA_ScholarAttribute<diameter_unsigned32_t> ResultCode; // ++
00604   // -- std::vector<diameter_identity_t>  DestinationRealm;
00605   // -- std::vector<diameter_unsigned32_t> NasPort;
00606   // -- std::vector<diameter_utf8string_t> NasPortId;
00607   // -- std::vector<diameter_identity_t>  DestinationHost;
00608   // -- std::vector<diameter_utf8string_t> NasIdentifier;
00609   // -- std::vector<diameter_octetstring_t> NasIpAddress;
00610   // -- std::vector<diameter_octetstring_t> NasIpv6Address;
00611   // -- std::vector<diameter_enumerated_t> NasPortType;
00612   AAA_ScholarAttribute<diameter_unsigned32_t> MultiRoundTimeOut; // ++ 
00613 
00614   /* RFC2869
00615 
00616    5.12.  Configuration-Token
00617                                                                                 
00618    Description
00619                                                                                 
00620       This attribute is for use in large distributed authentication
00621       networks based on proxy.  It is sent from a RADIUS Proxy Server to
00622       a RADIUS Proxy Client in an Access-Accept to indicate a type of
00623       user profile to be used.  It should not be sent to a NAS.
00624 
00625   */
00626   AAA_VectorAttribute<diameter_octetstring_t> ConfigurationToken; // ++
00627 
00628 
00629   AAA_ScholarAttribute<diameter_unsigned32_t> AcctInterimInterval; // ++ 
00630   AAA_ScholarAttribute<diameter_utf8string_t> ErrorMessage; // ++
00631   AAA_ScholarAttribute<diameter_identity_t>  ErrorReportingHost; // ++
00632   AAA_ScholarAttribute<diameter_enumerated_t> ReAuthRequestType; // ++
00633 
00634   /* In draft-ietf-aaa-diameter-nasreq-13.txt:
00635 
00636    "4.9.  Reply-Message AVP
00637                                                                                 
00638    The Reply-Message AVP (AVP Code 18) is of type UTF8String, and
00639    contains text which MAY be displayed to the user.  When used in an
00640    AA-Answer message with a successful Result-Code AVP it indicates a
00641    success message. When found in the same message with a Result-Code
00642    other than DIAMETER_SUCCESS it contains a failure message.
00643                                                                                 
00644    The Reply-Message AVP MAY indicate a dialog message to prompt the
00645    user before another AA-Request attempt. When used in an AA-Answer, it
00646    MAY indicate a dialog message to prompt the user for a response.
00647                                                                                 
00648    Multiple Reply-Message's MAY be included and if any are displayed,
00649    they MUST be displayed in the same order as they appear in the
00650    message."
00651 
00652   */
00653                                                                                 
00654   AAA_VectorAttribute<diameter_utf8string_t> ReplyMessage; // ++
00655 
00656   /* In draft-ietf-aaa-diameter-nasreq-13.txt:
00657 
00658    "6.7.  Filter-Id AVP
00659                                                                                 
00660    The Filter-Id AVP (AVP Code 11) is of type UTF8String, and contains
00661    the name of the filter list for this user. Zero or more Filter-Id
00662    AVPs MAY be sent in an authorization answer.
00663                                                                                 
00664    Identifying a filter list by name allows the filter to be used on
00665    different NASes without regard to filter-list implementation details.
00666    However, this AVP is not roaming friendly since filter naming differs
00667    from one service provider to another.
00668                                                                                 
00669    In non-RADIUS environments, it is RECOMMENDED that the NAS-Filter-
00670    Rule AVP be used instead."
00671 
00672   */
00673 
00674   AAA_VectorAttribute<diameter_utf8string_t> FilterId; // ++
00675 
00676   /* In draft-ietf-aaa-diameter-nasreq-13.txt:
00677 
00678    "6.3.  Callback-Id AVP
00679                                                                                 
00680    The Callback-Id AVP (AVP Code 20) is of type UTF8String, and contains
00681    the name of a place to be called, to be interpreted by the NAS. This
00682    AVP MAY be present in an authentication and/or authorization
00683    response.
00684                                                                                 
00685    This AVP is not roaming-friendly since it assumes that the Callback-
00686    Id is configured on the NAS. It is therefore preferable to use the
00687    Callback-Number AVP instead."
00688 
00689   */
00690                                                                                 
00691   AAA_ScholarAttribute<diameter_utf8string_t> CallbackId; // ++
00692   AAA_ScholarAttribute<diameter_unsigned32_t> FramedAppletalkLink; // ++ 
00693   AAA_VectorAttribute<diameter_unsigned32_t> FramedAppletalkNetwork; // ++ 
00694   AAA_ScholarAttribute<diameter_octetstring_t> FramedAppletalkZone; // ++ 
00695   AAA_VectorAttribute<diameter_utf8string_t> FramedIpv6Route; // ++
00696   AAA_ScholarAttribute<diameter_octetstring_t> FramedIpv6Pool; // ++ 
00697   AAA_ScholarAttribute<diameter_octetstring_t> FramedPool; // ++ 
00698   AAA_ScholarAttribute<diameter_utf8string_t> FramedIpxNetwork; // ++
00699   AAA_VectorAttribute<diameter_utf8string_t> FramedRoute; // ++
00700 
00701 
00702   /* In draft-ietf-aaa-diameter-nasreq-13.txt:
00703 
00704    "6.9.2.  Framed-Routing AVP
00705                                                                                 
00706    The Framed-Routing AVP (AVP Code 10) is of type Enumerated and
00707    contains the routing method for the user, when the user is a router
00708    to a network.  This AVP SHOULD only be present in authorization
00709    responses. The supported values are listed in [RADIUSTypes].      The
00710    following list is informational:
00711                                                                                 
00712       0  None
00713       1  Send routing packets
00714       2  Listen for routing packets
00715       3  Send and Listen" 
00716 
00717   */
00718 
00719   AAA_ScholarAttribute<diameter_enumerated_t> FramedRouting; // ++
00720   AAA_VectorAttribute<diameter_identity_t>  RedirectHost; // ++
00721   AAA_ScholarAttribute<diameter_enumerated_t>  RedirectHostUsage; // ++
00722   AAA_ScholarAttribute<diameter_unsigned32_t>  RedirectMaxCacheTime; // ++
00723   //  -- std::vector<diameter_utf8string_t> CalledStationId;
00724   //  -- std::vector<diameter_utf8string_t> CallingStationId;
00725   //  -- std::vector<diameter_octetstring_t> OriginatingLineInfo;
00726   //  -- std::vector<diameter_utf8string_t> ConnectInfo;
00727   //  -- std::vector<diameter_identity_t> RouteRecord;
00728 };
00729 
00730 typedef AAAParser<AAAMessage*, DER_Data*> DER_Parser;
00731 typedef AAAParser<AAAMessage*, DEA_Data*> DEA_Parser;
00732 
00733 void DER_Parser::parseRawToApp();
00734 void DER_Parser::parseAppToRaw();
00735 
00736 void DEA_Parser::parseRawToApp();
00737 void DEA_Parser::parseAppToRaw();
00738 
00739 #endif //__EAP_CLIENT_DATA_H__

Generated on Fri Jun 25 19:14:22 2004 for Diameter EAP Application by doxygen 1.3.5