System test feature
[anna.git] / include / anna / diameter / codec / functions.hpp
index 770fcc1..44a8f15 100644 (file)
@@ -107,26 +107,50 @@ struct functions {
   static void decodeAVP(const char *start, AvpId & id, char & flags, int & length, std::string & data) throw(anna::RuntimeException);
 
   /**
-  * Gets the next AVP pointer reference starting from a first-avp datablock. It could be the first avp within
+  * Gets the next AVP pointer reference starting from a first-avp data block. It could be the first avp within
   * a command, or within an grouped avp.
   *
-  * @param avpsDB AVPs set as datablock
+  * @param avpsDB AVP data block buffer pointer
+  * @param avpsLen AVP data block buffer length
   * @param start Point to start the search. Must be a valid avp start (point to the 32-bits avp code word).
   *
   * @return Pointer to the next AVP found. NULL if no more.
   */
-  static const char * nextAVP(const anna::DataBlock & avpsDB, const char *start) throw(anna::RuntimeException);
+  static const char * nextAVP(const char *avpsDB, int avpsLen, const char *start) throw(anna::RuntimeException);
+
+//  /**
+//  * Gets the next AVP pointer reference starting from a first-avp datablock. It could be the first avp within
+//  * a command, or within an grouped avp.
+//  *
+//  * @param avpsDB AVPs set as datablock
+//  * @param start Point to start the search. Must be a valid avp start (point to the 32-bits avp code word).
+//  *
+//  * @return Pointer to the next AVP found. NULL if no more.
+//  */
+//  static const char * nextAVP(const anna::DataBlock & avpsDB, const char *start) throw(anna::RuntimeException);
 
   /**
-  * Gets the next AVP pointer reference within an AVPs set datablock with a certain AVP identification.
+  * Gets the next AVP pointer reference within an AVPs set data block with a certain AVP identification.
   *
-  * @param avpsDB AVPs set as datablock
+  * @param avpsDB AVP data block buffer pointer
+  * @param avpsLen AVP data block buffer length
   * @param id Avp identification (code, vendorId).
-  * @param n Ocurrence number (first avp, second avp, etc.)
+  * @param n Ocurrence number (first avp, second avp, etc.). 1 by default.
   *
   * @return Pointer to first AVP found with identification provided. NULL if not found.
   */
-  static const char * findAVP(const anna::DataBlock & avpsDB, const AvpId & id, int n = 1) throw(anna::RuntimeException);
+  static const char *findAVP(const char *avpsDB, int avpsLen, const diameter::AvpId & id, int n = 1) throw(anna::RuntimeException);
+
+//  /**
+//  * Gets the next AVP pointer reference within an AVPs set datablock with a certain AVP identification.
+//  *
+//  * @param avpsDB AVPs set as datablock
+//  * @param id Avp identification (code, vendorId).
+//  * @param n Ocurrence number (first avp, second avp, etc.). 1 by default.
+//  *
+//  * @return Pointer to first AVP found with identification provided. NULL if not found.
+//  */
+//  static const char * findAVP(const anna::DataBlock & avpsDB, const AvpId & id, int n = 1) throw(anna::RuntimeException);