ALLJOYN-61: Added DaemonICETransport and PacketEngine

Change-Id: I326de3dc7b0540988e39c2eca83377a99505b318

Resolve conflict

Change-Id: I23412eb43855cfad98b814374a9d7a6e3ceb5943

MBUS-756: Implement and verify the support for ICE Discovery in AllJoyn

Change-Id: I93119ed46640b46c145f9bf8a4b9cfc81d3aec32

Get AllJoyn ICE Support building with the latest transport changes on the master

Change-Id: Ib758b12f3553e16b98628efe5acdac0bb5796cea

Added sendttl command to PacketTest

Change-Id: Ic30f6efcb8b39410f46ba1817cd219b11f1daa2d

ICE Support: Make interface modifications as per the latest changes in the interafce

ICE Support: Added GenerateJSONDaemonRegistrationMessage in RendezvousServerInterface + Support for On Demand and Persistent TCP connections with the Rendezvous Server

ICE Support: Added GenerateJSONDaemonRegistrationMessage in RendezvousServerInterface + Support for On Demand and Persistent TCP connections with the Rendezvous Server

Change-Id: I9561bccb093b66b3d33a792f4dcab35ae15aca9e

ALLJOYN-61: Added softStartThresh and Fast retry to PacketEngine

Change-Id: I39017635a4e3ff518fd4451558672c63a7a19701

ICE Support: Abstract the interface specific portions of DiscoveryManager + Modify DiscoveryManager to intergrate with RendezvousServerConnection

Change-Id: I36660881974cf00961cbee2ab3f58118ebdbdb8b

ICE Support: Abstract the interface specific portions of DiscoveryManager

Change-Id: Id9a0ad8d7489a8f09b5aa3a8a574e166ec89467d

ALLJOYN-61: PacketEngine bug fixes related to  message expiration

Change-Id: I0e44ceeefe89cb91ee9b817874c50569a46f64e7

ICE Support: Discovery Manager changes to support latest interface changes

Change-Id: If12bf17fce916f3e1ba55cef498a0e08d90e1dc8

ICE Support: DiscoveryManager changes to support interface changes + Remove an openSSL dependency that was causing the windows build to break

Change-Id: I5656eb9184162dbce1fc35aba2a4e7a1e32ac0e2

ICE Support: Remove istream/ostream dependency from the JSON code to get code building on windows

Change-Id: I7c9c7572b9f7d6116b77a4f38d6b924ce1ab729e

ICE Support: Fix some build issues

Change-Id: Id1a72d2b0170a42d80bd08db190159ce7e30c629

ICE Support: Integrate DiscoveryManager with RendezvousServerConnection

Change-Id: I3545331e5fffde6d20ffd68818df7eec6935fdeb

ALLJOYN-61: Fixed Ack window and XON trigger bug

Change-Id: Ib391f88fcfe46d58d849a6dc451221994d0cc289

ICE Support: Modify DiscoveryManager thread as per latest interface modifications + Added ICEPacketStream (yet to implement)

Change-Id: I24a22311ae4fde4a81087662ee2671916bf86aa2

ICE Support: Integrate ICE Support with the PacketEngine

Change-Id: I7de79a3155d41acaf8d86dc19e223aebf1d09359

ALLJOYN-61: Restructured PacketEngine to allow single PacketEngine to service multiple UDP ports. Also refactored disconnect design.

Change-Id: I7d77c66869d3d5f068a247a2e6598e28ba510342

ICE Support: Some miscellaneous ICE related changes + Integrate with the latest PacketEngine changes

Change-Id: If2783e187e90349a6275741108f4477011b18104

ALLJOYN-61: Fix for Karn's alg and DisconnnectCB after PacketEngine::Stop

Change-Id: Idcda4762099654003c4cc9b269e21c35d5e24dc6

ALLJOYN-64: Re-enable slow-start threshold updating

Change-Id: Ie6d9ecee758f05a78e5fa43bd8374216b5d0202f

ICE Support: Add SCRAM-SHA-1 authentication support + Miscellaneous ICE changes

Change-Id: I98397751d8cc2b35554510b3d23c7048726f40d0

