Ongoing work on connectivity checks. Support for XOR-MAPPED-ADDRESS attributes in Binding Responses
This commit is contained in:
parent
b75359ad69
commit
fb8267afc8
@ -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();
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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),
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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: "
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user