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

Function rc_get_ipaddr

modules/aaa_radius/rad.c:64–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62 */
63#ifdef RADCLI
64uint32_t rc_get_ipaddr (char *host)
65{
66 const struct hostent* he;
67 struct in_addr** addr_list;
68
69 he=resolvehost(host, 0/*do test if is ip*/);
70 if (!he) {
71 LM_ERR("Can't resolve host: %s\n", host);
72 return 0;
73 }
74 /* FIXME the function is not for IPV6 */
75 addr_list = (struct in_addr **)he->h_addr_list;
76 if (addr_list[0])
77 return addr_list[0]->s_addr;
78
79 return 0;
80
81}
82#endif
83
84

Callers 2

rad_avp_addFunction · 0.85
make_send_messageFunction · 0.85

Calls 1

resolvehostFunction · 0.85

Tested by

no test coverage detected