#include "../../mem/mem.h"#include "../../mem/shm_mem.h"#include "../../parser/sdp/sdp_cloner.h"#include "../dialog/dlg_hash.h"#include "qos_ctx_helpers.h"

Go to the source code of this file.
Defines | |
| #define | ERROR_MATCH -1 |
| #define | N_183_PRACK 3 |
| #define | N_200OK_ACK 2 |
| #define | N_INVITE_200OK 1 |
| #define | N_UNKNOWN 0 |
| #define | NEGOTIATED_MATCH 3 |
| #define | NO_ACK_REQ_MATCH 4 |
| #define | NO_INVITE_REQ_MATCH 0 |
| #define | NO_INVITE_RESP_MATCH 1 |
| #define | NO_UPDATE_REQ_MATCH 7 |
| #define | NO_UPDATE_RESP_MATCH 8 |
| #define | PENDING_MATCH 2 |
Functions | |
| int | add_pending_sdp_session (qos_ctx_t *qos_ctx, unsigned int dir, str *cseq_number, str *cseq_method, int cseq_method_id, unsigned int role, unsigned int negotiation, sdp_session_cell_t *session, struct sip_msg *_m) |
| void | add_sdp (qos_ctx_t *qos_ctx, unsigned int dir, struct sip_msg *_m, unsigned int role, unsigned int other_role) |
| qos_ctx_t * | build_new_qos_ctx (void) |
| void | destroy_qos (qos_sdp_t *qos_sdp) |
| void | destroy_qos_ctx (qos_ctx_t *qos_ctx) |
| int | find_qos_sdp (qos_ctx_t *qos_ctx, unsigned int dir, unsigned int other_role, str *cseq_number, int cseq_method_id, sdp_session_cell_t *session, struct sip_msg *_m, qos_sdp_t **_qos_sdp) |
| void | link_negotiated_qos_sdp_and_run_cb (qos_ctx_t *qos_ctx, qos_sdp_t *qos_sdp, unsigned int role, struct sip_msg *_m) |
| void | link_pending_qos_sdp (qos_ctx_t *qos_ctx, qos_sdp_t *qos_sdp) |
| void | print_qos_sdp (qos_sdp_t *qos_sdp) |
| void | remove_sdp (qos_ctx_t *qos_ctx, unsigned int dir, struct sip_msg *_m, unsigned int role, unsigned int other_role) |
| void | unlink_negotiated_qos_sdp (qos_ctx_t *qos_ctx, qos_sdp_t *qos_sdp) |
| void | unlink_pending_qos_sdp (qos_ctx_t *qos_ctx, qos_sdp_t *qos_sdp) |
| #define ERROR_MATCH -1 |
| #define N_183_PRACK 3 |
Definition at line 51 of file qos_ctx_helpers.c.
| #define N_200OK_ACK 2 |
| #define N_INVITE_200OK 1 |
Definition at line 46 of file qos_ctx_helpers.c.
Referenced by add_sdp(), find_qos_sdp(), and remove_sdp().
| #define N_UNKNOWN 0 |
Definition at line 44 of file qos_ctx_helpers.c.
| #define NEGOTIATED_MATCH 3 |
| #define NO_ACK_REQ_MATCH 4 |
| #define NO_INVITE_REQ_MATCH 0 |
| #define NO_INVITE_RESP_MATCH 1 |
| #define NO_UPDATE_REQ_MATCH 7 |
| #define NO_UPDATE_RESP_MATCH 8 |
| #define PENDING_MATCH 2 |
| int add_pending_sdp_session | ( | qos_ctx_t * | qos_ctx, | |
| unsigned int | dir, | |||
| str * | cseq_number, | |||
| str * | cseq_method, | |||
| int | cseq_method_id, | |||
| unsigned int | role, | |||
| unsigned int | negotiation, | |||
| sdp_session_cell_t * | session, | |||
| struct sip_msg * | _m | |||
| ) |
Definition at line 338 of file qos_ctx_helpers.c.
References qos_sdp_st::cseq, DLG_DIR_DOWNSTREAM, DLG_DIR_UPSTREAM, sip_msg::first_line, _str::len, len, link_pending_qos_sdp(), LM_DBG, LM_ERR, qos_sdp_st::method, qos_sdp_st::method_dir, qos_sdp_st::method_id, qos_sdp_st::negotiation, NULL, QOSCB_ADD_SDP, run_qos_callbacks(), _str::s, qos_sdp_st::sdp_session, shm_free, shm_malloc(), SIP_REQUEST, and msg_start::type.
Referenced by add_sdp().
| void add_sdp | ( | qos_ctx_t * | qos_ctx, | |
| unsigned int | dir, | |||
| struct sip_msg * | _m, | |||
| unsigned int | role, | |||
| unsigned int | other_role | |||
| ) |
Definition at line 405 of file qos_ctx_helpers.c.
References add_pending_sdp_session(), sip_msg::cseq, ERROR_MATCH, find_qos_sdp(), get_cseq, HDR_CSEQ_F, _str::len, link_negotiated_qos_sdp_and_run_cb(), LM_CRIT, LM_DBG, LM_ERR, N_200OK_ACK, N_INVITE_200OK, NEGOTIATED_MATCH, NO_ACK_REQ_MATCH, NO_INVITE_REQ_MATCH, NO_INVITE_RESP_MATCH, NO_UPDATE_REQ_MATCH, NO_UPDATE_RESP_MATCH, NULL, parse_headers(), hdr_field::parsed, PENDING_MATCH, QOS_CALLER, QOSCB_UPDATE_SDP, run_qos_callbacks(), _str::s, sip_msg::sdp, qos_sdp_st::sdp_session, shm_free, and unlink_pending_qos_sdp().
Referenced by qos_dialog_created_CB(), qos_dialog_request_CB(), and qos_dialog_response_CB().
| qos_ctx_t* build_new_qos_ctx | ( | void | ) |
Definition at line 53 of file qos_ctx_helpers.c.
References LM_ERR, qos_ctx_st::lock, NULL, shm_free, and shm_malloc().
Referenced by qos_dialog_created_CB().
| void destroy_qos | ( | qos_sdp_t * | qos_sdp | ) |
Definition at line 70 of file qos_ctx_helpers.c.
References qos_sdp_st::sdp_session, and shm_free.
Referenced by destroy_qos_ctx(), link_negotiated_qos_sdp_and_run_cb(), and remove_sdp().
| void destroy_qos_ctx | ( | qos_ctx_t * | qos_ctx | ) |
Definition at line 559 of file qos_ctx_helpers.c.
References destroy_qos(), LM_DBG, qos_ctx_st::lock, qos_ctx_st::negotiated_sdp, qos_sdp_st::next, qos_ctx_st::pending_sdp, and shm_free.
Referenced by qos_dialog_destroy_CB().
| int find_qos_sdp | ( | qos_ctx_t * | qos_ctx, | |
| unsigned int | dir, | |||
| unsigned int | other_role, | |||
| str * | cseq_number, | |||
| int | cseq_method_id, | |||
| sdp_session_cell_t * | session, | |||
| struct sip_msg * | _m, | |||
| qos_sdp_t ** | _qos_sdp | |||
| ) |
Definition at line 100 of file qos_ctx_helpers.c.
References qos_sdp_st::cseq, ERROR_MATCH, sip_msg::first_line, _str::len, LM_DBG, LM_ERR, METHOD_ACK, qos_sdp_st::method_dir, qos_sdp_st::method_id, METHOD_INVITE, METHOD_PRACK, METHOD_UPDATE, N_200OK_ACK, N_INVITE_200OK, NEGOTIATED_MATCH, qos_ctx_st::negotiated_sdp, qos_sdp_st::negotiation, qos_sdp_st::next, NO_ACK_REQ_MATCH, NO_INVITE_REQ_MATCH, NO_INVITE_RESP_MATCH, NO_UPDATE_REQ_MATCH, NO_UPDATE_RESP_MATCH, NULL, PENDING_MATCH, qos_ctx_st::pending_sdp, QOS_CALLER, _str::s, qos_sdp_st::sdp_session, SIP_REPLY, SIP_REQUEST, and msg_start::type.
Referenced by add_sdp().
| void link_negotiated_qos_sdp_and_run_cb | ( | qos_ctx_t * | qos_ctx, | |
| qos_sdp_t * | qos_sdp, | |||
| unsigned int | role, | |||
| struct sip_msg * | _m | |||
| ) |
Definition at line 296 of file qos_ctx_helpers.c.
References destroy_qos(), LM_DBG, LM_ERR, qos_ctx_st::negotiated_sdp, qos_sdp_st::negotiation, qos_sdp_st::next, NULL, qos_sdp_st::prev, QOSCB_REMOVE_SDP, QOSCB_UPDATE_SDP, run_qos_callbacks(), and unlink_negotiated_qos_sdp().
Referenced by add_sdp().
Definition at line 253 of file qos_ctx_helpers.c.
References LM_DBG, LM_ERR, qos_sdp_st::next, NULL, qos_ctx_st::pending_sdp, and qos_sdp_st::prev.
Referenced by add_pending_sdp_session().
| void print_qos_sdp | ( | qos_sdp_t * | qos_sdp | ) |
Definition at line 80 of file qos_ctx_helpers.c.
References qos_sdp_st::cseq, _str::len, LM_DBG, qos_sdp_st::method, qos_sdp_st::method_dir, qos_sdp_st::method_id, qos_sdp_st::negotiation, qos_sdp_st::next, NULL, qos_sdp_st::prev, _str::s, and qos_sdp_st::sdp_session.
| void remove_sdp | ( | qos_ctx_t * | qos_ctx, | |
| unsigned int | dir, | |||
| struct sip_msg * | _m, | |||
| unsigned int | role, | |||
| unsigned int | other_role | |||
| ) |
Definition at line 505 of file qos_ctx_helpers.c.
References qos_sdp_st::cseq, sip_msg::cseq, destroy_qos(), sip_msg::first_line, get_cseq, HDR_CSEQ_F, _str::len, LM_DBG, LM_ERR, qos_sdp_st::method_dir, qos_sdp_st::method_id, METHOD_INVITE, METHOD_UPDATE, N_INVITE_200OK, qos_sdp_st::negotiation, qos_sdp_st::next, NULL, parse_headers(), hdr_field::parsed, qos_ctx_st::pending_sdp, QOS_CALLER, QOSCB_REMOVE_SDP, run_qos_callbacks(), _str::s, qos_sdp_st::sdp_session, SIP_REPLY, msg_start::type, and unlink_negotiated_qos_sdp().
Referenced by qos_dialog_response_CB().
Definition at line 282 of file qos_ctx_helpers.c.
References qos_ctx_st::negotiated_sdp, qos_sdp_st::next, NULL, and qos_sdp_st::prev.
Referenced by link_negotiated_qos_sdp_and_run_cb(), and remove_sdp().
Definition at line 270 of file qos_ctx_helpers.c.
References qos_sdp_st::next, NULL, qos_ctx_st::pending_sdp, and qos_sdp_st::prev.
Referenced by add_sdp().
1.5.6