ICE Support: Back out ICE related changes in AllJoynObj.cc

Change-Id: Iaef175068e373b65397bf446579927ccefe38b84

ALLJOYN-61: Enabled delayed acks (SACK) and retry backoff

Change-Id: I7b04ef05cf18e83f61bddefc1635a8b6e0655be8

ALLJOYN-61: Fixed data stall due to critically timed XOn

Change-Id: Ia1f968f63daebb5333b0b26e7f5e1114f8ed920a

ICE Support: Fixes

Change-Id: Ibca13ad5d55a5ec7fec71fed28e79246d8c10583

ICE Support: Undo changes to internal config to get NameService discovery working

Change-Id: I109e6744117344f60b8bfeaf64a171f5551b075d

ICE Support: Fixes

Change-Id: I59f683e304a31f48e0ff74f867430e2166151e84

Fixed bug in rxAck/rxFill advance logic when packets expire

Change-Id: I7b957e6f3ce8338be7f549356855ee747dd866e4

ICE Support: Fixes to get AllJoyn ICE Support working with the Rendezvous Server

Change-Id: I8938dcd2d1e8f3a4ba20095b072efe7508ce770d

ICE Support: Undo accidental changes to daemon-main.cc

Change-Id: Ieff518db26597264f0bf351ddfa1b84d69acca85

Proximity framework: Initial commit exposing the APIs that will be used by the Discovery Manager
to get WiFi AP scan results

ICE Support: Fixes to get AllJoyn ICE support working with the Rendezvous Server

Change-Id: I466a9ca9997fda288fcbd067f87566d83ef18f0d

ICE Support: Fixes to get ICE Support working with the Rendezvous Server

Change-Id: Ia9fdf3dfdcccf6229bd447edc3d878c7b5acfcaf

ALLJOYN-61: Fixed data stall that occurred when expired packet (not sent) fills the window with no way to indicate XOFF. Also fixed delayed ack seqnum (must be most advanced seqnum seen).

Change-Id: I19efb85b9f4ea197ade93fcb1cac3b9317b26e99

ICE Support: Fixes to get AllJoyn ICE support working with the Rendezvous Server

Change-Id: Ie80bad7e4ed8b8fb9607f514dd83cf35d2dcc369

ICE Support: Get AllJoyn ICE support working with the Rendezvous Server

Change-Id: Ic9d12e9f92f5d14ccd056cc16b1df19700897b59

ALLJOYN-61: Fixed 'msg_too_big' error in PacketEngineStream::PushBytes. Also fixed calculation of advancedSeqNum

Change-Id: I0291d3a3c1192f1b0e784ae973e9321d0ac81303

ALLJOYN-61: Fixed fast retrans ack count logic

Change-Id: I745ef7462254ea888c31cca2996f69eb11ec90b7

ICE Support: Integrate DiscoveryManager with the ProximityScanEngine

Change-Id: Iffc5f7de581c76fb842b6f05c92205c060af161a

ICE Support: Add support to handle the SASL authentication failure

Change-Id: I6ad1ddd4dc7fdb84229a7b7b5cb56f86a0d553e4

ICE Support: Fix for the SCRAM Authentication Failure issue

Change-Id: I1c6b14d528c923ecd229e2331047ed016b6e3d53

ICE Support: Fixes to get AllJoyn ICE support working with the Rendezvous Server

Change-Id: I6256d743f26bd5287a233670f183c66c8ad1414f

ICE Support: Use Alarms in DiscoveryManager instead of Timers

Change-Id: I8d2240027ce69cd0ac0887c6708230b40ba8a444

ICE Support: Fixes to get AllJoyn ICE support working with the Rendezvous Server

Change-Id: If91e582bb070571d547329662ecb7874c9ec9420

ICE Support: Persist the GUID

Change-Id: Ib2057034a5d6c933ab987bb40cf8a35a7e51f2f2

ICE Support: Miscellaneous ICE support related changes

Change-Id: Iee02f84e51dfc1cd0fb114ccd4de13cb054412c3

ICE Support: Miscellaneous ICE support related changes

