summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/PortableGroup/miopconf.h
blob: 49afdf15567f5d68cdf5c013682f4b824c028e67 (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
// -*- C++ -*-

//=============================================================================
/**
 *  @file     miopconf.h
 *
 *  $Id$
 *
 *  Build configuration file.
 *
 *  @author  Copyright 1995 by Sun Microsystems, Inc.
 *  @author  Chris Cleeland
 *  @author  Douglas C. Schmidt
 */
//=============================================================================

#ifndef TAO_MIOPCONF_H
#define TAO_MIOPCONF_H
#include /**/ "ace/pre.h"

#include "ace/config-all.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#include "tao/corba.h"

// This is the version of the MIOP spec that TAO supports. The
// exact usage of the version has not been emphasized. But TAO should
// get a TaggedComponents for a group with this version number. So, for
// the present, we do a sanity check for our version and raise an error on
// a mismatch.

#if !defined (TAO_DEF_MIOP_MAJOR)
#define TAO_DEF_MIOP_MAJOR 1
#endif /* TAO_DEF_MIOP_MAJOR */
#if !defined (TAO_DEF_MIOP_MINOR)
#define TAO_DEF_MIOP_MINOR 0
#endif /* TAO_DEF_MIOP_MINOR */

// MIOP Definitions:

// Default value for the delay in milliseconds before a fragmented
// MIOP message will be considered as expired on the server.
#if !defined (TAO_DEFAULT_MIOP_FRAGMENTS_CLEANUP_DELAY)
static int const TAO_DEFAULT_MIOP_FRAGMENTS_CLEANUP_DELAY = 1000;
#endif

// Default number of incomplete messages waiting for reassembly before
// cleanup on the server side.
#if !defined (TAO_DEFAULT_MIOP_FRAGMENTS_CLEANUP_NUMBER)
static int const TAO_DEFAULT_MIOP_FRAGMENTS_CLEANUP_NUMBER = 5;
#endif

// Default memory taken by incomplete messages waiting for reassembly
// before cleanup on the server side.
#if !defined (TAO_DEFAULT_MIOP_FRAGMENTS_CLEANUP_MEMORY)
static int const TAO_DEFAULT_MIOP_FRAGMENTS_CLEANUP_MEMORY = 3000000;
#endif

// We don't use the constants below but let they stay for the documentation.
// static u_long const MIOP_MAGIC_OFFSET             = 0u;
// static u_long const MIOP_VERSION_OFFSET           = 4u;
// static u_long const MIOP_FLAGS_OFFSET             = 5u;
// static u_long const MIOP_PACKET_LENGTH_OFFSET     = 6u;
// static u_long const MIOP_PACKET_NUMBER_OFFSET     = 8u;
// static u_long const MIOP_NUMBER_OF_PACKETS_OFFSET = 12u;
// static u_long const MIOP_ID_LENGTH_OFFSET         = 16u;
static u_long const MIOP_ID_CONTENT_OFFSET         = 20u;

// Max ID length 252 is defined in the MIOP spec. We use 12.
static u_long const MIOP_MIN_ID_LENGTH             = 0u;
static u_long const MIOP_MAX_ID_LENGTH             = 252u;
static u_long const MIOP_DEFAULT_ID_LENGTH         = 12u;

// MIOP_DEFAULT_HEADER_SIZE, MIOP_MIN_HEADER_SIZE and MIOP_MAX_HEADER_SIZE
// must be multiple of 8.
static u_long const MIOP_DEFAULT_HEADER_SIZE       =
  MIOP_ID_CONTENT_OFFSET + MIOP_DEFAULT_ID_LENGTH +
  (MIOP_ID_CONTENT_OFFSET + MIOP_DEFAULT_ID_LENGTH) % 8u;
static u_long const MIOP_MIN_HEADER_SIZE           =
  MIOP_ID_CONTENT_OFFSET + MIOP_MIN_ID_LENGTH +
  (MIOP_ID_CONTENT_OFFSET + MIOP_MIN_ID_LENGTH) % 8u;
static u_long const MIOP_MAX_HEADER_SIZE           =
  MIOP_ID_CONTENT_OFFSET + MIOP_MAX_ID_LENGTH +
  (MIOP_ID_CONTENT_OFFSET + MIOP_MAX_ID_LENGTH) % 8u;

static u_long const MIOP_MAX_DGRAM_SIZE            = ACE_MAX_UDP_PACKET_SIZE;

// Default value for the size of MIOP fragment used by the client.
// This can be considered same as MTU.
#if !defined (TAO_DEFAULT_MIOP_FRAGMENT_SIZE)
static u_long const TAO_DEFAULT_MIOP_FRAGMENT_SIZE     = MIOP_MAX_DGRAM_SIZE;
#endif

#if !defined (TAO_DEFAULT_MIOP_MAX_FRAGMENTS)
static u_long const TAO_DEFAULT_MIOP_MAX_FRAGMENTS = 0u; // Zero is unlimited
#endif

#if !defined (TAO_DEFAULT_MIOP_SEND_THROTTLING)
static bool const TAO_DEFAULT_MIOP_SEND_THROTTLING = true; // Enabled
#endif

#if !defined (TAO_DEFAULT_MIOP_EAGER_DEQUEUEING)
static bool const TAO_DEFAULT_MIOP_EAGER_DEQUEUEING = true; // Enabled
#endif

static CORBA::Octet const miop_magic[4] = {
  0x4d, 0x49, 0x4f, 0x50
}; // in ASCII this is 'M', 'I', 'O', 'P'

#include /**/ "ace/post.h"
#endif /*TAO_MIOPCONF_H*/