summaryrefslogtreecommitdiff
path: root/ACE/examples/QOS/Change_Sender_TSpec/QoS_Util.h
blob: 1240cb23530717a77c49e8bf61b2161527225f9d (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
/* -*- C++ -*- */

//=============================================================================
/**
 *  @file    QoS_Util.h
 *
 *  @author Vishal Kachroo <vishal@cs.wustl.edu>
 */
//=============================================================================


#ifndef QOS_UTIL_H
#define QOS_UTIL_H

#include "ace/INET_Addr.h"
#include "ace/QoS/QoS_Session.h"

/**
 * @class QoS_Util
 *
 * @brief This class provides the utility functions like parse_args ()
 * required by a QoS enabled application.
 */
class QoS_Util
{

public:

  // constructor.
  QoS_Util (int argc, ACE_TCHAR *argv[]);

  // destructor.
  ~QoS_Util (void);

  // Parse command-line arguments.
  int parse_args (void);

  // GET methods.
  ACE_INET_Addr *mult_session_addr (void) const;

  ACE_INET_Addr *dest_addr (void) const;

  u_short source_port (void) const;

  ACE_Protocol_ID protocol (void) const;

  int multicast_flag (void) const;

private:

  // Command line arguments.
  int argc_;
  ACE_TCHAR **argv_;

  // Multicast session address.
  ACE_INET_Addr *mult_session_addr_;

  // Unicast destination address of the receiver.
  ACE_INET_Addr *dest_addr_;

  // Source port for the sender.
  u_short source_port_;

  // Protocol.
  ACE_Protocol_ID protocol_;

  // Multicast Flag.
  int multicast_flag_;

};

#endif /* QOS_UTIL_H */