1 // ANNA - Anna is Not 'N' Anymore
3 // (c) Copyright 2005-2014 Eduardo Ramos Testillano & Francisco Ruiz Rayo
5 // https://bitbucket.org/testillano/anna
7 // Redistribution and use in source and binary forms, with or without
8 // modification, are permitted provided that the following conditions
11 // * Redistributions of source code must retain the above copyright
12 // notice, this list of conditions and the following disclaimer.
13 // * Redistributions in binary form must reproduce the above
14 // copyright notice, this list of conditions and the following disclaimer
15 // in the documentation and/or other materials provided with the
17 // * Neither the name of Google Inc. nor the names of its
18 // contributors may be used to endorse or promote products derived from
19 // this software without specific prior written permission.
21 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 // Authors: eduardo.ramos.testillano@gmail.com
34 // cisco.tierra@gmail.com
37 #ifndef anna_diameter_defines_hpp
38 #define anna_diameter_defines_hpp
42 #include <anna/core/util/defines.hpp> // S32, etc.
43 #include <anna/config/defines.hpp>
49 #include <utility> // std::pair
50 //#include <cctype> // isdigit
59 typedef std::pair < S32/*code*/, S32/*vendor-id*/ > AvpId;
60 typedef std::pair < U24/*code*/, bool/*request indicator*/ > CommandId;
62 //typedef std::pair<_avpId_t, U16> par_idAVP_ocurrencia_t;
65 //typedef std::vector<Avp*> _atributo_ptr_vect;
66 //typedef std::vector<Avp> _atributo_vect;
67 //typedef std::vector<U16> _u16_vect;
68 //typedef std::vector<S32> _s32_vect;
69 //typedef std::vector<U32> _u32_vect;
70 //typedef PoolDeObjetos <Avp> _pool_avps_t;
71 //typedef std::vector<_avpId_t> _codigo_vendorID_vect;
72 //typedef std::vector<par_idAVP_ocurrencia_t> _idAVP_ocurrencia_vect;
73 //typedef PoolDeObjetos<DetalleDECODIFICACION> _pool_detallesDecod_t;
74 //typedef PoolDeObjetos<DetalleVALIDACION> _pool_detallesValid_t;
75 //typedef std::vector<DetalleDECODIFICACION*> _detalleDecod_ptr_vect;
76 //typedef std::vector<DetalleVALIDACION*> _detalleValid_ptr_vect;
80 //typedef std::vector<Avp*>::const_iterator _atributo_ptr_iter;
81 //typedef std::vector<InfoAVP*>::iterator _atributo_ptr_nc_iter;
82 //typedef std::vector<Avp>::const_iterator _atributo_iter;
83 //typedef std::vector<U16>::const_iterator _u16_iter;
84 //typedef std::vector<S32>::const_iterator _s32_iter;
85 //typedef std::vector<U32>::const_iterator _u32_iter;
86 //typedef std::vector<_avpId_t>::const_iterator _codigo_vendorID_iter;
87 //typedef std::vector<par_idAVP_ocurrencia_t>::const_iterator _idAVP_ocurrencia_iter;
88 //typedef std::vector<DetalleDECODIFICACION*>::const_iterator _detalleDecod_ptr_iter;
89 //typedef std::vector<DetalleVALIDACION*>::const_iterator _detalleValid_ptr_iter;
92 typedef unsigned int ApplicationId;
94 // The Hop-by-Hop Identifier is an unsigned 32-bit integer field (in
95 // network byte order) and aids in matching requests and replies.
96 typedef unsigned int HopByHop;
98 typedef unsigned int EndToEnd;