diff options
author | Youness Alaoui <youness.alaoui@collabora.co.uk> | 2009-02-16 17:34:24 -0500 |
---|---|---|
committer | Youness Alaoui <youness.alaoui@collabora.co.uk> | 2009-02-16 17:34:24 -0500 |
commit | 4e7c80a721ee3a448103f690500408392e6f333a (patch) | |
tree | 2ecadfdf6025def5d390ab1051c43db56b5c2338 | |
parent | acf4804a4e251be8cb3bc2ffce03621d446283be (diff) | |
download | libnice-4e7c80a721ee3a448103f690500408392e6f333a.tar.gz |
Clean the files from unwanted gtk-doc tags
-rw-r--r-- | agent/agent-priv.h | 58 | ||||
-rw-r--r-- | agent/agent.c | 4 | ||||
-rw-r--r-- | agent/candidate.c | 8 | ||||
-rw-r--r-- | agent/component.c | 10 | ||||
-rw-r--r-- | agent/conncheck.c | 80 | ||||
-rw-r--r-- | agent/discovery.c | 32 | ||||
-rw-r--r-- | agent/stream.c | 8 | ||||
-rw-r--r-- | agent/stream.h | 6 | ||||
-rw-r--r-- | random/random.c | 12 | ||||
-rw-r--r-- | stun/stun5389.h | 2 | ||||
-rw-r--r-- | stun/stunhmac.h | 6 | ||||
-rw-r--r-- | stun/stunmessage.c | 44 | ||||
-rw-r--r-- | stun/stunmessage.h | 5 |
13 files changed, 116 insertions, 159 deletions
diff --git a/agent/agent-priv.h b/agent/agent-priv.h index 231eda1..ff31c80 100644 --- a/agent/agent-priv.h +++ b/agent/agent-priv.h @@ -62,41 +62,41 @@ #define NICE_AGENT_MAX_CONNECTIVITY_CHECKS_DEFAULT 100 /* see spec 5.7.3 (ID-19) */ -/** An upper limit to size of STUN packets handled (based on Ethernet +/* An upper limit to size of STUN packets handled (based on Ethernet * MTU and estimated typical sizes of ICE STUN packet */ #define MAX_STUN_DATAGRAM_PAYLOAD 1300 struct _NiceAgent { - GObject parent; /**< gobject pointer */ - - gboolean full_mode; /**< property: full-mode */ - GTimeVal next_check_tv; /**< property: next conncheck timestamp */ - gchar *stun_server_ip; /**< property: STUN server IP */ - guint stun_server_port; /**< property: STUN server port */ - gchar *proxy_ip; /**< property: Proxy server IP */ - guint proxy_port; /**< property: Proxy server port */ - NiceProxyType proxy_type; /**< property: Proxy type */ - gchar *proxy_username; /**< property: Proxy username */ - gchar *proxy_password; /**< property: Proxy password */ - gboolean controlling_mode; /**< property: controlling-mode */ - guint timer_ta; /**< property: timer Ta */ - guint max_conn_checks; /**< property: max connectivity checks */ - - GSList *local_addresses; /**< list of NiceAddresses for local + GObject parent; /* gobject pointer */ + + gboolean full_mode; /* property: full-mode */ + GTimeVal next_check_tv; /* property: next conncheck timestamp */ + gchar *stun_server_ip; /* property: STUN server IP */ + guint stun_server_port; /* property: STUN server port */ + gchar *proxy_ip; /* property: Proxy server IP */ + guint proxy_port; /* property: Proxy server port */ + NiceProxyType proxy_type; /* property: Proxy type */ + gchar *proxy_username; /* property: Proxy username */ + gchar *proxy_password; /* property: Proxy password */ + gboolean controlling_mode; /* property: controlling-mode */ + guint timer_ta; /* property: timer Ta */ + guint max_conn_checks; /* property: max connectivity checks */ + + GSList *local_addresses; /* list of NiceAddresses for local interfaces */ - GSList *streams; /**< list of Stream objects */ - GMainContext *main_context; /**< main context pointer */ - guint next_candidate_id; /**< id of next created candidate */ - guint next_stream_id; /**< id of next created candidate */ - NiceRNG *rng; /**< random number generator */ - GSList *discovery_list; /**< list of CandidateDiscovery items */ - guint discovery_unsched_items; /**< number of discovery items unscheduled */ - GSource *discovery_timer_source; /**< source of discovery timer */ - GSource *conncheck_timer_source; /**< source of conncheck timer */ - GSource *keepalive_timer_source; /**< source of keepalive timer */ - GSList *refresh_list; /**< list of CandidateRefresh items */ - guint64 tie_breaker; /**< tie breaker (ICE sect 5.2 + GSList *streams; /* list of Stream objects */ + GMainContext *main_context; /* main context pointer */ + guint next_candidate_id; /* id of next created candidate */ + guint next_stream_id; /* id of next created candidate */ + NiceRNG *rng; /* random number generator */ + GSList *discovery_list; /* list of CandidateDiscovery items */ + guint discovery_unsched_items; /* number of discovery items unscheduled */ + GSource *discovery_timer_source; /* source of discovery timer */ + GSource *conncheck_timer_source; /* source of conncheck timer */ + GSource *keepalive_timer_source; /* source of keepalive timer */ + GSList *refresh_list; /* list of CandidateRefresh items */ + guint64 tie_breaker; /* tie breaker (ICE sect 5.2 "Determining Role" ID-19) */ GStaticRecMutex mutex; /* Mutex used for thread-safe lib */ NiceCompatibility compatibility; /* property: Compatibility mode */ diff --git a/agent/agent.c b/agent/agent.c index dcf88ac..50c7849 100644 --- a/agent/agent.c +++ b/agent/agent.c @@ -1820,7 +1820,7 @@ agent_attach_stream_component_socket (NiceAgent *agent, } -/** +/* * Attaches socket handles of 'stream' to the main eventloop * context. * @@ -1838,7 +1838,7 @@ priv_attach_stream_component (NiceAgent *agent, return TRUE; } -/** +/* * Detaches socket handles of 'stream' from the main eventloop * context. * diff --git a/agent/candidate.c b/agent/candidate.c index 3d8553d..4d19615 100644 --- a/agent/candidate.c +++ b/agent/candidate.c @@ -36,7 +36,7 @@ * file under either the MPL or the LGPL. */ -/** +/* * @file candidate.c * @brief ICE candidate functions */ @@ -114,7 +114,7 @@ nice_candidate_msn_priority (NiceCandidate *candidate) } -/** +/* * ICE 4.1.2.1. "Recommended Formula" (ID-19): * returns number between 1 and 0x7effffff */ @@ -155,7 +155,7 @@ nice_candidate_ice_priority (const NiceCandidate *candidate) return nice_candidate_ice_priority_full (type_preference, 1, candidate->component_id); } -/** +/* * Calculates the pair priority as specified in ICE * sect 5.7.2. "Computing Pair Priority and Ordering Pairs" (ID-19). */ @@ -168,7 +168,7 @@ nice_candidate_pair_priority (guint32 o_prio, guint32 a_prio) return ((guint64)1 << 32) * min + 2 * max + (o_prio > a_prio ? 1 : 0); } -/** +/* * Copies a candidate */ NICEAPI_EXPORT NiceCandidate * diff --git a/agent/component.c b/agent/component.c index d682bae..74233c5 100644 --- a/agent/component.c +++ b/agent/component.c @@ -36,7 +36,7 @@ * file under either the MPL or the LGPL. */ -/** +/* * @file component.c * @brief ICE component functions */ @@ -120,7 +120,7 @@ component_free (Component *cmp) g_slice_free (Component, cmp); } -/** +/* * Finds a candidate pair that has matching foundation ids. * * @return TRUE if pair found, pointer to pair stored at 'pair' @@ -157,7 +157,7 @@ component_find_pair (Component *cmp, NiceAgent *agent, const gchar *lfoundation, return FALSE; } -/** +/* * Resets the component state to that of a ICE restarted * session. */ @@ -193,7 +193,7 @@ component_restart (Component *cmp) return TRUE; } -/** +/* * Changes the selected pair for the component to 'pair'. Does not * emit the "selected-pair-changed" signal. */ @@ -208,7 +208,7 @@ void component_update_selected_pair (Component *component, const CandidatePair * component->selected_pair.priority = pair->priority; } -/** +/* * Finds a remote candidate with matching address and * transport. * diff --git a/agent/conncheck.c b/agent/conncheck.c index 568f49f..d763f2f 100644 --- a/agent/conncheck.c +++ b/agent/conncheck.c @@ -36,7 +36,7 @@ * file under either the MPL or the LGPL. */ -/** +/* * @file conncheck.c * @brief ICE connectivity checks */ @@ -73,7 +73,7 @@ static int priv_timer_expired (GTimeVal *timer, GTimeVal *now) now->tv_sec >= timer->tv_sec; } -/** +/* * Finds the next connectivity check in WAITING state. */ static CandidateCheckPair *priv_conn_check_find_next_waiting (GSList *conn_check_list) @@ -92,7 +92,7 @@ static CandidateCheckPair *priv_conn_check_find_next_waiting (GSList *conn_check return NULL; } -/** +/* * Initiates a new connectivity check for a ICE candidate pair. * * @return TRUE on success, FALSE on error @@ -111,7 +111,7 @@ static gboolean priv_conn_check_initiate (NiceAgent *agent, CandidateCheckPair * return TRUE; } -/** +/* * Unfreezes the next connectivity check in the list. Follows the * algorithm (2.) defined in 5.7.4 (Computing States) of the ICE spec * (ID-19), with some exceptions (see comments in code). @@ -166,7 +166,7 @@ static gboolean priv_conn_check_unfreeze_next (NiceAgent *agent) return FALSE; } -/** +/* * Unfreezes the next next connectivity check in the list after * check 'success_check' has succesfully completed. * @@ -233,7 +233,7 @@ static void priv_conn_check_unfreeze_related (NiceAgent *agent, Stream *stream, priv_conn_check_unfreeze_next (agent); } -/** +/* * Helper function for connectivity check timer callback that * runs through the stream specific part of the state machine. * @@ -361,7 +361,7 @@ static gboolean priv_conn_check_tick_stream (Stream *stream, NiceAgent *agent, G } -/** +/* * Timer callback that handles initiating and managing connectivity * checks (paced by the Ta timer). * @@ -445,7 +445,7 @@ static gboolean priv_conn_check_tick (gpointer pointer) return ret; } -/** +/* * Timer callback that handles initiating and managing connectivity * checks (paced by the Ta timer). * @@ -612,7 +612,7 @@ static void priv_turn_allocate_refresh_tick_unlocked (CandidateRefresh *cand) } -/** +/* * Timer callback that handles refreshing TURN allocations * * This function is designed for the g_timeout_add() interface. @@ -631,7 +631,7 @@ static gboolean priv_turn_allocate_refresh_tick (gpointer pointer) } -/** +/* * Initiates the next pending connectivity check. * * @return TRUE if a pending check was scheduled @@ -665,7 +665,7 @@ gboolean conn_check_schedule_next (NiceAgent *agent) return res; } -/** +/* * Compares two connectivity check items. Checkpairs are sorted * in descending priority order, with highest priority item at * the start of the list. @@ -679,7 +679,7 @@ gint conn_check_compare (const CandidateCheckPair *a, const CandidateCheckPair * return 0; } -/** +/* * Preprocesses a new connectivity check by going through list * of a any stored early incoming connectivity checks from * the remote peer. If a matching incoming check has been already @@ -705,7 +705,7 @@ static void priv_preprocess_conn_check_pending_data (NiceAgent *agent, Stream *s } } -/** +/* * Handle any processing steps for connectivity checks after * remote candidates have been set. This function handles * the special case where answerer has sent us connectivity @@ -758,7 +758,7 @@ void conn_check_remote_candidates_set(NiceAgent *agent) } } -/** +/* * Enforces the upper limit for connectivity checks as described * in ICE spec section 5.7.3 (ID-19). See also * conn_check_add_for_candidate(). @@ -798,7 +798,7 @@ static GSList *priv_limit_conn_check_list_size (GSList *conncheck_list, guint up return result; } -/** +/* * Changes the selected pair for the component if 'pair' is nominated * and has higher priority than the currently selected pair. See * ICE sect 11.1.1. "Procedures for Full Implementations" (ID-19). @@ -821,7 +821,7 @@ static gboolean priv_update_selected_pair (NiceAgent *agent, Component *componen return TRUE; } -/** +/* * Updates the check list state. * * Implements parts of the algorithm described in @@ -865,7 +865,7 @@ static void priv_update_check_list_failed_components (NiceAgent *agent, Stream * } } -/** +/* * Updates the check list state for a stream component. * * Implements the algorithm described in ICE sect 8.1.2 @@ -905,7 +905,7 @@ static void priv_update_check_list_state_for_ready (NiceAgent *agent, Stream *st nice_debug ("Agent %p : conn.check list status: %u nominated, %u succeeded, c-id %u.", agent, nominated, succeeded, component->id); } -/** +/* * The remote party has signalled that the candidate pair * described by 'component' and 'remotecand' is nominated * for use. @@ -933,7 +933,7 @@ static void priv_mark_pair_nominated (NiceAgent *agent, Stream *stream, Componen } } -/** +/* * Creates a new connectivity check pair and adds it to * the agent's list of checks. */ @@ -991,7 +991,7 @@ static gboolean priv_add_new_check_pair (NiceAgent *agent, guint stream_id, Comp return result; } -/** +/* * Forms new candidate pairs by matching the new remote candidate * 'remote_cand' with all existing local candidates of 'component'. * Implements the logic described in ICE sect 5.7.1. "Forming Candidate @@ -1050,7 +1050,7 @@ int conn_check_add_for_candidate (NiceAgent *agent, guint stream_id, Component * return added; } -/** +/* * Frees the CandidateCheckPair structure pointer to * by 'user data'. Compatible with g_slist_foreach(). */ @@ -1063,7 +1063,7 @@ void conn_check_free_item (gpointer data, gpointer user_data) g_slice_free (CandidateCheckPair, pair); } -/** +/* * Frees all resources of all connectivity checks. */ void conn_check_free (NiceAgent *agent) @@ -1088,7 +1088,7 @@ void conn_check_free (NiceAgent *agent) } } -/** +/* * Prunes the list of connectivity checks for items related * to stream 'stream_id'. * @@ -1125,7 +1125,7 @@ gboolean conn_check_prune_stream (NiceAgent *agent, Stream *stream) return TRUE; } -/** +/* * Fills 'dest' with a username string for use in an outbound connectivity * checks. No more than 'dest_len' characters (including terminating * NULL) is ever written to the 'dest'. @@ -1217,7 +1217,7 @@ size_t priv_gen_username (NiceAgent *agent, guint component_id, return len; } -/** +/* * Fills 'dest' with a username string for use in an outbound connectivity * checks. No more than 'dest_len' characters (including terminating * NULL) is ever written to the 'dest'. @@ -1261,7 +1261,7 @@ size_t priv_create_username (NiceAgent *agent, Stream *stream, return 0; } -/** +/* * Returns a password string for use in an outbound connectivity * check. */ @@ -1285,7 +1285,7 @@ size_t priv_get_password (NiceAgent *agent, Stream *stream, return 0; } -/** +/* * Sends a connectivity check over candidate pair 'pair'. * * @return zero on success, non-zero on error @@ -1377,7 +1377,7 @@ int conn_check_send (NiceAgent *agent, CandidateCheckPair *pair) return 0; } -/** +/* * Implemented the pruning steps described in ICE sect 8.1.2 * "Updating States" (ID-19) after a pair has been nominated. * @@ -1408,7 +1408,7 @@ static void priv_prune_pending_checks (Stream *stream, guint component_id) } } -/** +/* * Schedules a triggered check after a succesfully inbound * connectivity check. Implements ICE sect 7.2.1.4 "Triggered Checks" (ID-19). * @@ -1482,7 +1482,7 @@ static gboolean priv_schedule_triggered_check (NiceAgent *agent, Stream *stream, } -/** +/* * Sends a reply to an succesfully received STUN connectivity * check request. Implements parts of the ICE spec section 7.2 (STUN * Server Procedures). @@ -1527,7 +1527,7 @@ static void priv_reply_to_conn_check (NiceAgent *agent, Stream *stream, Componen } } -/** +/* * Stores information of an incoming STUN connectivity check * for later use. This is only needed when a check is received * before we get information about the remote candidates (via @@ -1563,7 +1563,7 @@ static int priv_store_pending_check (NiceAgent *agent, Component *component, con return -1; } -/** +/* * Adds a new pair, discovered from an incoming STUN response, to * the connectivity check list. * @@ -1599,7 +1599,7 @@ static CandidateCheckPair *priv_add_peer_reflexive_pair (NiceAgent *agent, guint return NULL; } -/** +/* * Recalculates priorities of all candidate pairs. This * is required after a conflict in ICE roles. */ @@ -1616,7 +1616,7 @@ static void priv_recalculate_pair_priorities (NiceAgent *agent) } } -/** +/* * Change the agent role if different from 'control'. Can be * initiated both by handling of incoming connectivity checks, * and by processing the responses to checks sent by us. @@ -1635,7 +1635,7 @@ static void priv_check_for_role_conflict (NiceAgent *agent, gboolean control) nice_debug ("Agent %p : Role conflict, agent role already changed to %d.", agent, control); } -/** +/* * Checks whether the mapped address in connectivity check response * matches any of the known local candidates. If not, apply the * mechanism for "Discovering Peer Reflexive Candidates" ICE ID-19) @@ -1694,7 +1694,7 @@ static CandidateCheckPair *priv_process_response_check_for_peer_reflexive(NiceAg return new_pair; } -/** +/* * Tries to match STUN reply in 'buf' to an existing STUN connectivity * check transaction. If found, the reply is processed. Implements * section 7.1.2 "Processing the Response" of ICE spec (ID-19). @@ -1813,7 +1813,7 @@ static gboolean priv_map_reply_to_conn_check_request (NiceAgent *agent, Stream * return trans_found; } -/** +/* * Tries to match STUN reply in 'buf' to an existing STUN discovery * transaction. If found, a reply is sent. * @@ -1921,7 +1921,7 @@ priv_add_new_turn_refresh (CandidateDiscovery *cdisco, NiceCandidate *relay_cand return cand; } -/** +/* * Tries to match STUN reply in 'buf' to an existing STUN discovery * transaction. If found, a reply is sent. * @@ -2050,7 +2050,7 @@ static gboolean priv_map_reply_to_relay_request (NiceAgent *agent, StunMessage * } -/** +/* * Tries to match STUN reply in 'buf' to an existing STUN discovery * transaction. If found, a reply is sent. * @@ -2204,7 +2204,7 @@ static bool conncheck_stun_validater (StunAgent *agent, } -/** +/* * Processing an incoming STUN message. * * @param agent self pointer diff --git a/agent/discovery.c b/agent/discovery.c index e15d875..6fdfa69 100644 --- a/agent/discovery.c +++ b/agent/discovery.c @@ -33,7 +33,7 @@ * file under either the MPL or the LGPL. */ -/** +/* * @file discovery.c * @brief ICE candidate discovery functions */ @@ -66,7 +66,7 @@ static inline int priv_timer_expired (GTimeVal *timer, GTimeVal *now) now->tv_sec >= timer->tv_sec; } -/** +/* * Frees the CandidateDiscovery structure pointed to * by 'user data'. Compatible with g_slist_foreach(). */ @@ -79,7 +79,7 @@ void discovery_free_item (gpointer data, gpointer user_data) g_slice_free (CandidateDiscovery, cand); } -/** +/* * Frees all discovery related resources for the agent. */ void discovery_free (NiceAgent *agent) @@ -100,7 +100,7 @@ void discovery_free (NiceAgent *agent) } } -/** +/* * Prunes the list of discovery processes for items related * to stream 'stream_id'. * @@ -128,7 +128,7 @@ void discovery_prune_stream (NiceAgent *agent, guint stream_id) } -/** +/* * Frees the CandidateDiscovery structure pointed to * by 'user data'. Compatible with g_slist_foreach(). */ @@ -189,7 +189,7 @@ void refresh_free_item (gpointer data, gpointer user_data) g_slice_free (CandidateRefresh, cand); } -/** +/* * Frees all discovery related resources for the agent. */ void refresh_free (NiceAgent *agent) @@ -204,7 +204,7 @@ void refresh_free (NiceAgent *agent) } } -/** +/* * Prunes the list of discovery processes for items related * to stream 'stream_id'. * @@ -235,7 +235,7 @@ void refresh_cancel (CandidateRefresh *refresh) refresh_free_item (refresh, NULL); } -/** +/* * Adds a new local candidate. Implements the candidate pruning * defined in ICE spec section 4.1.3 "Eliminating Redundant * Candidates" (ID-19). @@ -263,7 +263,7 @@ static gboolean priv_add_local_candidate_pruned (Component *component, NiceCandi return TRUE; } -/** +/* * Assings a foundation to the candidate. * * Implements the mechanism described in ICE sect @@ -350,7 +350,7 @@ void priv_generate_candidate_credentials (NiceAgent *agent, } -/** +/* * Creates a local host candidate for 'component_id' of stream * 'stream_id'. * @@ -433,7 +433,7 @@ NiceCandidate *discovery_add_local_host_candidate ( return candidate; } -/** +/* * Creates a server reflexive candidate for 'component_id' of stream * 'stream_id'. * @@ -490,7 +490,7 @@ discovery_add_server_reflexive_candidate ( } -/** +/* * Creates a server reflexive candidate for 'component_id' of stream * 'stream_id'. * @@ -580,7 +580,7 @@ discovery_add_relay_candidate ( return candidate; } -/** +/* * Creates a peer reflexive candidate for 'component_id' of stream * 'stream_id'. * @@ -689,7 +689,7 @@ static guint priv_highest_remote_foundation (Component *component) return highest; } -/** +/* * Adds a new peer reflexive candidate to the list of known * remote candidates. The candidate is however not paired with * existing local candidates. @@ -778,7 +778,7 @@ NiceCandidate *discovery_learn_remote_peer_reflexive_candidate ( return candidate; } -/** +/* * Timer callback that handles scheduling new candidate discovery * processes (paced by the Ta timer), and handles running of the * existing discovery processes. @@ -963,7 +963,7 @@ static gboolean priv_discovery_tick (gpointer pointer) return ret; } -/** +/* * Initiates the candidate discovery process by starting * the necessary timers. * diff --git a/agent/stream.c b/agent/stream.c index e6dd82c..62218b4 100644 --- a/agent/stream.c +++ b/agent/stream.c @@ -42,7 +42,7 @@ #include "stream.h" -/** +/* * @file stream.c * @brief ICE stream functionality */ @@ -108,7 +108,7 @@ stream_find_component_by_id (const Stream *stream, guint id) return NULL; } -/** +/* * Returns true if all components of the stream are either * 'CONNECTED' or 'READY' (connected plus nominated). */ @@ -129,7 +129,7 @@ stream_all_components_ready (const Stream *stream) } -/** +/* * Initialized the local crendentials for the stream. */ void stream_initialize_credentials (Stream *stream, NiceRNG *rng) @@ -140,7 +140,7 @@ void stream_initialize_credentials (Stream *stream, NiceRNG *rng) nice_rng_generate_bytes_print (rng, NICE_STREAM_DEF_PWD - 1, stream->local_password); } -/** +/* * Resets the stream state to that of a ICE restarted * session. */ diff --git a/agent/stream.h b/agent/stream.h index a7fde4d..cc39595 100644 --- a/agent/stream.h +++ b/agent/stream.h @@ -55,7 +55,7 @@ G_BEGIN_DECLS #define NICE_STREAM_DEF_UFRAG 4 + 1 /* ufrag + NULL */ #define NICE_STREAM_DEF_PWD 22 + 1 /* pwd + NULL */ -/** +/* * Checklist states. These match the definition given in * the ICE spec sect 5.7.4. "Computing States" (ID-19). */ @@ -76,8 +76,8 @@ struct _Stream guint n_components; gboolean initial_binding_request_received; GSList *components; /* list of 'Component' structs */ - GSList *conncheck_list; /**< list of CandidatePair items */ - NiceCheckListState conncheck_state; /**< checklist state */ + GSList *conncheck_list; /* list of CandidatePair items */ + NiceCheckListState conncheck_state; /* checklist state */ gchar local_ufrag[NICE_STREAM_MAX_UFRAG]; gchar local_password[NICE_STREAM_MAX_PWD]; gchar remote_ufrag[NICE_STREAM_MAX_UFRAG]; diff --git a/random/random.c b/random/random.c index 6c9d29c..9458350 100644 --- a/random/random.c +++ b/random/random.c @@ -46,7 +46,7 @@ static NiceRNG * (*nice_rng_new_func) (void) = NULL; -/** +/* * Creates a new random number generator instance. */ NiceRNG * @@ -58,7 +58,7 @@ nice_rng_new (void) return nice_rng_new_func (); } -/** +/* * Sets a new generator function. */ void @@ -67,7 +67,7 @@ nice_rng_set_new_func (NiceRNG * (*func) (void)) nice_rng_new_func = func; } -/** +/* * Frees the random number generator instance. * * @param rng context @@ -78,7 +78,7 @@ nice_rng_free (NiceRNG *rng) rng->free (rng); } -/** +/* * Generates random octets. * * @param rng context @@ -91,7 +91,7 @@ nice_rng_generate_bytes (NiceRNG *rng, guint len, gchar *buf) rng->generate_bytes (rng, len, buf); } -/** +/* * Generates a random unsigned integer. * * @param rng context @@ -104,7 +104,7 @@ nice_rng_generate_int (NiceRNG *rng, guint low, guint high) return rng->generate_int (rng, low, high); } -/** +/* * Generates a stream of octets containing only characters * with ASCII codecs of 0x41-5A (A-Z), 0x61-7A (a-z), * 0x30-39 (0-9), 0x2b (+) and 0x2f (/). This matches diff --git a/stun/stun5389.h b/stun/stun5389.h index b1a40ba..adba019 100644 --- a/stun/stun5389.h +++ b/stun/stun5389.h @@ -49,7 +49,7 @@ # include <sys/types.h> -/** +/* * Computes the FINGERPRINT checksum of a STUN message. * @param msg pointer to the STUN message * @param len size of the message from header (inclusive) and up to diff --git a/stun/stunhmac.h b/stun/stunhmac.h index dee3207..32abc74 100644 --- a/stun/stunhmac.h +++ b/stun/stunhmac.h @@ -37,7 +37,7 @@ #include "stunmessage.h" -/** +/* * Computes the MESSAGE-INTEGRITY hash of a STUN message. * @param msg pointer to the STUN message * @param len size of the message from header (inclusive) and up to @@ -51,7 +51,7 @@ void stun_sha1 (const uint8_t *msg, size_t len, size_t msg_len, uint8_t *sha, const void *key, size_t keylen, int padding); -/** +/* * SIP H(A1) computation */ @@ -59,7 +59,7 @@ void stun_hash_creds (const uint8_t *realm, size_t realm_len, const uint8_t *username, size_t username_len, const uint8_t *password, size_t password_len, unsigned char md5[16]); -/** +/* * Generates a pseudo-random secure STUN transaction ID. */ void stun_make_transid (StunTransactionId id); diff --git a/stun/stunmessage.c b/stun/stunmessage.c index 177d25c..505047a 100644 --- a/stun/stunmessage.c +++ b/stun/stunmessage.c @@ -306,17 +306,6 @@ stun_message_find_error (const StunMessage *msg, int *code) return STUN_MESSAGE_RETURN_SUCCESS; } -/** - * Reserves room for appending an attribute to an unfinished STUN message. - * @param msg STUN message buffer - * @param msize STUN message buffer size - * @param type message type (host byte order) - * @param length attribute payload byte length - * @return a pointer to an unitialized buffer of <length> bytes to - * where the attribute payload must be written, or NULL if there is not - * enough room in the STUN message buffer. Return value is always on a - * 32-bits boundary. - */ void * stun_message_append (StunMessage *msg, StunAttribute type, size_t length) { @@ -343,15 +332,6 @@ stun_message_append (StunMessage *msg, StunAttribute type, size_t length) } -/** - * Appends an attribute from memory. - * @param msg STUN message buffer - * @param msize STUN message buffer size - * @param type attribute type (host byte order) - * @param data memory address to copy payload from - * @param len attribute payload length - * @return 0 on success, ENOBUFS on error. - */ StunMessageReturn stun_message_append_bytes (StunMessage *msg, StunAttribute type, const void *data, size_t len) @@ -496,13 +476,6 @@ stun_message_append_xor_addr_full (StunMessage *msg, StunAttribute type, -/** - * Appends an ERROR-CODE attribute. - * @param msg STUN message buffer - * @param msize STUN message buffer size - * @param code STUN host-byte order integer error code - * @return 0 on success, or ENOBUFS otherwise - */ StunMessageReturn stun_message_append_error (StunMessage *msg, StunError code) { @@ -586,17 +559,11 @@ int stun_message_validate_buffer_length (const uint8_t *msg, size_t length) return mlen; } -/** - * copies STUN message transaction ID - */ void stun_message_id (const StunMessage *msg, StunTransactionId id) { memcpy (id, msg->buffer + STUN_MESSAGE_TRANS_ID_POS, STUN_MESSAGE_TRANS_ID_LEN); } -/** - * @return STUN message method (value from 0 to 0xfff) - */ StunMethod stun_message_get_method (const StunMessage *msg) { uint16_t t = stun_getw (msg->buffer); @@ -615,9 +582,6 @@ StunMethod stun_message_get_method (const StunMessage *msg) } -/** - * @return STUN message class in host byte order (value from 0 to 3) - */ StunClass stun_message_get_class (const StunMessage *msg) { uint16_t t = stun_getw (msg->buffer); @@ -634,14 +598,6 @@ StunClass stun_message_get_class (const StunMessage *msg) return (StunClass)(((t & 0x0100) >> 7) | ((t & 0x0010) >> 4)); } -/** - * Checks if an attribute is present within a STUN message. - * - * @param msg valid STUN message - * @param type STUN attribute type (host byte order) - * - * @return whether there is a MESSAGE-INTEGRITY attribute - */ bool stun_message_has_attribute (const StunMessage *msg, StunAttribute type) { uint16_t dummy; diff --git a/stun/stunmessage.h b/stun/stunmessage.h index 0c4c9b6..17f8bcb 100644 --- a/stun/stunmessage.h +++ b/stun/stunmessage.h @@ -122,7 +122,6 @@ typedef enum /** * StunAttribute: - * * @STUN_ATTRIBUTE_MAPPED_ADDRESS: The MAPPED-ADDRESS attribute as defined * by RFC5389 * @STUN_ATTRIBUTE_RESPONSE_ADDRESS: The RESPONSE-ADDRESS attribute as defined @@ -195,7 +194,8 @@ typedef enum * @STUN_ATTRIBUTE_SOFTWARE: The SOFTWARE optional attribute as defined by RFC5389 * @STUN_ATTRIBUTE_ALTERNATE_SERVER: The ALTERNATE-SERVER optional attribute as * defined by RFC5389 - * @STUN_ATTRIBUTE_FINGERPRINT: The FINGERPRINT optional attribute as defined by RFC5389 + * @STUN_ATTRIBUTE_FINGERPRINT: The FINGERPRINT optional attribute as defined + * by RFC5389 * @STUN_ATTRIBUTE_ICE_CONTROLLED: The ICE-CONTROLLED optional attribute as * defined by ICE draft 19 * @STUN_ATTRIBUTE_ICE_CONTROLLING: The ICE-CONTROLLING optional attribute as @@ -326,6 +326,7 @@ static const uint16_t STUN_ALL_KNOWN_ATTRIBUTES[] = /** * StunTransactionId: + * * A type that holds a STUN transaction id. */ typedef uint8_t StunTransactionId[STUN_MESSAGE_TRANS_ID_LEN]; |