#include <stdlib.h>#include <arpa/inet.h>#include "gwlib/gwlib.h"#include "wap_addr.h"Include dependency graph for wap_addr.c:

Go to the source code of this file.
Functions | |
| WAPAddr * | wap_addr_create (Octstr *address, long port) |
| void | wap_addr_destroy (WAPAddr *addr) |
| int | wap_addr_same (WAPAddr *a, WAPAddr *b) |
| WAPAddrTuple * | wap_addr_tuple_create (Octstr *rmt_addr, long rmt_port, Octstr *lcl_addr, long lcl_port) |
| void | wap_addr_tuple_destroy (WAPAddrTuple *tuple) |
| int | wap_addr_tuple_same (WAPAddrTuple *a, WAPAddrTuple *b) |
| WAPAddrTuple * | wap_addr_tuple_duplicate (WAPAddrTuple *tuple) |
| void | wap_addr_tuple_dump (WAPAddrTuple *tuple) |
|
||||||||||||
|
Definition at line 68 of file wap_addr.c. References WAPAddr::address, octstr_duplicate, and octstr_get_cstr. Referenced by wap_addr_tuple_create(). 00069 {
00070 WAPAddr *addr;
00071
00072 addr = gw_malloc(sizeof(*addr));
00073 addr->address = octstr_duplicate(address);
00074 addr->iaddr = inet_addr(octstr_get_cstr(address));
00075 addr->port = port;
00076 return addr;
00077 }
|
|
|
Definition at line 80 of file wap_addr.c. References WAPAddr::address, and octstr_destroy(). Referenced by wap_addr_tuple_destroy(). 00081 {
00082 if (addr != NULL) {
00083 octstr_destroy(addr->address);
00084 gw_free(addr);
00085 }
00086 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 89 of file wap_addr.c. References WAPAddr::iaddr, and WAPAddr::port. Referenced by wap_addr_tuple_same(). 00090 {
00091 /* XXX which ordering gives the best heuristical performance? */
00092 return a->port == b->port && a->iaddr == b->iaddr;
00093 }
|
|
||||||||||||||||||||
|
Definition at line 96 of file wap_addr.c. References WAPAddrTuple::remote, and wap_addr_create(). Referenced by addr_tuple_change_cliport(), main(), set_addr_tuple(), wap_addr_tuple_duplicate(), and wdp_msg2event(). 00098 {
00099 WAPAddrTuple *tuple;
00100
00101 tuple = gw_malloc(sizeof(*tuple));
00102 tuple->remote = wap_addr_create(rmt_addr, rmt_port);
00103 tuple->local = wap_addr_create(lcl_addr, lcl_port);
00104 return tuple;
00105 }
|
Here is the call graph for this function:

|
|
Definition at line 108 of file wap_addr.c. References WAPAddrTuple::local, WAPAddrTuple::remote, and wap_addr_destroy(). Referenced by cache_item_destroy(), find_session_machine(), and handle_push_message(). 00109 {
00110 if (tuple != NULL) {
00111 wap_addr_destroy(tuple->remote);
00112 wap_addr_destroy(tuple->local);
00113 gw_free(tuple);
00114 }
00115 }
|
Here is the call graph for this function:

|
|
Definition at line 137 of file wap_addr.c. References debug(), octstr_get_cstr, WAPAddr::port, and WAPAddrTuple::remote. 00138 {
00139 debug("wap", 0, "WAPAddrTuple %p = <%s:%ld> - <%s:%ld>",
00140 (void *) tuple,
00141 octstr_get_cstr(tuple->remote->address),
00142 tuple->remote->port,
00143 octstr_get_cstr(tuple->local->address),
00144 tuple->local->port);
00145 }
|
Here is the call graph for this function:

|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 118 of file wap_addr.c. References WAPAddrTuple::local, WAPAddrTuple::remote, and wap_addr_same(). Referenced by is_wanted_init_machine(), is_wanted_resp_machine(), same_client(), tid_is_cached(), and transaction_belongs_to_session(). 00119 {
00120 return wap_addr_same(a->remote, b->remote) &&
00121 wap_addr_same(a->local, b->local);
00122 }
|
Here is the call graph for this function:
