#include <osp/osp.h>#include "../../parser/msg_parser.h"


Go to the source code of this file.
Defines | |
| #define | OSP_HEADER_SIZE strlen(OSP_TOKEN_HEADER) |
| #define | OSP_TOKEN_HEADER "P-OSP-Auth-Token: " |
Functions | |
| int | ospAddOspHeader (struct sip_msg *msg, unsigned char *token, unsigned int tokensize) |
| void | ospCopyStrToBuffer (str *source, char *buffer, int buffersize) |
| int | ospGetCallId (struct sip_msg *msg, OSPTCALLID **callid) |
| int | ospGetFromUserpart (struct sip_msg *msg, char *fromuser, int buffersize) |
| void | ospGetNextHop (struct sip_msg *msg, char *nexthop, int buffersize) |
| int | ospGetOspHeader (struct sip_msg *msg, unsigned char *token, unsigned int *tokensize) |
| int | ospGetRouteParameters (struct sip_msg *msg, char *routeparams, int buffersize) |
| int | ospGetRpidUserpart (struct sip_msg *msg, char *fromuser, int buffersize) |
| int | ospGetSourceAddress (struct sip_msg *msg, char *sourceaddress, int buffersize) |
| int | ospGetToUserpart (struct sip_msg *msg, char *touser, int buffersize) |
| int | ospGetUriUserpart (struct sip_msg *msg, char *touser, int buffersize) |
| int | ospRebuildDestionationUri (str *newuri, char *called, char *dest, char *port, int format) |
| #define OSP_HEADER_SIZE strlen(OSP_TOKEN_HEADER) |
| #define OSP_TOKEN_HEADER "P-OSP-Auth-Token: " |
| int ospAddOspHeader | ( | struct sip_msg * | msg, | |
| unsigned char * | token, | |||
| unsigned int | tokensize | |||
| ) |
Definition at line 286 of file sipheader.c.
References _str::len, LM_DBG, LM_ERR, OSP_HEADERBUF_SIZE, OSP_TOKEN_HEADER, OSP_TOKENBUF_SIZE, ospAppendHeader(), _str::s, and snprintf.
Referenced by ospPrepareDestination().
| void ospCopyStrToBuffer | ( | str * | source, | |
| char * | buffer, | |||
| int | buffersize | |||
| ) |
Definition at line 54 of file sipheader.c.
References _str::len, LM_ERR, and _str::s.
Referenced by ospGetFromUserpart(), ospGetNextHop(), ospGetRouteParameters(), ospGetRpidUserpart(), ospGetSourceAddress(), ospGetToUserpart(), and ospGetUriUserpart().
| int ospGetCallId | ( | struct sip_msg * | msg, | |
| OSPTCALLID ** | callid | |||
| ) |
Definition at line 405 of file sipheader.c.
References hdr_field::body, sip_msg::callid, _str::len, LM_ERR, NULL, and _str::s.
Referenced by ospReportUsage(), ospRequestRouting(), and ospValidateHeader().
| int ospGetFromUserpart | ( | struct sip_msg * | msg, | |
| char * | fromuser, | |||
| int | buffersize | |||
| ) |
Definition at line 95 of file sipheader.c.
References sip_msg::from, get_from, _str::len, LM_ERR, NULL, ospCopyStrToBuffer(), ospSkipPlus(), parse_from_header(), parse_uri(), _str::s, to_body::uri, and sip_uri::user.
Referenced by ospReportUsageFromCookie(), ospRequestRouting(), ospSetRpid(), and ospValidateHeader().
| void ospGetNextHop | ( | struct sip_msg * | msg, | |
| char * | nexthop, | |||
| int | buffersize | |||
| ) |
Definition at line 581 of file sipheader.c.
References check_self(), HDR_ROUTE_T, sip_msg::headers, sip_uri::host, _str::len, LM_DBG, LM_ERR, hdr_field::next, ospCopyStrToBuffer(), parse_uri(), hdr_field::parsed, sip_msg::parsed_uri, sip_uri::port_no, PROTO_NONE, _str::s, SIP_PORT, and hdr_field::type.
Referenced by ospReportUsageFromCookie().
| int ospGetOspHeader | ( | struct sip_msg * | msg, | |
| unsigned char * | token, | |||
| unsigned int * | tokensize | |||
| ) |
Definition at line 334 of file sipheader.c.
References hdr_field::body, HDR_EOH_F, HDR_OTHER_T, sip_msg::headers, _str::len, LM_ERR, hdr_field::name, hdr_field::next, OSP_HEADER_SIZE, OSP_TOKEN_HEADER, parse_headers(), _str::s, and hdr_field::type.
Referenced by ospCheckHeader(), and ospValidateHeader().
| int ospGetRouteParameters | ( | struct sip_msg * | msg, | |
| char * | routeparams, | |||
| int | buffersize | |||
| ) |
Definition at line 434 of file sipheader.c.
References check_self(), sip_uri::host, _str::len, LM_DBG, LM_ERR, rr::nameaddr, ospCopyStrToBuffer(), sip_uri::params, parse_uri(), hdr_field::parsed, sip_msg::parsed_uri, sip_uri::port_no, PROTO_NONE, sip_msg::route, _str::s, SIP_PORT, and name_addr::uri.
Referenced by ospReportUsage().
| int ospGetRpidUserpart | ( | struct sip_msg * | msg, | |
| char * | fromuser, | |||
| int | buffersize | |||
| ) |
Definition at line 133 of file sipheader.c.
References _osp_use_rpid, get_rpid, _str::len, LM_DBG, LM_ERR, NULL, ospCopyStrToBuffer(), ospSkipPlus(), parse_rpid_header(), parse_uri(), sip_msg::rpid, _str::s, to_body::uri, and sip_uri::user.
Referenced by ospRequestRouting(), ospSetRpid(), and ospValidateHeader().
| int ospGetSourceAddress | ( | struct sip_msg * | msg, | |
| char * | sourceaddress, | |||
| int | buffersize | |||
| ) |
Definition at line 370 of file sipheader.c.
References HDR_VIA_T, sip_msg::headers, via_body::host, LM_DBG, hdr_field::next, ospCopyStrToBuffer(), hdr_field::parsed, and hdr_field::type.
Referenced by ospReportUsageFromCookie(), ospRequestRouting(), and ospValidateHeader().
| int ospGetToUserpart | ( | struct sip_msg * | msg, | |
| char * | touser, | |||
| int | buffersize | |||
| ) |
Definition at line 175 of file sipheader.c.
References get_to, HDR_TO_F, _str::len, LM_ERR, NULL, ospCopyStrToBuffer(), ospSkipPlus(), parse_headers(), parse_uri(), _str::s, sip_msg::to, to_body::uri, and sip_uri::user.
Referenced by ospReportUsageFromCookie(), ospRequestRouting(), and ospValidateHeader().
| int ospGetUriUserpart | ( | struct sip_msg * | msg, | |
| char * | touser, | |||
| int | buffersize | |||
| ) |
Definition at line 213 of file sipheader.c.
References LM_ERR, ospCopyStrToBuffer(), ospSkipPlus(), parse_sip_msg_uri(), sip_msg::parsed_uri, and sip_uri::user.
Referenced by ospRequestRouting(), and ospValidateHeader().
| int ospRebuildDestionationUri | ( | str * | newuri, | |
| char * | called, | |||
| char * | dest, | |||
| char * | port, | |||
| int | format | |||
| ) |
Definition at line 487 of file sipheader.c.
References _str::len, LM_DBG, LM_ERR, NULL, pkg_malloc, and _str::s.
Referenced by ospPrepareDestination().
1.5.6