I am trying to compute Foundations for ice candidates, I am referring from RFC 5254 section 4.1.1.3.
I have gone through the RFC 5254 but I am unable to understand how to compute foundations for candidates.
Is there any algorithm for computing foundations for candidates in ICE protocol.
-
1AFAIK, nothing in the spec defines exactly the range of the ID. But for example, in Firefox you will have small IDs (0,2, etc.), but in Chrome, IDs are bigger (1174096638, 2999745851, etc.). You can try by yourself [here](https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/) – Antonin M. Jul 21 '15 at 12:52
-
@AntoninM. I want to assign foundations for candidates, is there any way to calculate them or its just random numbers – Abhishek Jul 21 '15 at 13:04
-
Yes. It is random number. – Tahlil Jul 22 '15 at 08:03
1 Answers
The foundation is used to determine if two candidates are the same(same transport type, base IP, relay server, etc.). It is only used for candidate uniqueness and pairing. There is no other usage for it as the underlying algorithm is unknown to other parties(thus no meaningful information can be gleaned from it other than it indicating the uniqueness of the candidate and what other candidates it is paired with).
So, yes, it is "random numbers" but to guaruntee uniqueness and allow candidate pairing, using a logical method in conjunction with the candidates individual features(transport, etc.) is a better way. Simply different components, like rtp and rtcp, could have the same foundation id so that they are paired together.
Take a look here for an example where two different components(rtp and rtcp) have the same foundation ID for their logical pairing.

- 7,378
- 3
- 31
- 41