Change-Id: I129b41b3bf4ccefc232709f3367bbce49f75be75

ICE Support: Hard-code the Server certificate authority + Enable HTTPS support

Change-Id: Id4de1b8619b96b4ef46d1d2e81aab86df9ce0972

ICE Support: SslSocket fixes

Change-Id: I2597e9db4f1e9db37d1de99685066bbe2fa636f9

ICE Support: Fixes to get HTTPS support working

Change-Id: Iab74efd7031383353d5608cb266a664928299755

ICE Support: Move all ICE-specific files from alljoyn_core/src to alljoyn_core/daemon

Change-Id: Ifce4991de0c9610091809d831dd5064def5d2fd3

ALLJOYN-997,1000: Various pointer arithmetic fixes

Change-Id: Ia9b67d0aff2ddf03656e2303ad7010193ea219de

ALLJOYN-61: Sequence number wrap around fix in PacketEngineStream::PushBytes

Change-Id: I1641582e08eac1451470aba820713ca7da83e0c3

ICE Support: Purge status.xml to remove unwanted ICE related error codes

Change-Id: I319c5b72dc348ba9fa215b6f349bd89b18e27d45

ICE Support: Miscellaneous ICE support changes

Change-Id: I493537af0e62476a1679eaa0c45100f955a272be

ICE Support: Miscellaneous ICE related changes + Remove support for old Rendezvous Server

Change-Id: I715c15dfac0647ad733ae8706acdb1cbd30e00b8

ICE Support: Miscellaneous ICE support related changes

Change-Id: I183d752523b2534c176f0117ce664b8ad97cdfe2

ICE Support: Minor ICE fixes

Change-Id: I96de0ca46151299e6c4c3a387efea9bc49878ba5

ICE Support: Fixes to get code building on Android

Change-Id: I65819d3f97971737d8682f3f68dd4321fe638833

Fixed VARIANT=release issues in PacketEngine and BTAccessorTester

Change-Id: I3f2fdef1963ad999cf7bc5c8a62ef8c4a62a9d15

ICE Support: Fixes to get AllJoyn ICE support working with the Rendezvous Server

Change-Id: Id5b561f290f18a5a61d76db51f2c35453e3a6d6c

ICE Support: Fixes to get code building on Android

Change-Id: I4d4b0d5ef5b72c2970cbafd014edada787e88bc6

ICE Support: Fixes to get AllJoyn ICE support working with the Rendezvous Server

Change-Id: I4e3f3da8198ab4e027bde15c9c8e996deed70332

ICE Support: Fixes to get AllJoyn ICE support working with the Rendezvous Server

Change-Id: I33640e50fb3ff711e8dd42f0768f460749f17420

ICE Support: Fixes to get AllJoyn ICE support working with the Rendezvous Server

Change-Id: Ic2fe769f7f8d038249df13ae2c9387e40c356a76

ALLJOYN-61: Fixed ack handling bug

Change-Id: I965cca65d317b73beab3e98b149fc09408f98fb7

ALLJOYN-61: Removed broken test code

Change-Id: Ie4bafad559a2374fc15655c2f6e92f3bdf7b1ff1

ALLJOYN-1022: Allow retry of connectRspAck

Change-Id: I837786f76fcd6f7da2a1db985989d502275ab984

ALLJOYN-1021: Fixed typo CONNECT_RETRIES to DISCONNECT_RETRIES

Change-Id: Ic90e96e56624c59874d60f35ecfc210edfa1824e

ALLJOYN-1020: Fixed typo that was causing DisconnectReqAlarmContext to be improperly reused as DisconnectRspAlarmContext

Change-Id: I2e0dad5fe361145651db2db33a8c0a97b9e45e23

ALLJOYN-1019: Ensure that PacketEngingStream::PushBytes doesnt form packets larger than stream's MTU

Change-Id: Ie6afa93d3c85dde99ebaf112052d5ec8a8c3dcdb

ALLJOYN-1006: Removed deadlock possiblity with PacketEngine user (contending for channelInfosLock while in disconnect callback)

Change-Id: I24af03cf659d482a804ef2e08d05329bdadc1ef0

