#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <sys/types.h>#include <sys/time.h>#include <sys/socket.h>#include <netinet/in.h>#include <netdb.h>#include <errno.h>#include "../../mem/mem.h"#include "../../dprint.h"#include "../../str.h"#include "auth_diameter.h"#include "defs.h"#include "tcp_comm.h"#include "diameter_msg.h"

Go to the source code of this file.
Defines | |
| #define | MAX_TRIES 10 |
Functions | |
| void | close_tcp_connection (int sfd) |
| int | do_read (int socket, rd_buf_t *p) |
| int | init_mytcp (char *host, int port) |
| void | reset_read_buffer (rd_buf_t *rb) |
| int | tcp_send_recv (int sockfd, char *buf, int len, rd_buf_t *rb, unsigned int waited_id) |
| #define MAX_TRIES 10 |
| void close_tcp_connection | ( | int | sfd | ) |
| int do_read | ( | int | socket, | |
| rd_buf_t * | p | |||
| ) |
Definition at line 112 of file tcp_comm.c.
References rd_buf::buf, rd_buf::buf_len, CONN_CLOSED, CONN_ERROR, CONN_SUCCESS, rd_buf::first_4bytes, len, LM_DBG, LM_ERR, LM_INFO, MAX_AAA_MSG_SIZE, and pkg_malloc.
Referenced by tcp_send_recv().
| int init_mytcp | ( | char * | host, | |
| int | port | |||
| ) |
Definition at line 56 of file tcp_comm.c.
References LM_ERR, NULL, and sockfd.
Referenced by child_init(), diameter_authorize(), diameter_is_user_in(), and mod_child_init().
| void reset_read_buffer | ( | rd_buf_t * | rb | ) |
Definition at line 96 of file tcp_comm.c.
References rd_buf::buf, rd_buf::buf_len, rd_buf::chall, rd_buf::chall_len, rd_buf::first_4bytes, pkg_free, and rd_buf::ret_code.
Referenced by tcp_send_recv().
| int tcp_send_recv | ( | int | sockfd, | |
| char * | buf, | |||
| int | len, | |||
| rd_buf_t * | rb, | |||
| unsigned int | waited_id | |||
| ) |
Definition at line 191 of file tcp_comm.c.
References AAA_AUTHENTICATION_REJECTED, AAA_AUTHORIZATION_REJECTED, AAA_AUTHORIZED, AAA_CHALENGE, AAA_CONN_CLOSED, AAA_ERROR, AAA_FORWARD_SEARCH, AAA_NOT_AUTHORIZED, AAA_SRVERR, AAA_SUCCESS, AAA_TIMEOUT, AAAFindMatchingAVP(), AAATranslateMessage(), AVP_Challenge, AVP_Service_Type, AVP_SIP_MSGID, rd_buf::buf, rd_buf::buf_len, rd_buf::chall, rd_buf::chall_len, CONN_CLOSED, CONN_ERROR, avp::data, do_read(), _str::len, LM_DBG, LM_ERR, LM_NOTICE, MAX_TRIES, MAX_WAIT_SEC, MAX_WAIT_USEC, NULL, pkg_malloc, _message_t::res_code, reset_read_buffer(), rd_buf::ret_code, _str::s, SIP_AUTH_SERVICE, and vendorID.
Referenced by diameter_authorize(), and diameter_is_user_in().
1.5.6