From fb8267afc8486945bb4b531c20886121374e2c19 Mon Sep 17 00:00:00 2001 From: emcho Date: Sun, 25 Apr 2010 14:40:38 +0000 Subject: [PATCH] Ongoing work on connectivity checks. Support for XOR-MAPPED-ADDRESS attributes in Binding Responses --- .../ice4j/MessageEventDispatchingTest.java | 2 +- test/org/ice4j/TransactionSupportTests.java | 2 +- .../org/ice4j/message/MessageFactoryTest.java | 2 +- test/org/ice4j/stack/ShallowStackTest.java | 2 +- .../stunclient/StunAddressDiscovererTest.java | 24 +++++++++---------- .../StunAddressDiscovererTest_v4v6.java | 16 ++++++------- .../StunAddressDiscovererTest_v6.java | 24 +++++++++---------- test/test/Ice.java | 2 +- 8 files changed, 37 insertions(+), 37 deletions(-) diff --git a/test/org/ice4j/MessageEventDispatchingTest.java b/test/org/ice4j/MessageEventDispatchingTest.java index 8d11404..6a83ef6 100644 --- a/test/org/ice4j/MessageEventDispatchingTest.java +++ b/test/org/ice4j/MessageEventDispatchingTest.java @@ -100,7 +100,7 @@ public class MessageEventDispatchingTest extends TestCase stunStack.addSocket(serverSock2); bindingRequest = MessageFactory.createBindingRequest(); - bindingResponse = MessageFactory.createBindingResponse( + bindingResponse = MessageFactory.create3482BindingResponse( clientAddress, clientAddress, serverAddress); requestCollector = new PlainRequestCollector(); diff --git a/test/org/ice4j/TransactionSupportTests.java b/test/org/ice4j/TransactionSupportTests.java index 9efdf2c..d59b9a4 100644 --- a/test/org/ice4j/TransactionSupportTests.java +++ b/test/org/ice4j/TransactionSupportTests.java @@ -83,7 +83,7 @@ public class TransactionSupportTests extends TestCase StunStack.getInstance().addSocket(serverSock); bindingRequest = MessageFactory.createBindingRequest(); - bindingResponse = MessageFactory.createBindingResponse( + bindingResponse = MessageFactory.create3482BindingResponse( clientAddress, clientAddress, serverAddress); requestCollector = new PlainRequestCollector(); diff --git a/test/org/ice4j/message/MessageFactoryTest.java b/test/org/ice4j/message/MessageFactoryTest.java index f486dbd..e5edd22 100644 --- a/test/org/ice4j/message/MessageFactoryTest.java +++ b/test/org/ice4j/message/MessageFactoryTest.java @@ -170,7 +170,7 @@ public class MessageFactoryTest extends TestCase { bindingResponse.addAttribute(changedAddress); Message expectedReturn = bindingResponse; - Message actualReturn = messageFactory.createBindingResponse( + Message actualReturn = messageFactory.create3482BindingResponse( new TransportAddress( msgFixture.ADDRESS_ATTRIBUTE_ADDRESS, msgFixture.ADDRESS_ATTRIBUTE_PORT, Transport.UDP), diff --git a/test/org/ice4j/stack/ShallowStackTest.java b/test/org/ice4j/stack/ShallowStackTest.java index 7f551f4..b76aa0d 100644 --- a/test/org/ice4j/stack/ShallowStackTest.java +++ b/test/org/ice4j/stack/ShallowStackTest.java @@ -213,7 +213,7 @@ public class ShallowStackTest extends TestCase { Arrays.equals(expectedReturn, actualReturn)); //---------- create the response --------------------------------------- - Response bindingResponse = MessageFactory.createBindingResponse( + Response bindingResponse = MessageFactory.create3482BindingResponse( new TransportAddress( MsgFixture.ADDRESS_ATTRIBUTE_ADDRESS, MsgFixture.ADDRESS_ATTRIBUTE_PORT, Transport.UDP ), new TransportAddress( MsgFixture.ADDRESS_ATTRIBUTE_ADDRESS_2, diff --git a/test/org/ice4j/stunclient/StunAddressDiscovererTest.java b/test/org/ice4j/stunclient/StunAddressDiscovererTest.java index be0bdb3..27a19e3 100644 --- a/test/org/ice4j/stunclient/StunAddressDiscovererTest.java +++ b/test/org/ice4j/stunclient/StunAddressDiscovererTest.java @@ -103,10 +103,10 @@ public class StunAddressDiscovererTest public void testRecognizeSymmetricNat() throws Exception { //define the server response sequence - Response testIResponse1 = MessageFactory.createBindingResponse( + Response testIResponse1 = MessageFactory.create3482BindingResponse( mappedClientAddress, responseServerAddress, responseServerAddress); Response testIResponse2 = null; - Response testIResponse3 = MessageFactory.createBindingResponse( + Response testIResponse3 = MessageFactory.create3482BindingResponse( mappedClientAddressPort2, responseServerAddress, responseServerAddress); @@ -139,10 +139,10 @@ public class StunAddressDiscovererTest throws Exception { //define the server response sequence - Response testIResponse1 = MessageFactory.createBindingResponse( + Response testIResponse1 = MessageFactory.create3482BindingResponse( mappedClientAddress, responseServerAddress, responseServerAddress); Response testIResponse2 = null; - Response testIResponse3 = MessageFactory.createBindingResponse( + Response testIResponse3 = MessageFactory.create3482BindingResponse( mappedClientAddress, responseServerAddress, responseServerAddress); Response testIResponse4 = null; @@ -172,12 +172,12 @@ public class StunAddressDiscovererTest public void testRecognizeRestrictedCone() throws Exception { //define the server response sequence - Response testIResponse1 = MessageFactory.createBindingResponse( + Response testIResponse1 = MessageFactory.create3482BindingResponse( mappedClientAddress, responseServerAddress, responseServerAddress); Response testIResponse2 = null; - Response testIResponse3 = MessageFactory.createBindingResponse( + Response testIResponse3 = MessageFactory.create3482BindingResponse( mappedClientAddress, responseServerAddress, responseServerAddress); - Response testIResponse4 = MessageFactory.createBindingResponse( + Response testIResponse4 = MessageFactory.create3482BindingResponse( mappedClientAddress, responseServerAddress, responseServerAddress); responseServer.addMessage(testIResponse1); @@ -207,9 +207,9 @@ public class StunAddressDiscovererTest throws Exception { //define the server response sequence - Response testIResponse1 = MessageFactory.createBindingResponse( + Response testIResponse1 = MessageFactory.create3482BindingResponse( mappedClientAddress, responseServerAddress, responseServerAddress); - Response testIResponse2 = MessageFactory.createBindingResponse( + Response testIResponse2 = MessageFactory.create3482BindingResponse( mappedClientAddress, responseServerAddress, responseServerAddress); responseServer.addMessage(testIResponse1); @@ -238,7 +238,7 @@ public class StunAddressDiscovererTest throws Exception { //define the server response sequence - Response testIResponse1 = MessageFactory.createBindingResponse( + Response testIResponse1 = MessageFactory.create3482BindingResponse( discovererAddress, responseServerAddress, responseServerAddress); Response testIResponse2 = null; @@ -268,9 +268,9 @@ public class StunAddressDiscovererTest throws Exception { //define the server response sequence - Response testIResponse1 = MessageFactory.createBindingResponse( + Response testIResponse1 = MessageFactory.create3482BindingResponse( discovererAddress, responseServerAddress, responseServerAddress); - Response testIResponse2 = MessageFactory.createBindingResponse( + Response testIResponse2 = MessageFactory.create3482BindingResponse( discovererAddress, responseServerAddress, responseServerAddress); responseServer.addMessage(testIResponse1); diff --git a/test/org/ice4j/stunclient/StunAddressDiscovererTest_v4v6.java b/test/org/ice4j/stunclient/StunAddressDiscovererTest_v4v6.java index ac36c5c..d470282 100644 --- a/test/org/ice4j/stunclient/StunAddressDiscovererTest_v4v6.java +++ b/test/org/ice4j/stunclient/StunAddressDiscovererTest_v4v6.java @@ -112,12 +112,12 @@ public class StunAddressDiscovererTest_v4v6 extends TestCase { throws Exception { //define the server response sequence - Response testIResponse1 = MessageFactory.createBindingResponse( + Response testIResponse1 = MessageFactory.create3482BindingResponse( mappedClientAddress_v4, responseServerAddress_v6, responseServerAddress_v6); Response testIResponse2 = null; - Response testIResponse3 = MessageFactory.createBindingResponse( + Response testIResponse3 = MessageFactory.create3482BindingResponse( mappedClientAddress_v4_Port2, responseServerAddress_v6, responseServerAddress_v6); @@ -147,12 +147,12 @@ public class StunAddressDiscovererTest_v4v6 extends TestCase { public void testRecognizeSymmetricNat_Local_v4_Public_v6() throws Exception { //define the server response sequence - Response testIResponse1 = MessageFactory.createBindingResponse( + Response testIResponse1 = MessageFactory.create3482BindingResponse( mappedClientAddress_v6, responseServerAddress_v4, responseServerAddress_v4); Response testIResponse2 = null; - Response testIResponse3 = MessageFactory.createBindingResponse( + Response testIResponse3 = MessageFactory.create3482BindingResponse( mappedClientAddress_v6_Port2, responseServerAddress_v4, responseServerAddress_v4); @@ -184,11 +184,11 @@ public class StunAddressDiscovererTest_v4v6 extends TestCase { public void testRecognizeFullCone_Local_v6_Public_v4() throws Exception { //define the server response sequence - Response testIResponse1 = MessageFactory.createBindingResponse( + Response testIResponse1 = MessageFactory.create3482BindingResponse( mappedClientAddress_v4, responseServerAddress_v6, responseServerAddress_v6); - Response testIResponse2 = MessageFactory.createBindingResponse( + Response testIResponse2 = MessageFactory.create3482BindingResponse( mappedClientAddress_v4, responseServerAddress_v6, responseServerAddress_v6); @@ -217,11 +217,11 @@ public class StunAddressDiscovererTest_v4v6 extends TestCase { public void testRecognizeFullCone_Local_v4_Public_v6() throws Exception { //define the server response sequence - Response testIResponse1 = MessageFactory.createBindingResponse( + Response testIResponse1 = MessageFactory.create3482BindingResponse( mappedClientAddress_v6, responseServerAddress_v4, responseServerAddress_v4); - Response testIResponse2 = MessageFactory.createBindingResponse( + Response testIResponse2 = MessageFactory.create3482BindingResponse( mappedClientAddress_v6, responseServerAddress_v4, responseServerAddress_v4); diff --git a/test/org/ice4j/stunclient/StunAddressDiscovererTest_v6.java b/test/org/ice4j/stunclient/StunAddressDiscovererTest_v6.java index efb96ea..07f2579 100644 --- a/test/org/ice4j/stunclient/StunAddressDiscovererTest_v6.java +++ b/test/org/ice4j/stunclient/StunAddressDiscovererTest_v6.java @@ -102,10 +102,10 @@ public class StunAddressDiscovererTest_v6 extends TestCase { throws Exception { //define the server response sequence - Response testIResponse1 = MessageFactory.createBindingResponse( + Response testIResponse1 = MessageFactory.create3482BindingResponse( mappedClientAddress, responseServerAddress, responseServerAddress); Response testIResponse2 = null; - Response testIResponse3 = MessageFactory.createBindingResponse( + Response testIResponse3 = MessageFactory.create3482BindingResponse( mappedClientAddressPort2, responseServerAddress, responseServerAddress); @@ -137,10 +137,10 @@ public class StunAddressDiscovererTest_v6 extends TestCase { throws Exception { //define the server response sequence - Response testIResponse1 = MessageFactory.createBindingResponse( + Response testIResponse1 = MessageFactory.create3482BindingResponse( mappedClientAddress, responseServerAddress, responseServerAddress); Response testIResponse2 = null; - Response testIResponse3 = MessageFactory.createBindingResponse( + Response testIResponse3 = MessageFactory.create3482BindingResponse( mappedClientAddress, responseServerAddress, responseServerAddress); Response testIResponse4 = null; @@ -172,12 +172,12 @@ public class StunAddressDiscovererTest_v6 extends TestCase { throws Exception { //define the server response sequence - Response testIResponse1 = MessageFactory.createBindingResponse( + Response testIResponse1 = MessageFactory.create3482BindingResponse( mappedClientAddress, responseServerAddress, responseServerAddress); Response testIResponse2 = null; - Response testIResponse3 = MessageFactory.createBindingResponse( + Response testIResponse3 = MessageFactory.create3482BindingResponse( mappedClientAddress, responseServerAddress, responseServerAddress); - Response testIResponse4 = MessageFactory.createBindingResponse( + Response testIResponse4 = MessageFactory.create3482BindingResponse( mappedClientAddress, responseServerAddress, responseServerAddress); responseServer.addMessage(testIResponse1); @@ -206,9 +206,9 @@ public class StunAddressDiscovererTest_v6 extends TestCase { public void testRecognizeFullCone() throws Exception { //define the server response sequence - Response testIResponse1 = MessageFactory.createBindingResponse( + Response testIResponse1 = MessageFactory.create3482BindingResponse( mappedClientAddress, responseServerAddress, responseServerAddress); - Response testIResponse2 = MessageFactory.createBindingResponse( + Response testIResponse2 = MessageFactory.create3482BindingResponse( mappedClientAddress, responseServerAddress, responseServerAddress); responseServer.addMessage(testIResponse1); @@ -236,7 +236,7 @@ public class StunAddressDiscovererTest_v6 extends TestCase { throws Exception { //define the server response sequence - Response testIResponse1 = MessageFactory.createBindingResponse( + Response testIResponse1 = MessageFactory.create3482BindingResponse( discovererAddress, responseServerAddress, responseServerAddress); Response testIResponse2 = null; @@ -265,9 +265,9 @@ public class StunAddressDiscovererTest_v6 extends TestCase { throws Exception { //define the server response sequence - Response testIResponse1 = MessageFactory.createBindingResponse( + Response testIResponse1 = MessageFactory.create3482BindingResponse( discovererAddress, responseServerAddress, responseServerAddress); - Response testIResponse2 = MessageFactory.createBindingResponse( + Response testIResponse2 = MessageFactory.create3482BindingResponse( discovererAddress, responseServerAddress, responseServerAddress); responseServer.addMessage(testIResponse1); diff --git a/test/test/Ice.java b/test/test/Ice.java index 6c870d0..53e6a3d 100644 --- a/test/test/Ice.java +++ b/test/test/Ice.java @@ -50,7 +50,7 @@ public class Ice System.out.println("Local audio clist:\n" + localAgent.getStream("audio").getCheckList()); - System.out.println("Local audio clist:\n" + System.out.println("Local video clist:\n" + localAgent.getStream("video").getCheckList()); System.out.println("Total execution time: "