ALLJOYN-1013: Fixed copy constructor for PacketEngineStream

Change-Id: Ib97860e347cc4a4057b19ffe2db150b63a2da4f2

ICE Support: Fixes to resolve crash in DiscoveryManager

Change-Id: Id4623c6118cbcf635192921db5019ef0d8c3beb4

ICE Support: Miscellaneous ICE related changes

Change-Id: Icd4a5b3d1dc4bf83c1e61ec99725fd9b3af4b3dd

ICE Support: Miscellaneous ICE related changes

Change-Id: I9d78cdbc1e924cb16fc6430fc57fb73f5f753e73

1. Changes to Proximity Scan Engine which uses the new approach of talking to an Android service
to obtain the desired results. This moves us away from talking to the supplicant directly
using a control interface.
2. Redesigned the hysteresis algorithm to queue messages that are being sent to the Rendezvous server
3. Redesigned the threading model that was previously used inside the ProximityScanEngine
4. Changes to the constructor of DiscoveryManager and ProximityScanEngine to include BusAttachment
that was required by the ProximityScanner to use the bus
5. Implemented StopScan function inside ProximityScanEngine allows the DiscoveryManager to control the Scanning
behavior
6. Improved ProcessScanResults function inside ProximityScanEngine to make it more responsive to random requests

Commented out the macro used to enable Proximity framework

Whitespace fixes

Whitespace

ICE Support: ICE related fixes

Change-Id: Ic83f81ce7524a41694f966a58decc09692f5c0c3

1. Changes to ProximityScanEngine destructor
2. Delete discovery manager instance inside the DaemonICETransport destructor
3. Modified debugging info and format
4. Changed RemoveAlarm call in ProximityScanEngine::StopScan

Whitespace

ICE Support: Fix merge conflicts in Status.xml

Change-Id: I0183a4ede55ab10adef1e5f6511a3a87f913192f

ICE Support: Fix null hmacKey issue in TURN binding request

Change-Id: I316e46e8a176d3566da8db8b83c7dbd87f635026

ICE Support: Fix to ensure that DiscoveryManager does not attempt too frequent reconnections to the Server

Change-Id: If4e8a6bd5e1b27874d950fc2026c87a94b52c918

ICE Support: Add support to compute ICE candidate priority based on the interface type

Change-Id: I52f02faef3137cf26624aaeeadbd3aeee3f5b201

ICE Support: Remove support for interface types for Rendezvous Connection

Change-Id: I0ce825134e21380aa0802d13365af940ae25d74a

ICE Support: Remove support for realm and nonce in ICE + Use short-term credential instead of long-term credential mechanism for ICE

Change-Id: Ic5cd1d7ed3aabf265510dbd55609ddb47134777f

ALLJOYN-61: Fixed rxMask bit clearing and xon logic

Change-Id: Ib65f164947807b8d37445ed500e8657c72cac65c

ICE Support: Add username attribute to all STUN/TURN messages

Change-Id: I1c3cdd89c539bdd64c978b3e8d9111389414d990

ALLJOYN-61: Performance tweaks to increment cwnd for EACH acked packet in a cumulative (delayed) ack

Change-Id: I6a41af44ce56230054419bf2ae31e73b0dfee0c3

ALLJOYN-61: Updated debug printfs and tweaked performance params

Change-Id: Icabf5b5c073780aec30ad71c821570cbeff9af25

ICE Support: Changes to support latest changes in the Rendezvous Server interface protocol

Change-Id: I412d97b9ffdea360148e92bf327eef28f85fc5b6

Android service named Proximity Service which gets the scan results for
Proximity scan engine

ICE Support: Add support to retrieve refreshed tokens from the Rendezvous Server

Change-Id: I05895cfb99f96cc26d7a0a1b72d19bae7d0fab4b

ICE Support: Add ClientLoginService in alljoyn_android + Modify Client Login call as per latest changes in interface protocol

Change-Id: I992acb6b9447f05edbee6082466445135207b8fe

ICE Support: Add support to read the Client login credentials from the Client Login Service in the DiscoveryManager

Change-Id: If751215a5301d721c1ab942254e1424483277aea

