Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
libnice
libnice
Commits
c48c0ab5
Commit
c48c0ab5
authored
Nov 16, 2007
by
Kai Vehmanen
Browse files
Updated references to ICE ID-19.
darcs-hash:20071116154328-77cd4-c2438891dd541b57b8b892eb86cc5573dcfc8708.gz
parent
1e12bf89
Changes
10
Hide whitespace changes
Inline
Side-by-side
agent/agent-priv.h
View file @
c48c0ab5
...
...
@@ -54,8 +54,8 @@
#define NICE_AGENT_TIMER_TA_DEFAULT 20
/* timer Ta, msecs (impl. defined) */
#define NICE_AGENT_TIMER_TR_DEFAULT 25000
/* timer Tr, msecs (impl. defined) */
#define NICE_AGENT_TIMER_TR_MIN 15000
/* timer Tr, msecs (ICE ID-1
8
) */
#define NICE_AGENT_MAX_CONNECTIVITY_CHECKS_DEFAULT 100
/* see spec 5.7.3 (ID-1
8
) */
#define NICE_AGENT_TIMER_TR_MIN 15000
/* timer Tr, msecs (ICE ID-1
9
) */
#define NICE_AGENT_MAX_CONNECTIVITY_CHECKS_DEFAULT 100
/* see spec 5.7.3 (ID-1
9
) */
/** An upper limit to size of STUN packets handled (based on Ethernet
...
...
@@ -93,7 +93,7 @@ struct _NiceAgent
guint
conncheck_timer_id
;
/**< id of discovery timer */
guint
keepalive_timer_id
;
/**< id of keepalive timer */
guint64
tie_breaker
;
/**< tie breaker (ICE sect 5.2
"Determining Role" ID-1
7
) */
"Determining Role" ID-1
9
) */
/* XXX: add pointer to internal data struct for ABI-safe extensions */
};
...
...
agent/agent.c
View file @
c48c0ab5
...
...
@@ -238,7 +238,7 @@ nice_agent_class_init (NiceAgentClass *klass)
NICE_AGENT_TIMER_TA_DEFAULT
,
G_PARAM_READWRITE
|
G_PARAM_CONSTRUCT_ONLY
));
/* note: according to spec recommendation in sect 5.7.3 (ID-1
8
) */
/* note: according to spec recommendation in sect 5.7.3 (ID-1
9
) */
g_object_class_install_property
(
gobject_class
,
PROP_MAX_CONNECTIVITY_CHECKS
,
g_param_spec_uint
(
"max-connectivity-checks"
,
...
...
@@ -1391,7 +1391,7 @@ nice_agent_get_remote_candidates (
* nice_agent_restart
* @agent: A NiceAgent
*
* Restarts the session as defined in ICE spec (ID-1
8
). This function
* Restarts the session as defined in ICE spec (ID-1
9
). This function
* needs to be called both when initiating (ICE spec section 9.1.1.1.
* "ICE Restarts"), as well as when reacting (spec section 9.2.1.1.
* "Detecting ICE Restart") to a restart.
...
...
agent/agent.h
View file @
c48c0ab5
...
...
@@ -99,13 +99,13 @@ typedef enum
typedef
struct
_NiceCandidateDesc
NiceCandidateDesc
;
struct
_NiceCandidateDesc
{
gchar
*
foundation
;
guint
component_id
;
gchar
*
foundation
;
/**< 1*32ice-char (NICE_CANDIDATE_MAX_FOUNDATION-1) */
guint
component_id
;
/**< value between 1 and 256, inclusive */
NiceCandidateTransport
transport
;
guint32
priority
;
guint32
priority
;
/**< value between 1 and (2**31 - 1), inclusive */
NiceAddress
*
addr
;
NiceCandidateType
type
;
NiceAddress
*
related_addr
;
/* optional */
NiceAddress
*
related_addr
;
/*
*<
optional */
};
typedef
struct
_NiceAgent
NiceAgent
;
...
...
agent/candidate.c
View file @
c48c0ab5
...
...
@@ -51,7 +51,7 @@
/* (ICE 4.1.1 "Gathering Candidates") ""Every candidate is a transport
* address. It also has a type and a base. Three types are defined and
* gathered by this specification - host candidates, server reflexive
* candidates, and relayed candidates."" (ID-1
7
) */
* candidates, and relayed candidates."" (ID-1
9
) */
NICEAPI_EXPORT
NiceCandidate
*
nice_candidate_new
(
NiceCandidateType
type
)
...
...
@@ -96,7 +96,7 @@ nice_candidate_jingle_priority (NiceCandidate *candidate)
/**
* ICE 4.1.2.1. "Recommended Formula" (ID-1
8
):
* ICE 4.1.2.1. "Recommended Formula" (ID-1
9
):
* returns number between 1 and 0x7effffff
*/
G_GNUC_CONST
...
...
@@ -106,7 +106,7 @@ nice_candidate_ice_priority_full (
guint
type_preference
,
// must be ∈ (0, 65535) (max 2^16 - 1)
guint
local_preference
,
// must be ∈ (
1
, 255) (max 2 ^ 8 - 1)
// must be ∈ (
0
, 255) (max 2 ^ 8 - 1)
guint
component_id
)
{
return
(
...
...
@@ -140,7 +140,7 @@ nice_candidate_ice_priority (const NiceCandidate *candidate)
/**
* Calculates the pair priority as specified in ICE
* sect 5.7.2. "Computing Pair Priority and Ordering Pairs" (ID-1
8
).
* sect 5.7.2. "Computing Pair Priority and Ordering Pairs" (ID-1
9
).
*/
NICEAPI_EXPORT
guint64
nice_candidate_pair_priority
(
guint32
o_prio
,
guint32
a_prio
)
...
...
agent/candidate.h
View file @
c48c0ab5
...
...
@@ -48,7 +48,7 @@ G_BEGIN_DECLS
#define NICE_CANDIDATE_TYPE_PREF_SERVER_REFLEXIVE 100
#define NICE_CANDIDATE_TYPE_PREF_RELAYED 60
/* Max foundation size '1*32ice-char' ICE ID-1
7
*/
/* Max foundation size '1*32ice-char'
plus terminating NULL,
ICE ID-1
9
*/
#define NICE_CANDIDATE_MAX_FOUNDATION 32+1
typedef
enum
...
...
agent/component.c
View file @
c48c0ab5
...
...
@@ -180,7 +180,7 @@ component_restart (Component *cmp)
/* note: do not remove the remote candidate that is
* currently part of the 'selected pair', see ICE
* 9.1.1.1. "ICE Restarts" (ID-1
8
) */
* 9.1.1.1. "ICE Restarts" (ID-1
9
) */
if
(
candidate
==
cmp
->
selected_pair
.
remote
)
{
if
(
cmp
->
restart_candidate
)
nice_candidate_free
(
cmp
->
restart_candidate
);
...
...
agent/component.h
View file @
c48c0ab5
...
...
@@ -46,7 +46,7 @@
G_BEGIN_DECLS
/* (ICE §4.1.1.1, ID-1
7
) ""For RTP-based media streams, the RTP itself has a component
/* (ICE §4.1.1.1, ID-1
9
) ""For RTP-based media streams, the RTP itself has a component
* ID of 1, and RTCP a component ID of 2. If an agent is using RTCP it MUST
* obtain a candidate for it. If an agent is using both RTP and RTCP, it
* would end up with 2*K host candidates if an agent has K interfaces.""
...
...
@@ -72,7 +72,7 @@ struct _Component
GSList
*
sockets
;
/**< list of NiceUDPSocket objs */
GSList
*
gsources
;
/**< list of GSource objs */
CandidatePair
selected_pair
;
/**< independent from checklists,
see ICE 11.1. "Sending Media" (ID-1
7
) */
see ICE 11.1. "Sending Media" (ID-1
9
) */
gboolean
media_after_tick
;
/**< true if media received since last
keepalive tick */
NiceCandidate
*
restart_candidate
;
/**< for storing active remote candidate during a restart */
...
...
agent/discovery.c
View file @
c48c0ab5
...
...
@@ -136,7 +136,7 @@ gboolean discovery_prune_stream (NiceAgent *agent, guint stream_id)
/**
* Adds a new local candidate. Implements the candidate pruning
* defined in ICE spec section 4.1.3 "Eliminating Redundant
* Candidates" (ID-1
8
).
* Candidates" (ID-1
9
).
*/
static
gboolean
priv_add_local_candidate_pruned
(
Component
*
component
,
NiceCandidate
*
candidate
)
{
...
...
@@ -170,7 +170,7 @@ static gboolean priv_add_local_candidate_pruned (Component *component, NiceCandi
* Assings a foundation to the candidate.
*
* Implements the mechanism described in ICE sect
* 4.1.1.3 "Computing Foundations" (ID-1
8
).
* 4.1.1.3 "Computing Foundations" (ID-1
9
).
*/
static
void
priv_assign_foundation
(
NiceAgent
*
agent
,
NiceCandidate
*
candidate
)
{
...
...
@@ -402,7 +402,7 @@ static guint priv_highest_remote_foundation (Component *component)
* remote candidates. The candidate is however not paired with
* existing local candidates.
*
* See ICE sect 7.2.1.3 "Learning Peer Reflexive Candidates" (ID-1
8
).
* See ICE sect 7.2.1.3 "Learning Peer Reflexive Candidates" (ID-1
9
).
*
* @return pointer to the created candidate, or NULL on error
*/
...
...
agent/stream.c
View file @
c48c0ab5
...
...
@@ -157,7 +157,7 @@ stream_find_component_by_fd (const Stream *stream, guint fd)
void
stream_initialize_credentials
(
Stream
*
stream
,
NiceRNG
*
rng
)
{
/* note: generate ufrag/pwd for the stream (see ICE 15.4.
* '"ice-ufrag" and "ice-pwd" Attributes', ID-1
8
) */
* '"ice-ufrag" and "ice-pwd" Attributes', ID-1
9
) */
nice_rng_generate_bytes_print
(
rng
,
NICE_STREAM_DEF_UFRAG
-
1
,
stream
->
local_ufrag
);
nice_rng_generate_bytes_print
(
rng
,
NICE_STREAM_DEF_PWD
-
1
,
stream
->
local_password
);
}
...
...
agent/stream.h
View file @
c48c0ab5
...
...
@@ -45,7 +45,7 @@
G_BEGIN_DECLS
/* Maximum and default sizes for ICE attributes,
* last updated from ICE ID-1
8
* last updated from ICE ID-1
9
* (the below sizes include the terminating NULL): */
#define NICE_STREAM_MAX_UFRAG 256 + 1
/* ufrag + NULL */
...
...
@@ -56,7 +56,7 @@ G_BEGIN_DECLS
/**
* Checklist states. These match the definition given in
* the ICE spec sect 5.7.4. "Computing States" (ID-1
8
).
* the ICE spec sect 5.7.4. "Computing States" (ID-1
9
).
*/
typedef
enum
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment