#include <string.h>#include <stdio.h>#include <sys/socket.h>#include <netinet/in.h>#include <arpa/inet.h>#include "../../str.h"#include "../../dprint.h"#include "../../usr_avp.h"#include "destination.h"#include "usage.h"

Go to the source code of this file.
Functions | |
| int | ospCheckOrigDestination (void) |
| void | ospConvertAddress (char *src, char *dst, int buffersize) |
| void | ospDumpAllDestination (void) |
| void | ospDumpDestination (osp_dest *dest) |
| osp_dest * | ospGetLastOrigDestination (void) |
| osp_dest * | ospGetNextOrigDestination (void) |
| osp_dest * | ospGetTermDestination (void) |
| osp_dest * | ospInitDestination (osp_dest *dest) |
| static int | ospIsToReportUsage (int code) |
| static void | ospRecordCode (int code, osp_dest *dest) |
| void | ospRecordEvent (int clientcode, int servercode) |
| static int | ospSaveDestination (osp_dest *dest, const str *name) |
| int | ospSaveOrigDestination (osp_dest *dest) |
| int | ospSaveTermDestination (osp_dest *dest) |
Variables | |
| const str | OSP_ORIGDEST_NAME = {"_osp_orig_dests_", 16} |
| const str | OSP_TERMDEST_NAME = {"_osp_term_dests_", 16} |
| int ospCheckOrigDestination | ( | void | ) |
Definition at line 129 of file destination.c.
References AVP_NAME_STR, AVP_VAL_STR, get_avp_val(), LM_DBG, NULL, _str::s, int_str::s, search_first_avp(), search_next_avp(), _osp_dest::supported, and _osp_dest::used.
Referenced by ospCheckRoute().
| void ospConvertAddress | ( | char * | src, | |
| char * | dst, | |||
| int | buffersize | |||
| ) |
Definition at line 428 of file destination.c.
References snprintf.
Referenced by ospBuildUsageFromDestination(), ospReportUsageFromCookie(), and ospRequestRouting().
| void ospDumpAllDestination | ( | void | ) |
Definition at line 386 of file destination.c.
References AVP_NAME_STR, AVP_VAL_STR, get_avp_val(), LM_DBG, NULL, ospDumpDestination(), _str::s, int_str::s, search_first_avp(), and search_next_avp().
| void ospDumpDestination | ( | osp_dest * | dest | ) |
Definition at line 372 of file destination.c.
References _osp_dest::host, _osp_dest::lastcode, LM_DBG, _osp_dest::time100, _osp_dest::time180, _osp_dest::time200, and _osp_dest::used.
Referenced by ospDumpAllDestination(), and ospReportOrigSetupUsage().
| osp_dest* ospGetLastOrigDestination | ( | void | ) |
Definition at line 226 of file destination.c.
References AVP_NAME_STR, AVP_VAL_STR, get_avp_val(), _osp_dest::host, LM_DBG, NULL, _str::s, int_str::s, search_first_avp(), search_next_avp(), _osp_dest::supported, and _osp_dest::used.
Referenced by ospRecordEvent().
| osp_dest* ospGetNextOrigDestination | ( | void | ) |
Definition at line 174 of file destination.c.
References AVP_NAME_STR, AVP_VAL_STR, get_avp_val(), _osp_dest::lastcode, LM_DBG, NULL, _str::s, int_str::s, search_first_avp(), search_next_avp(), _osp_dest::supported, and _osp_dest::used.
Referenced by ospPrepareDestination().
| osp_dest* ospGetTermDestination | ( | void | ) |
Definition at line 262 of file destination.c.
References AVP_NAME_STR, AVP_VAL_STR, LM_DBG, NULL, _str::s, int_str::s, and search_first_avp().
Referenced by ospRecordEvent(), and ospReportTermSetupUsage().
Definition at line 55 of file destination.c.
References _osp_dest::callid, _osp_dest::callidsize, LM_DBG, _osp_dest::token, and _osp_dest::tokensize.
Referenced by ospLoadRoutes(), and ospValidateHeader().
| static int ospIsToReportUsage | ( | int | code | ) | [static] |
| static void ospRecordCode | ( | int | code, | |
| osp_dest * | dest | |||
| ) | [static] |
Definition at line 282 of file destination.c.
References _osp_dest::lastcode, LM_DBG, NULL, _osp_dest::time100, _osp_dest::time180, and _osp_dest::time200.
Referenced by ospRecordEvent().
| void ospRecordEvent | ( | int | clientcode, | |
| int | servercode | |||
| ) |
Definition at line 343 of file destination.c.
References LM_DBG, ospGetLastOrigDestination(), ospGetTermDestination(), ospIsToReportUsage(), ospRecordCode(), ospReportOrigSetupUsage(), and ospReportTermSetupUsage().
Referenced by ospLoadRoutes(), ospTmcbFunc(), and ospValidateHeader().
Definition at line 76 of file destination.c.
References add_avp(), AVP_NAME_STR, AVP_VAL_STR, _str::len, LM_DBG, LM_ERR, and _str::s.
Referenced by ospSaveOrigDestination(), and ospSaveTermDestination().
| int ospSaveOrigDestination | ( | osp_dest * | dest | ) |
Definition at line 105 of file destination.c.
References ospSaveDestination().
Referenced by ospLoadRoutes().
| int ospSaveTermDestination | ( | osp_dest * | dest | ) |
Definition at line 116 of file destination.c.
References ospSaveDestination().
Referenced by ospValidateHeader().
| const str OSP_ORIGDEST_NAME = {"_osp_orig_dests_", 16} |
Definition at line 43 of file destination.c.
| const str OSP_TERMDEST_NAME = {"_osp_term_dests_", 16} |
Definition at line 44 of file destination.c.
1.5.6