blob: 0ff765d856506f79ea0dc3a1b438d563bf0530d0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
|
/* -*- C++ -*- */
// $Id$
// ===========================================================================
//
// = LIBRARY
// ace
//
// = FILENAME
// QoS_Session.h
//
// = AUTHOR
// Vishal Kachroo <vishal@cs.wustl.edu>
//
// ===========================================================================
#ifndef ACE_QOS_SESSION_H
#define ACE_QOS_SESSION_H
#include "ace/INET_Addr.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
class ACE_SOCK;
#include "ace/Containers_T.h"
typedef int ACE_Protocol_ID;
// IPPROTO_UDP or IPPROTO_TCP.
class ACE_Export ACE_QoS_Session
{
// = TITLE
// A QoS Session object.
//
// = DESCRIPTION
// This class defines the interface for a QoS Session. It abstracts the
// notion of QoS on different platforms and presents a simple, easy-to-use
// API. Current [RAPI,GQoS] and future implementations will conform to this
// interface.
public:
enum ACE_End_Point_Type
{
ACE_QOS_SENDER,
ACE_QOS_RECEIVER,
ACE_QOS_BOTH
};
// A flag to indicate if this endpoint is a sender or a receiver or both.
virtual ~ACE_QoS_Session (void) {};
// to shutup g++.
virtual int open (ACE_INET_Addr dest_addr,
ACE_Protocol_ID protocol_id) = 0;
// Open a QoS session [dest IP, dest port, Protocol ID].
virtual int close (void) = 0;
// Close the QoS Session.
virtual ACE_QoS qos (void) const = 0;
// Returns the QoS in the current session.
virtual int qos (ACE_SOCK *socket,
const ACE_QoS &ace_qos) = 0;
// Set QoS for the current session. The socket parameter is used to confirm if
// this QoS session was subscribed to by the socket.
virtual void qos (const ACE_QoS &ace_qos) = 0;
// Sets the QoS for this session object to ace_qos. Does not interfere with the
// QoS in the underlying socket. This call is useful to update the QoS object
// when the underlying socket QoS is being set through a mechanism other than
// the previous qos () method e.g. inside the dgram_mcast.subscribe () where the
// QoS for the socket is set through ACE_OS::join_leaf ().
virtual int update_qos (void) = 0;
// This is called from handle_qos () method of the the QoS Event Handler.
// Invoking this method is an indication of a QoS event occurring, that may have
// resulted in a change of QoS for the underlying session. This method updates
// the QoS object associated with this session.
virtual int session_id (void) const = 0;
// Get the session id.
virtual void session_id (const int session_id) = 0;
// Set the session id.
virtual ACE_INET_Addr dest_addr (void) const = 0;
// Get the destination address for this session.
virtual void dest_addr (const ACE_INET_Addr &dest_addr) = 0;
// Set the destination address for this session.
virtual int version (void) = 0;
// Returns the version of the underlying RSVP implementation. Is
// meaningful only when the underlying implementation has versioning.
protected:
int session_id_;
// session id for the session.
ACE_INET_Addr dest_addr_;
// Destination address for this session.
ACE_Protocol_ID protocol_id_;
// Is this a TCP or a UDP session.
ACE_QoS qos_;
// QoS for this session.
ACE_End_Point_Type flags_;
// Specifies if this is a sending/receiving/both session.
};
#endif /* ACE_QOS_SESSION_H */
|