MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / parse_sock_info

Function parse_sock_info

socket_info.c:554–569  ·  view source on GitHub ↗

parses the specified `spec` and returns an associated * socket_info*, if it could be found */

Source from the content-addressed store, hash-verified

552/* parses the specified `spec` and returns an associated
553 * socket_info*, if it could be found */
554const struct socket_info* parse_sock_info(str *addr)
555{
556 int port, proto;
557 str host;
558
559 if (!addr || !addr->s)
560 return NULL;
561
562 if (parse_phostport(addr->s, addr->len, &host.s, &host.len,
563 &port, &proto) != 0) {
564 return NULL;
565 }
566
567 return grep_internal_sock_info(&host, (unsigned short) port,
568 (unsigned short) proto);
569}
570
571struct socket_info_full* grep_sock_by_orig_name(unsigned short proto, str *host,
572 unsigned short port, struct socket_info_full *resume)

Callers 15

w_socket_belongs_to_bondFunction · 0.85
pv_set_force_sockFunction · 0.85
ds_load_dataFunction · 0.85
partition_initFunction · 0.85
mod_initFunction · 0.85
pv_set_siprecFunction · 0.85
srec_pop_ctxFunction · 0.85
load_reg_info_from_dbFunction · 0.85
mi_reg_upsertFunction · 0.85
fetch_socket_infoFunction · 0.85

Calls 1

parse_phostportFunction · 0.85

Tested by

no test coverage detected