/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* @test
* @bug 4927640
* @summary Tests the SCTP protocol implementation
* @author chegar
*/
public class SocketOptionTests {
new GetPropertyAction("os.name"));
T expectedValue) throws IOException {
}
T value) {
try {
} catch (IOException e) {
/* Informational only, not all options have native support */
}
}
if (!Util.isSCTPSupported()) {
return;
}
try {
/* check supported options */
}
/* SCTP_PRIMARY_ADDR */
/* NullPointerException */
try {
fail("NullPointerException not thrown for setOption");
} catch (NullPointerException unused) {
pass();
}
try {
fail("NullPointerException not thrown for getOption");
} catch (NullPointerException unused) {
pass();
}
/* ClosedChannelException */
try {
fail("ClosedChannelException not thrown");
} catch (ClosedChannelException unused) {
pass();
}
} catch (IOException ioe) {
}
}
/* SCTP_PRIMARY_ADDR */
debug("addrs should not be empty");
debug("Peer local Addresses: ");
}
/* retrieval of SCTP_PRIMARY_ADDR is not supported on Solaris */
/* For now do not set this option. There is a bug on Solaris 10 pre Update 5
* where setting this option returns Invalid argument */
//debug("Set SCTP_PRIMARY_ADDR with " + addrToSet);
//sc.setOption(SCTP_PRIMARY_ADDR, addrToSet);
return;
} else { /* Linux */
/* Verify that this is one of the peer addresses */
boolean found = false;
found = true;
}
}
}
}
//--------------------- Infrastructure ---------------------------
boolean debug = true;
}