ICE Support: Fix for MBUS-1041 + Some miscellaneous ICE changes

Change-Id: I8e8f4ad02b1c56e2ef182b8f800059b3bcd3fc43

ICE Support: Fix for MBUS-1048 + Fixes to get ICE support working with latest interface changes

Change-Id: I042ee82e5b33e648228ab6d9ad85afc90b3fbf3c

ICE Support: Add support to specify key length in STUN messages

Change-Id: I3194af966f5ef4e2d15545cb6bd2b7e4a574b6e6

1. The first scan (first call to StartScan) is now blocking which removes any possiblity
of delays induced between calling StartScan and GetScanResults for the first time
2. If StartScan is called more than once by the DiscoveryManager without calling StopScan
it will return immediately and the DiscoveryManager can get the latest scan results by
calling GetScanResults

ICE Support: Miscellaneous ICE changes + Changes to start and stop the ProximityScanEngine relative to active advertisements and/or searches

Change-Id: Ic04c9cfafeeaef64da03970fb22a8c0bdb40a60c

ICE SUpport: Fix message integrity check in received STUN messages

Change-Id: I7e0c784735ede209ba100c9297dee8af1df275b5

ICE Support: HmacKey length related fix in STUN

Change-Id: Iebb9ef095c1dc75bbea4963e0dba2cf70d32ceab

Changes to Proximity Scan Engine for improved support for blocking first call
to StartScan

Tweaked timings for first scan results returned by Proximity Engine

Whitespace fixes

Minor additions to better support the ability to cleanly call StartScan
multiple times without calling StopScan

ICE Support: Fix to remove retry of TURN Create Permissions + Add some debug prints + Encapsulate ICE check messages from client in a STUN message when sending through relay server

Change-Id: Ia05028e04fa2749bd163ef5b5193c9a72febff5d

StopScan can now be called multiple times without calling StartScan

ICE Support: Fix mismatch in local and remote ice credentials

Change-Id: I4e2bea3d4830067d8bfa9ae9ec4e5f81ccd41f03

ICE Support: Fix a bug in the previous check-in

Change-Id: Ieb7a7c99eb0b8283dd619b93ecd7f8b57573b517

ICE Support: Fix issue with ShortTermHmacKey

Change-Id: I218a83fae12617ba425f04137488472ac6561f02

ICE Support: Remove username attribute from Binding success responses

Change-Id: I29aafedcfce06fbbb8c21816e0e00e46e0a655f9

ICE Support: DaemonICEEndpoint fixes

Change-Id: Icc0ef9d0537839961a8581bad8eb14356de136e2

ALLJOYN-61: Added XON_THRESHOLD

Change-Id: Ia73967c1b920816bb9fb1ca9b3919bfd703ebc89

ICE Support: Stop STUN pacing thread after setting up DaemonICEEndpoint + Fix issue in sending messages through remote relay candidate

Change-Id: I9f2f039f7fd1338a205a7952aa5157eae50d7099

ICE Support: Stop STUN listener thread after the DaemonICEEndpoint has been initialized

Change-Id: I059e25f2cae7dd928c4414268b1a17da3f55b214

ICE Support: ICE related fixes

Change-Id: I82d20419cd43a0ab55f76fadff24b81c9ffbced2

ICE Support: ICE related fixes

Change-Id: I948231ba280a9b2d0ffa3d1db9193261108bc7ed

ICE Support: Fixes to get ICE support to build after merge with master

Change-Id: Iad91066823fa87d8660a6f3c48623d8943027d23

ICE Support: STUN fixes

Change-Id: Ie147f2505e38eba0c00e64ff890bf8e77294162b

ICE Support: Relay candidate check related fixes

Change-Id: I88230a48a190da07a31acc390895bf1efedd3387

ICE Support: Fix for MBUS-1064 by undoing the stop and start scan based on Rendezvous Connection status

Change-Id: I9b1a0878113e658fa139b65400138ae886a00f80

Back out blocking nature of StartScan

ALLJOYN-1040: Fixed bug in wrap-around handling of rxMask

Change-Id: I43f541748c8bb8e6245e23869a08630efff6b655

