X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=include%2Fanna%2Fdiameter.comm%2FMessage.hpp;h=b5cb45950ac7f3612115ad5f161c7b8451d89315;hb=6f990d26c49e6f5bbb31cb1a2a47615918b6c339;hp=7e007ca6e82f0c03cfb39b9340016a064ec698aa;hpb=6e1b37527452c6e59433144d6770db26253862eb;p=anna.git diff --git a/include/anna/diameter.comm/Message.hpp b/include/anna/diameter.comm/Message.hpp index 7e007ca..b5cb459 100644 --- a/include/anna/diameter.comm/Message.hpp +++ b/include/anna/diameter.comm/Message.hpp @@ -105,14 +105,26 @@ public: void setRequestEndToEnd(EndToEnd ete) throw() { a_requestEndToEnd = ete; } CommandId getCommandId(bool &isRequest) const throw(); CommandId getCommandId() const throw() { bool dummy; return getCommandId(dummy); } + ApplicationId getApplicationId() const throw(); bool fixRequestSequence(HopByHop hbh, EndToEnd ete) throw(); - /** Diameter agents CANNOT modify the end-to-end. True value stands for intermediate agents, false for request originators */ - bool isProxied() const throw() { return a_proxied; } + // http://diameter-protocol.blogspot.com.es/2011/05/diameter-message-structure-and-message.html - /** Diameter agents CANNOT modify the end-to-end. True value stands for intermediate agents, false for request originators */ - void setProxied(bool proxied = true) throw() { a_proxied = proxied; } + /** + * In general, diameter agents CANNOT modify the end-to-end value during sending the message to the peer. + * That 'true' value stands for intermediate agents and also for retransmissions (must keep end-to-end + * during 4 minutes even upon reboots). False is used for new request created from end points (originators) + * as diameter clients. + */ + bool updateEndToEnd() const throw() { return a_updateEndToEnd; } + + /** + * In general, diameter agents CANNOT modify the end-to-end value during sending the message to the peer. + * The appropiate behaviour must be configured before sending the message. By default, the diameter::comm + * message will sequence the end-to-end increasing the initial value created during session establishment. + */ + void updateEndToEnd(bool update) throw() { a_updateEndToEnd = update; } // Statistics @@ -140,7 +152,7 @@ public: a_requestClientSessionKey = ""; // means unknown/unset a_requestHopByHop = 0; a_requestEndToEnd = 0; - a_proxied = false; + a_updateEndToEnd = true; } @@ -164,7 +176,7 @@ private: std::string a_requestClientSessionKey; // idem for request which was received from servers HopByHop a_requestHopByHop; // application backup for hop-by-hop in order to restore on answer receive EndToEnd a_requestEndToEnd; // application backup for end-to-end in order to restore on answer receive - bool a_proxied; // end-to-end will be kept + bool a_updateEndToEnd; // end-to-end will be updated void send(ClientSession&) const throw(anna::RuntimeException); void send(ServerSession&) const throw(anna::RuntimeException);