#include <arpa/inet.h>#include <assert.h>#include <ctype.h>#include <dirent.h>#include <errno.h>#include <grp.h>#include <limits.h>#include <netdb.h>#include <pwd.h>#include <signal.h>#include <stdarg.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <syslog.h>#include <sys/ioctl.h>#include <sys/socket.h>#include <sys/time.h>#include <sys/types.h>#include <unistd.h>#include <termios.h>#include <time.h>#include <sys/stat.h>#include <fcntl.h>#include <netinet/in.h>#include <netinet/tcp.h>#include <nussl.h>#include "nufw_source.h"#include "nubase.h"#include "nuclient.h"Include dependency graph for libnuclient.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Data Structures | |
| struct | conn_type |
| struct | conntable_t |
| struct | nuauth_session |
Defines | |
| #define | SENT_TEST_INTERVAL 30 |
| #define | CONNTABLE_BUCKETS 5003 |
| #define | CONN_MAX 10 |
| #define | MIN_DELAY_SEC 0 |
| #define | MIN_DELAY_USEC 50*1000 |
| #define | MAX_DELAY_SEC 1 |
| #define | MAX_DELAY_USEC 600*1000 |
| #define | SET_ERROR(ERR, FAMILY, CODE) |
| #define | PACKET_ITEM_MAXSIZE |
| #define | PACKET_SIZE ( sizeof(struct nu_header) + CONN_MAX * PACKET_ITEM_MAXSIZE ) |
| #define | panic(format, args...) do_panic(__FILE__, __LINE__, format, ##args ) |
| #define | nu_assert(test, format, args...) do { if (!(test)) do_panic(__FILE__, __LINE__, format, ##args ); } while (0) |
Typedefs | |
| typedef conn_type | conn_t |
Functions | |
| char * | locale_to_utf8 (char *inbuf) |
| void | nu_exit_clean (nuauth_session_t *session) |
| int | compare (nuauth_session_t *session, conntable_t *old, conntable_t *new, nuclient_error *err) |
| void | do_panic (const char *filename, unsigned long line, const char *fmt,...) |
| void | ask_session_end (nuauth_session_t *session) |
| #define CONN_MAX 10 |
| #define CONNTABLE_BUCKETS 5003 |
Maximum number of connections in connection table, see conntable_t
Definition at line 77 of file libnuclient.h.
Referenced by compare(), tcptable_free(), tcptable_hash(), and tcptable_init().
| #define MAX_DELAY_SEC 1 |
| #define MAX_DELAY_USEC 600*1000 |
| #define MIN_DELAY_SEC 0 |
| #define MIN_DELAY_USEC 50*1000 |
| #define nu_assert | ( | test, | |||
| format, | |||||
| args... | ) | do { if (!(test)) do_panic(__FILE__, __LINE__, format, ##args ); } while (0) |
If test fails, call do_panic(__FILE__, __LINE__, format, ...)
Definition at line 116 of file libnuclient.h.
Referenced by nu_client_to_utf8().
| #define PACKET_ITEM_MAXSIZE |
Value:
( sizeof(struct nu_authreq) + sizeof(struct nu_authfield_ipv6) \ + sizeof(struct nu_authfield_app) + PROGNAME_BASE64_WIDTH )
Definition at line 96 of file libnuclient.h.
| #define PACKET_SIZE ( sizeof(struct nu_header) + CONN_MAX * PACKET_ITEM_MAXSIZE ) |
| #define panic | ( | format, | |||
| args... | ) | do_panic(__FILE__, __LINE__, format, ##args ) |
Call do_panic(__FILE__, __LINE__, format, ...)
Definition at line 108 of file libnuclient.h.
Referenced by nu_client_to_utf8(), and tcptable_add().
| #define SENT_TEST_INTERVAL 30 |
| #define SET_ERROR | ( | ERR, | |||
| FAMILY, | |||||
| CODE | ) |
Value:
if (ERR != NULL) \
{ \
ERR->family = FAMILY; \
ERR->error = CODE; \
}
Definition at line 89 of file libnuclient.h.
Referenced by _nu_client_new(), init_sasl(), mysasl_negotiate(), nu_client_check(), nu_client_connect(), nu_client_global_init(), nu_client_load_ca(), nu_client_load_key(), nu_client_load_pkcs12(), nu_client_new(), nu_client_new_callback(), nu_client_real_check(), recv_message(), samp_recv(), samp_send(), and send_os().
This structure holds everything we need to know about a connection.
We use unsigned int and long (instead of exact type) to make hashing easier.
| void ask_session_end | ( | nuauth_session_t * | session | ) |
Definition at line 637 of file internal.c.
References nuauth_session::connected, nuauth_session::nussl, nussl_session_destroy(), and session.
Referenced by nu_client_check(), nu_client_delete(), nu_client_real_check(), nu_client_reset(), and recv_message().
Here is the call graph for this function:

| int compare | ( | nuauth_session_t * | session, | |
| conntable_t * | old, | |||
| conntable_t * | new, | |||
| nuclient_error * | err | |||
| ) |
| char* locale_to_utf8 | ( | char * | inbuf | ) |
1.4.7