ALLJOYN-61: Fixed remoteRxDrain passing txDrain with large messages with small ttl

Change-Id: I74d4fc1cecbb007b89514c9869265f0f93e15a68

ICE Support: Add support to send TURN refresh or NAT keep alives from DaemonICEEndpoint

Change-Id: I9b8556611d2ce74ff94d58a901c5ce77f37ac8c3

ICE Support: Enable connection to the Server over IPv6 interfaces + Skip the loopback interface when finding interesting interface entries for DiscoveryManager's use

Change-Id: Iafbbdad539c89d67fd09cd0c64809b6f80e3e161

ICE Support: Disable connection to Rendezvous Server over IPv6 interface as it has issues

Change-Id: I31b97556898a09066c7a76087ababfb2fe325dc4

ICE Support: Remove support for message resend mechanism on reception of a 500 or 503 error code

Change-Id: I7951749e127369817eab2408e90b5a841f9435e3

ICE Support: Send both the NAT keep alive and TURN refresh if DaemonICEEndpoint has been setup using the Relay candidate

Change-Id: I6f2c2179f3f275b48457814dfc85e5c0fef6b3d5

ALLJOYN-1045: Dont allow destruction of channelInfo while txLock is held

Change-Id: I0dc1031fcac266cfe3c7a3a5bc34a91b83a6d149

ICE Support: ICE related changes

Change-Id: I9e8920b40aba5e5d6def1d12c9d4ebbd833ef030

ALLJOYN-1010: xon was incorrectly being rejected when rxDrain advanced and entire window size in one increment

Change-Id: I73afae54e059478ff21895bb3a83463273b51331

ALLJOYN-1063: Fixed issue with DaemonICETransport::Join triggering mutex assertion in ICESession

Change-Id: Id9ba795beef9b050e84748a7fc6dd7ced8604d2d

ALLJOYN-1063: Removed normal case LogError in posix/DaemonTransport.cc

Change-Id: If5e470a31c4e7af7032e5ed0ce255a26c5067d3d

ALLJOYN-1063: Fix assert fail in BTController when notifited that the local AllJoyn Bus Object endpoint leave the bus via the NameOwnerChanged() callback.

Refactoring of Proximity Scan Engine both in the daemon and the Android service.
Instead of our previous approach of issuing an explicit scan request issued
everytime, we now have shifted to the opportunistic approach of using available
scan results. This change was put in mainly to reduce impact on battery consumption
due to previous approach

ALLJOYN-1079: Direct output to stderr instead of stdout in daemon-main.cc

Android Proximity Service can now auto-start when the device restarts

Refined the ProximityServiceInterface in Android service

Initial fixes for ICE/AllJoyn data conenction

Change-Id: Iceb6f95fccc8b8e79f63669e684458e284d4301e

More fixes to enable data connections over DaemonICETransport

Change-Id: I5a5d7e46e72e1695318018700b97b5b6a37f3745

Add support for DaemonICEEndpoint to gracefully shutdown PacketEngine connection

Change-Id: Ide0a736abc4c994129077d44f800fa6fafde0465

ICE: Stabailizing ICESession/ICECandidate when shutting down session

Change-Id: I300d6d887c1db44aa090c578d008793ac98977e1

ICE: Backing out ICECanddiate thread exit fix since it causes ICE dance to fail

Change-Id: I44950404df392a920806bb73fcb1db46386a9188
Fixed windows build issues. Moved ICE files into separate directory

Change-Id: Ie73c310c72386cd933d8ae493a7f51bb0726438f
Added ICE specific SConstruct file

Change-Id: Ieecdd0df568773945ade4c9ec1695516cb747738
remove bullseye support
QuIC copyright
ALLJOYN-61: Fixed accesses of invalid iterator in DiscoveryManager

Change-Id: I142d4a7d34b1f409a15afe9a4764591c253b1f39
Enabled Bullseye correctly
ALLJOYN-61: Fixing accesses of invalid iterators in DaemonICETransport

Change-Id: I90ddae6ef4e3ffa573d88bfbfc54b3ea9fadfa9b