summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/SL3TCPIP.idl
blob: f6d2c1a52467fecab0e8bf33537c3fc689c1abfa (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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
//tabstop=4
//***********************************************************************
// ORBAsec SL3
// ----------------------------------------------------------------------
// Copyright (C) 2001 Adiron, LLC.
//                    All rights reserved.
// ----------------------------------------------------------------------
// $Id$
//***********************************************************************
#ifndef _SL3TCPIP_IDL_
#define _SL3TCPIP_IDL_
#include <orb.idl>
#include <SL3/SecurityLevel3.idl>
#include <SL3/TransportSecurity.idl>
#include <SL3/SL3AQArgs.idl>

#pragma prefix "adiron.com"

module SL3TCPIP {

    const TransportSecurity::MechanismId       MID_TCPIP  = "TCPIP";

    /**
     * This is the only acquisition mechanism for acquiring TCPIP
     * Transport Credentials.
     */
    const TransportSecurity::AcquisitionMethod AQM_TCPIPArgs = "TCPIPArgs";

    /**
     * An object of this interface is created by the Argument Factory Object.
     * It aids in creating the Credentials Acquisition Argument for
     * TCPIP based Transport Credentials.
     */
    local interface TCPIPArgBuilder : SL3AQArgs::GenericArgBuilder {

        /**
         * This operation adds Transport Credentials CSIv1 protocol
         * version capability.
         * @param support If false, the associated transports will
         *                always be expected to  carry CSIv2 information.
         *                Default is true.
         *                For CSIv2 capability without the ability to
         *                use these credentials for CSIv1 transports, this
         *                argument must be explicitly stated with a value
         *                of false.
         */
        void addSupportCSIv1(
            in boolean support
        );

        /**
         * This operation adds Transport Credentials CSIv2 protocol
         * version capability.
         * @param support If false, the associated transports will
         *                not, or be expected to carry CSIv2 information.
         *                If true, they must, if CSIv1 support is false.
         *                It's default value is false.
         */
        void addSupportCSIv2(
            in boolean support
        );

        /**
         * This operation adds Transport Credentials Initiator Options to
         * the acquisition argument.  This argument is only relevant when
         * the Credentials Usage include Initiate.
         *
         * @param bind This argument contains the interface to which to bind.
         *             An empty string signifies to use the operating system
         *             default.
         * @param low_port  If this argument is 0, the system select the port.
         *                  If this argument is not 0, then connections
         *                  will attempt to bind to this port or higher.
         * @param high_port If low_port is not 0, and this argument is greater
         *                  than or equal to low_port, then the lowest
         *                  available port within the range will be selected.
         * @param timeout   Timeout (in milliseconds) for connection establishment.
         *                  The value 0 indicates an indefinite wait.
         */
        void addTCPIPInitiatorOptions(
            in string bind,      // Interface to bind the socket to.
                                 // If empty, then system selects
            in long   low_port,  // If 0 system selects
            in long   high_port, // Only if low_port != 0, high port >=low_port
                                 // If equal, it binds to that port.
                                 // If greater, it will try for ports within
                                 // the range.
            in long   timeout    // default timeout for connections.
        );

        /**
         * This operation adds Transport Credentials Acceptor Options to
         * the acquisition argument.  This argument is only relevant when
         * the Credentials Usage include Accept.
         *
         * @param hosts     This operation contains a list of "hosts", or
         *                  addresses that should be placed in the IOR of
         *                  objects associated with these credentials.
         * @param bind      This argument contains the interface to which to
         *                  bind. An empty string signifies to use the
         *                  operating system default.
         * @param low_port  If this argument is 0, the system select the port.
         *                  If this argument is not 0, then connections
         *                  will attempt to bind to this port or higher.
         * @param high_port If low_port is not 0, and this argument is greater
         *                  than or equal to low_port, then the lowest
         *                  available port within the range will be selected.
         * @param backlog   Socket Listening Backlog. 0 means use operating
         *                  system default.
         * @param numeric   If this argument is true, all addresses associated
         *                  with these credentials that are placed in IORs
         *                  will be in numeric form.
         */
        void addTCPIPAcceptorOptions(
            in CORBA::StringSeq   hosts,     // If empty, system select
            in string             bind,      // if not empty, must be one of hosts.
            in long               low_port,  // 0 means system select
            in long               high_port, // Only if low_port != 0;
            in long               backlog,   // socket parameter
            in boolean            numeric    // use numeric addresses inIORs?
        );
    };

    /**
     * This interface is used to create the TCPIP Argument Builder
     */
    local interface ArgumentFactory : SL3AQArgs::ArgumentFactory {

        /**
         * This operation creates a TCPIP Transport Security
         * Credentials Acquisition Argument Builder.
         */
        TCPIPArgBuilder createTCPIPArgBuilder(
            in TransportSecurity::CredentialsUsage usage
        );

        /**
         * This operation creates a TaggedArgument containing
         * the following information for acquiring transport
         * credentials with CSIv1 capability turned off or on.
         *
         * @param support. If false, call GIOP requests traveling
         *                 over these transports is expected to
         *                 carry CSIv2 information.
         */
        SL3AQArgs::Argument createSupportCSIv1(
            in boolean support
        );

        /**
         * This operation creates a TaggedArgument containing
         * the following information for acquiring transport
         * credentials with CSIv2 capability turned off or on.
         *
         * @param support. If false, call GIOP requests traveling
         *                 over these transports will not and is
         *                 not expected to carry CSIv2 information.
         */
        SL3AQArgs::Argument createSupportCSIv2(
            in boolean support
        );

        /**
         * This operation creates a Tagged Argument containing
         * the following information for acquiring TCPIP credentials.
         * <p>
         * For a description of the arguments, please see the
         * corresponding operation in the TCPIPArgBuilder.
         *
         * @see TCPIPArgBuilder
         */
        SL3AQArgs::Argument createTCPIPInitiatorOptions(
            in string bind,      // Interface to bind the socket to.
                                 // If empty, then system selects
            in long   low_port,  // If 0 system selects
            in long   high_port, // Only if low_port != 0, high port >=low_port
                                 // If equal, it binds to that port.
                                 // If greater, it will try for ports within
                                 // the range.
            in long   timeout    // default timeout for connections.
        );

        /**
         * This operation creates a Tagged Argument containing
         * the following information for acquiring TCPIP credentials.
         * <p>
         * For a description of the arguments, please see the
         * corresponding operation in the TCPIPArgBuilder.
         *
         * @see TCPIPArgBuilder
         */
        SL3AQArgs::Argument createTCPIPAcceptorOptions(
            in CORBA::StringSeq   hosts,     // If empty, system select
            in string             bind,      // if not empty, must be one of hosts.
            in long               low_port,  // 0 means system select
            in long               high_port, // Only if low_port != 0;
            in long               backlog,   // socket parameter
            in boolean            numeric    // use numeric addresses inIORs?
        );
    };
};

#endif