diff options
author | yamuna <yamuna@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-07-29 04:09:37 +0000 |
---|---|---|
committer | yamuna <yamuna@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-07-29 04:09:37 +0000 |
commit | ed81ff538e29b7bb3a5f37867948744b1bc02859 (patch) | |
tree | c521a506c970affa86072e37a17273a2839c587e | |
parent | 0d8fc81386d0a5589768d0c47a3dbac9fd569764 (diff) | |
download | ATCD-ACE-5_3_3-with-AV-patch.tar.gz |
ChangelogTag: Mon Jul 28 23:30:15 2003 Yamuna Krishnamurthy <yamuna@oomworks.com>ACE-5_3_3-with-AV-patch
-rw-r--r-- | ace/QoS/QoS_Session.h | 10 | ||||
-rw-r--r-- | ace/QoS/QoS_Session_Impl.cpp | 25 | ||||
-rw-r--r-- | ace/QoS/QoS_Session_Impl.h | 12 | ||||
-rw-r--r-- | ace/QoS/QoS_Session_Impl.i | 24 |
4 files changed, 67 insertions, 4 deletions
diff --git a/ace/QoS/QoS_Session.h b/ace/QoS/QoS_Session.h index f67a9f52416..b1919d9e71e 100644 --- a/ace/QoS/QoS_Session.h +++ b/ace/QoS/QoS_Session.h @@ -133,6 +133,13 @@ public: /// Set the source port for this session. virtual void source_port (const u_short &source_port) = 0; + //Set the source host + virtual ACE_INET_Addr* source_addr (void) const = 0; + + /// Set the source port for this session. + virtual void source_addr (ACE_INET_Addr* source_addr) = 0; + + /** * Returns the version of the underlying RSVP implementation. Is * meaningful only when the underlying implementation has @@ -151,6 +158,9 @@ protected: /// Destination address for this session. ACE_INET_Addr dest_addr_; + /// Source address for this session. + ACE_INET_Addr* src_addr_; + /// Is this a TCP or a UDP session. ACE_Protocol_ID protocol_id_; diff --git a/ace/QoS/QoS_Session_Impl.cpp b/ace/QoS/QoS_Session_Impl.cpp index 4a340861ab0..c516d38e9e0 100644 --- a/ace/QoS/QoS_Session_Impl.cpp +++ b/ace/QoS/QoS_Session_Impl.cpp @@ -237,7 +237,9 @@ rsvp_callback (rapi_sid_t sid, ACE_RAPI_Session::ACE_RAPI_Session (void) { ACE_TRACE ("ACE_RAPI_Session::ACE_RAPI_Session"); - this->source_port (DEFAULT_SOURCE_SENDER_PORT); + //this->source_port (DEFAULT_SOURCE_SENDER_PORT); + ACE_NEW (this->src_addr_, + ACE_INET_Addr ("0")); } // Open a RAPI QoS session [dest IP, dest port, Protocol ID]. @@ -245,8 +247,12 @@ int ACE_RAPI_Session::open (ACE_INET_Addr dest_addr, ACE_Protocol_ID protocol_id) { + char buf [BUFSIZ]; + dest_addr.addr_to_string (buf, + BUFSIZ); ACE_DEBUG ((LM_DEBUG, - "In RAPI SESSION OPEN\n")); + "In RAPI SESSION OPEN %s\n", + buf)); this->dest_addr_ = dest_addr; this->protocol_id_ = protocol_id; @@ -390,22 +396,33 @@ ACE_RAPI_Session::sending_qos (const ACE_QoS &ace_qos) sending_flowspec->ttl ())); // This the source sender port. - ACE_INET_Addr sender_addr (this->source_port ()); + // ACE_INET_Addr sender_addr (this->source_port ()); ACE_DEBUG ((LM_DEBUG, "Making the rapi_sender () call\n")); // Set the Sender TSpec for this QoS session. + int result = rapi_sender(this->session_id_, 0, - (sockaddr *) sender_addr.get_addr (), + (sockaddr *) this->src_addr_->get_addr (), NULL, t_spec, NULL, NULL, sending_flowspec->ttl ()) ; + /* + int result = rapi_sender(this->session_id_, + 0, + (sockaddr *) sender_addr.get_addr (), + NULL, + t_spec, + NULL, + NULL, + sending_flowspec->ttl ()) ; + */ if(result!= 0) ACE_ERROR_RETURN ((LM_ERROR, "(%N|%l) rapi_sender error %d:\n\tPATH Generation can't be started\n", diff --git a/ace/QoS/QoS_Session_Impl.h b/ace/QoS/QoS_Session_Impl.h index ea5d11cec10..efd53682ad4 100644 --- a/ace/QoS/QoS_Session_Impl.h +++ b/ace/QoS/QoS_Session_Impl.h @@ -111,6 +111,12 @@ public: /// Set the source port for this session. virtual void source_port (const u_short &source_port); + //Set the source host + virtual ACE_INET_Addr* source_addr (void) const; + + /// Set the source port for this session. + virtual void source_addr (ACE_INET_Addr* source_addr); + /// RAPI version. Returned value = 100 * major-version + minor-version. virtual int version (); @@ -207,6 +213,12 @@ public: /// Set the source port for this session. virtual void source_port (const u_short &source_port); + //Set the source host + virtual ACE_INET_Addr* source_addr (void) const; + + /// Set the source port for this session. + virtual void source_addr (ACE_INET_Addr* source_addr); + /// Get the GQoS session id. virtual int session_id (void) const; diff --git a/ace/QoS/QoS_Session_Impl.i b/ace/QoS/QoS_Session_Impl.i index c3093814ac9..fe701b32aa2 100644 --- a/ace/QoS/QoS_Session_Impl.i +++ b/ace/QoS/QoS_Session_Impl.i @@ -99,6 +99,18 @@ ACE_RAPI_Session::source_port (const u_short &source_port) this->source_port_ = source_port; } +ACE_INLINE ACE_INET_Addr* +ACE_RAPI_Session::source_addr (void) const +{ + return this->src_addr_; +} + +ACE_INLINE void +ACE_RAPI_Session::source_addr (ACE_INET_Addr* source_addr) +{ + this->src_addr_ = source_addr; +} + // RAPI version. Returned value = 100 * major-version + minor-version. ACE_INLINE int ACE_RAPI_Session::version (void) @@ -194,6 +206,18 @@ ACE_GQoS_Session::source_port (const u_short &source_port) this->source_port_ = source_port; } +ACE_INLINE ACE_INET_Addr* +ACE_GQoS_Session::source_addr (void) const +{ + return this->src_addr_; +} + +ACE_INLINE void +ACE_GQoS_Session::source_addr (ACE_INET_Addr* source_addr) +{ + this->src_addr_ = source_addr; +} + // GQoS version. ACE_INLINE int ACE_GQoS_Session::version (void) |