#include <errno.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/select.h>
#include <sys/stat.h>
#include <netinet/tcp.h>
#include <netdb.h>
#include <netinet/in.h>
#include <sys/time.h>
#include "ip_connection.h"
Go to the source code of this file.
Classes | |
struct | _CallbackContext |
struct | _Socket |
struct | ATTRIBUTE_PACKED |
struct | ATTRIBUTE_PACKED |
struct | ATTRIBUTE_PACKED |
struct | ATTRIBUTE_PACKED |
struct | ATTRIBUTE_PACKED |
struct | Meta |
struct | SHA1 |
Defines | |
#define | _BSD_SOURCE |
#define | _GNU_SOURCE |
#define | BASE58_MAX_STR_SIZE 13 |
#define | blk(i) (block[i&15] = rol(block[(i+13)&15]^block[(i+8)&15]^block[(i+2)&15]^block[i&15],1)) |
#define | blk0(i) (block[i] = htonl(block[i])) |
#define | IPCON_EXPOSE_INTERNALS |
#define | R0(v, w, x, y, z, i) z+=((w&(x^y))^y)+blk0(i)+0x5A827999+rol(v,5);w=rol(w,30); |
#define | R1(v, w, x, y, z, i) z+=((w&(x^y))^y)+blk(i)+0x5A827999+rol(v,5);w=rol(w,30); |
#define | R2(v, w, x, y, z, i) z+=(w^x^y)+blk(i)+0x6ED9EBA1+rol(v,5);w=rol(w,30); |
#define | R3(v, w, x, y, z, i) z+=(((w|x)&y)|(w&x))+blk(i)+0x8F1BBCDC+rol(v,5);w=rol(w,30); |
#define | R4(v, w, x, y, z, i) z+=(w^x^y)+blk(i)+0xCA62C1D6+rol(v,5);w=rol(w,30); |
#define | rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) |
#define | SHA1_BLOCK_LENGTH 64 |
#define | SHA1_DIGEST_LENGTH 20 |
#define | STATIC_ASSERT(condition, message) |
Enumerations | |
enum | { IPCON_FUNCTION_DISCONNECT_PROBE = 128 } |
enum | { QUEUE_KIND_EXIT = 0, QUEUE_KIND_META, QUEUE_KIND_PACKET } |
enum | { IPCON_FUNCTION_ENUMERATE = 254 } |
enum | { BRICK_DAEMON_FUNCTION_GET_AUTHENTICATION_NONCE = 1, BRICK_DAEMON_FUNCTION_AUTHENTICATE = 2 } |
enum | { IPCON_DISCONNECT_PROBE_INTERVAL = 5000 } |
Functions | |
static uint64_t | base58_decode (const char *str) |
static int | brickd_authenticate (BrickDaemon *brickd, uint8_t client_nonce[4], uint8_t digest[20]) |
static void | brickd_create (BrickDaemon *brickd, const char *uid, IPConnection *ipcon) |
static void | brickd_destroy (BrickDaemon *brickd) |
static int | brickd_get_authentication_nonce (BrickDaemon *brickd, uint8_t ret_server_nonce[4]) |
void | device_create (Device *device, const char *uid_str, IPConnectionPrivate *ipcon_p, uint8_t api_version_major, uint8_t api_version_minor, uint8_t api_version_release) |
static void | device_destroy (DevicePrivate *device_p) |
int | device_get_api_version (DevicePrivate *device_p, uint8_t ret_api_version[3]) |
int | device_get_response_expected (DevicePrivate *device_p, uint8_t function_id, bool *ret_response_expected) |
void | device_register_callback (DevicePrivate *device_p, uint8_t id, void *callback, void *user_data) |
void | device_release (DevicePrivate *device_p) |
int | device_send_request (DevicePrivate *device_p, Packet *request, Packet *response) |
int | device_set_response_expected (DevicePrivate *device_p, uint8_t function_id, bool response_expected) |
int | device_set_response_expected_all (DevicePrivate *device_p, bool response_expected) |
static void | event_create (Event *event) |
static void | event_destroy (Event *event) |
static void | event_reset (Event *event) |
static void | event_set (Event *event) |
static int | event_wait (Event *event, uint32_t timeout) |
uint32_t | get_random_uint32 (void) |
static void | hmac_sha1 (uint8_t *secret, int secret_length, uint8_t *data, int data_length, uint8_t digest[SHA1_DIGEST_LENGTH]) |
static DevicePrivate * | ipcon_acquire_device (IPConnectionPrivate *ipcon_p, uint32_t uid) |
int | ipcon_authenticate (IPConnection *ipcon, const char secret[64]) |
static void | ipcon_callback_loop (void *opaque) |
int | ipcon_connect (IPConnection *ipcon, const char *host, uint16_t port) |
static int | ipcon_connect_unlocked (IPConnectionPrivate *ipcon_p, bool is_auto_reconnect) |
void | ipcon_create (IPConnection *ipcon) |
void | ipcon_destroy (IPConnection *ipcon) |
int | ipcon_disconnect (IPConnection *ipcon) |
static void | ipcon_disconnect_probe_loop (void *opaque) |
static void | ipcon_disconnect_unlocked (IPConnectionPrivate *ipcon_p) |
static void | ipcon_dispatch_meta (IPConnectionPrivate *ipcon_p, Meta *meta) |
static void | ipcon_dispatch_packet (IPConnectionPrivate *ipcon_p, Packet *packet) |
int | ipcon_enumerate (IPConnection *ipcon) |
bool | ipcon_get_auto_reconnect (IPConnection *ipcon) |
int | ipcon_get_connection_state (IPConnection *ipcon) |
uint32_t | ipcon_get_timeout (IPConnection *ipcon) |
static void | ipcon_handle_disconnect_by_peer (IPConnectionPrivate *ipcon_p, uint8_t disconnect_reason, uint64_t socket_id, bool disconnect_immediately) |
static void | ipcon_handle_response (IPConnectionPrivate *ipcon_p, Packet *response) |
static void | ipcon_receive_loop (void *opaque) |
void | ipcon_register_callback (IPConnection *ipcon, uint8_t id, void *callback, void *user_data) |
static int | ipcon_send_request (IPConnectionPrivate *ipcon_p, Packet *request) |
void | ipcon_set_auto_reconnect (IPConnection *ipcon, bool auto_reconnect) |
void | ipcon_set_timeout (IPConnection *ipcon, uint32_t timeout) |
void | ipcon_unwait (IPConnection *ipcon) |
void | ipcon_wait (IPConnection *ipcon) |
float | leconvert_float_from (float little) |
float | leconvert_float_to (float native) |
int16_t | leconvert_int16_from (int16_t little) |
int16_t | leconvert_int16_to (int16_t native) |
int32_t | leconvert_int32_from (int32_t little) |
int32_t | leconvert_int32_to (int32_t native) |
int64_t | leconvert_int64_from (int64_t little) |
int64_t | leconvert_int64_to (int64_t native) |
uint16_t | leconvert_uint16_from (uint16_t little) |
uint16_t | leconvert_uint16_to (uint16_t native) |
uint32_t | leconvert_uint32_from (uint32_t little) |
uint32_t | leconvert_uint32_to (uint32_t native) |
uint64_t | leconvert_uint64_from (uint64_t little) |
uint64_t | leconvert_uint64_to (uint64_t native) |
void | mutex_create (Mutex *mutex) |
void | mutex_destroy (Mutex *mutex) |
void | mutex_lock (Mutex *mutex) |
void | mutex_unlock (Mutex *mutex) |
int | packet_header_create (PacketHeader *header, uint8_t length, uint8_t function_id, IPConnectionPrivate *ipcon_p, DevicePrivate *device_p) |
uint8_t | packet_header_get_error_code (PacketHeader *header) |
uint8_t | packet_header_get_response_expected (PacketHeader *header) |
uint8_t | packet_header_get_sequence_number (PacketHeader *header) |
void | packet_header_set_response_expected (PacketHeader *header, uint8_t response_expected) |
void | packet_header_set_sequence_number (PacketHeader *header, uint8_t sequence_number) |
static void | queue_create (Queue *queue) |
static void | queue_destroy (Queue *queue) |
static int | queue_get (Queue *queue, int *kind, void **data) |
static void | queue_put (Queue *queue, int kind, void *data) |
static int | read_uint32_non_blocking (const char *filename, uint32_t *value) |
static int | semaphore_acquire (Semaphore *semaphore) |
static void | semaphore_create (Semaphore *semaphore) |
static void | semaphore_destroy (Semaphore *semaphore) |
static void | semaphore_release (Semaphore *semaphore) |
static void | sha1_final (SHA1 *sha1, uint8_t digest[SHA1_DIGEST_LENGTH]) |
static void | sha1_init (SHA1 *sha1) |
static uint32_t | sha1_transform (SHA1 *sha1, const uint8_t buffer[SHA1_BLOCK_LENGTH]) |
static void | sha1_update (SHA1 *sha1, const uint8_t *data, size_t length) |
static int | socket_connect (Socket *socket, struct sockaddr_in *address, int length) |
static int | socket_create (Socket *socket_, int domain, int type, int protocol) |
static void | socket_destroy (Socket *socket) |
static int | socket_receive (Socket *socket, void *buffer, int length) |
static int | socket_send (Socket *socket, void *buffer, int length) |
static void | socket_shutdown (Socket *socket) |
STATIC_ASSERT (sizeof(PacketHeader)==8,"PacketHeader has invalid size") | |
STATIC_ASSERT (sizeof(Packet)==80,"Packet has invalid size") | |
STATIC_ASSERT (sizeof(EnumerateCallback)==34,"EnumerateCallback has invalid size") | |
STATIC_ASSERT (sizeof(GetAuthenticationNonce)==8,"GetAuthenticationNonce has invalid size") | |
STATIC_ASSERT (sizeof(GetAuthenticationNonceResponse)==12,"GetAuthenticationNonceResponse has invalid size") | |
STATIC_ASSERT (sizeof(Authenticate)==32,"Authenticate has invalid size") | |
static size_t | string_length (const char *s, size_t max_length) |
static void | table_create (Table *table) |
static void | table_destroy (Table *table) |
static void * | table_get (Table *table, uint32_t key) |
static void | table_insert (Table *table, uint32_t key, void *value) |
static void | table_remove (Table *table, uint32_t key) |
static int | thread_create (Thread *thread, ThreadFunction function, void *opaque) |
static void | thread_destroy (Thread *thread) |
static bool | thread_is_current (Thread *thread) |
static void | thread_join (Thread *thread) |
static void | thread_sleep (int msec) |
static void * | thread_wrapper (void *opaque) |
Variables | |
static const char | BASE58_ALPHABET [] = "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ" |
#define _BSD_SOURCE |
Definition at line 12 of file ip_connection.cpp.
#define _GNU_SOURCE |
Definition at line 15 of file ip_connection.cpp.
#define BASE58_MAX_STR_SIZE 13 |
Definition at line 467 of file ip_connection.cpp.
#define blk | ( | i | ) | (block[i&15] = rol(block[(i+13)&15]^block[(i+8)&15]^block[(i+2)&15]^block[i&15],1)) |
Definition at line 164 of file ip_connection.cpp.
#define blk0 | ( | i | ) | (block[i] = htonl(block[i])) |
Definition at line 163 of file ip_connection.cpp.
#define IPCON_EXPOSE_INTERNALS |
Definition at line 49 of file ip_connection.cpp.
Definition at line 167 of file ip_connection.cpp.
Definition at line 168 of file ip_connection.cpp.
Definition at line 169 of file ip_connection.cpp.
Definition at line 170 of file ip_connection.cpp.
Definition at line 171 of file ip_connection.cpp.
#define rol | ( | value, | |
bits | |||
) | (((value) << (bits)) | ((value) >> (32 - (bits)))) |
Definition at line 160 of file ip_connection.cpp.
#define SHA1_BLOCK_LENGTH 64 |
Definition at line 151 of file ip_connection.cpp.
#define SHA1_DIGEST_LENGTH 20 |
Definition at line 152 of file ip_connection.cpp.
#define STATIC_ASSERT | ( | condition, | |
message | |||
) |
Definition at line 121 of file ip_connection.cpp.
anonymous enum |
Definition at line 1659 of file ip_connection.cpp.
anonymous enum |
Definition at line 1042 of file ip_connection.cpp.
anonymous enum |
Definition at line 1140 of file ip_connection.cpp.
anonymous enum |
Definition at line 1375 of file ip_connection.cpp.
anonymous enum |
Definition at line 1655 of file ip_connection.cpp.
static uint64_t base58_decode | ( | const char * | str | ) | [static] |
Definition at line 498 of file ip_connection.cpp.
static int brickd_authenticate | ( | BrickDaemon * | brickd, |
uint8_t | client_nonce[4], | ||
uint8_t | digest[20] | ||
) | [static] |
Definition at line 1418 of file ip_connection.cpp.
static void brickd_create | ( | BrickDaemon * | brickd, |
const char * | uid, | ||
IPConnection * | ipcon | ||
) | [static] |
Definition at line 1380 of file ip_connection.cpp.
static void brickd_destroy | ( | BrickDaemon * | brickd | ) | [static] |
Definition at line 1391 of file ip_connection.cpp.
static int brickd_get_authentication_nonce | ( | BrickDaemon * | brickd, |
uint8_t | ret_server_nonce[4] | ||
) | [static] |
Definition at line 1395 of file ip_connection.cpp.
void device_create | ( | Device * | device, |
const char * | uid_str, | ||
IPConnectionPrivate * | ipcon_p, | ||
uint8_t | api_version_major, | ||
uint8_t | api_version_minor, | ||
uint8_t | api_version_release | ||
) |
Definition at line 1159 of file ip_connection.cpp.
static void device_destroy | ( | DevicePrivate * | device_p | ) | [static] |
Definition at line 1147 of file ip_connection.cpp.
int device_get_api_version | ( | DevicePrivate * | device_p, |
uint8_t | ret_api_version[3] | ||
) |
Definition at line 1295 of file ip_connection.cpp.
int device_get_response_expected | ( | DevicePrivate * | device_p, |
uint8_t | function_id, | ||
bool * | ret_response_expected | ||
) |
Definition at line 1240 of file ip_connection.cpp.
void device_register_callback | ( | DevicePrivate * | device_p, |
uint8_t | id, | ||
void * | callback, | ||
void * | user_data | ||
) |
Definition at line 1289 of file ip_connection.cpp.
void device_release | ( | DevicePrivate * | device_p | ) |
Definition at line 1226 of file ip_connection.cpp.
int device_send_request | ( | DevicePrivate * | device_p, |
Packet * | request, | ||
Packet * | response | ||
) |
Definition at line 1303 of file ip_connection.cpp.
int device_set_response_expected | ( | DevicePrivate * | device_p, |
uint8_t | function_id, | ||
bool | response_expected | ||
) |
Definition at line 1258 of file ip_connection.cpp.
int device_set_response_expected_all | ( | DevicePrivate * | device_p, |
bool | response_expected | ||
) |
Definition at line 1274 of file ip_connection.cpp.
static void event_create | ( | Event * | event | ) | [static] |
Definition at line 740 of file ip_connection.cpp.
static void event_destroy | ( | Event * | event | ) | [static] |
Definition at line 747 of file ip_connection.cpp.
static void event_reset | ( | Event * | event | ) | [static] |
Definition at line 761 of file ip_connection.cpp.
static void event_set | ( | Event * | event | ) | [static] |
Definition at line 752 of file ip_connection.cpp.
static int event_wait | ( | Event * | event, |
uint32_t | timeout | ||
) | [static] |
Definition at line 769 of file ip_connection.cpp.
uint32_t get_random_uint32 | ( | void | ) |
Definition at line 368 of file ip_connection.cpp.
static void hmac_sha1 | ( | uint8_t * | secret, |
int | secret_length, | ||
uint8_t * | data, | ||
int | data_length, | ||
uint8_t | digest[SHA1_DIGEST_LENGTH] | ||
) | [static] |
Definition at line 413 of file ip_connection.cpp.
static DevicePrivate* ipcon_acquire_device | ( | IPConnectionPrivate * | ipcon_p, |
uint32_t | uid | ||
) | [static] |
Definition at line 1454 of file ip_connection.cpp.
static void ipcon_callback_loop | ( | void * | opaque | ) | [static] |
Definition at line 1594 of file ip_connection.cpp.
static int ipcon_connect_unlocked | ( | IPConnectionPrivate * | ipcon_p, |
bool | is_auto_reconnect | ||
) | [static] |
Definition at line 1805 of file ip_connection.cpp.
static void ipcon_disconnect_probe_loop | ( | void * | opaque | ) | [static] |
Definition at line 1665 of file ip_connection.cpp.
static void ipcon_disconnect_unlocked | ( | IPConnectionPrivate * | ipcon_p | ) | [static] |
Definition at line 1969 of file ip_connection.cpp.
static void ipcon_dispatch_meta | ( | IPConnectionPrivate * | ipcon_p, |
Meta * | meta | ||
) | [static] |
Definition at line 1470 of file ip_connection.cpp.
static void ipcon_dispatch_packet | ( | IPConnectionPrivate * | ipcon_p, |
Packet * | packet | ||
) | [static] |
Definition at line 1551 of file ip_connection.cpp.
static void ipcon_handle_disconnect_by_peer | ( | IPConnectionPrivate * | ipcon_p, |
uint8_t | disconnect_reason, | ||
uint64_t | socket_id, | ||
bool | disconnect_immediately | ||
) | [static] |
Definition at line 1635 of file ip_connection.cpp.
static void ipcon_handle_response | ( | IPConnectionPrivate * | ipcon_p, |
Packet * | response | ||
) | [static] |
Definition at line 1688 of file ip_connection.cpp.
static void ipcon_receive_loop | ( | void * | opaque | ) | [static] |
Definition at line 1749 of file ip_connection.cpp.
static int ipcon_send_request | ( | IPConnectionPrivate * | ipcon_p, |
Packet * | request | ||
) | [static] |
Definition at line 2006 of file ip_connection.cpp.
float leconvert_float_from | ( | float | little | ) |
Definition at line 2460 of file ip_connection.cpp.
float leconvert_float_to | ( | float | native | ) |
Definition at line 2407 of file ip_connection.cpp.
int16_t leconvert_int16_from | ( | int16_t | little | ) |
Definition at line 2419 of file ip_connection.cpp.
int16_t leconvert_int16_to | ( | int16_t | native | ) |
Definition at line 2351 of file ip_connection.cpp.
int32_t leconvert_int32_from | ( | int32_t | little | ) |
Definition at line 2430 of file ip_connection.cpp.
int32_t leconvert_int32_to | ( | int32_t | native | ) |
Definition at line 2367 of file ip_connection.cpp.
int64_t leconvert_int64_from | ( | int64_t | little | ) |
Definition at line 2443 of file ip_connection.cpp.
int64_t leconvert_int64_to | ( | int64_t | native | ) |
Definition at line 2385 of file ip_connection.cpp.
uint16_t leconvert_uint16_from | ( | uint16_t | little | ) |
Definition at line 2423 of file ip_connection.cpp.
uint16_t leconvert_uint16_to | ( | uint16_t | native | ) |
Definition at line 2355 of file ip_connection.cpp.
uint32_t leconvert_uint32_from | ( | uint32_t | little | ) |
Definition at line 2434 of file ip_connection.cpp.
uint32_t leconvert_uint32_to | ( | uint32_t | native | ) |
Definition at line 2371 of file ip_connection.cpp.
uint64_t leconvert_uint64_from | ( | uint64_t | little | ) |
Definition at line 2447 of file ip_connection.cpp.
uint64_t leconvert_uint64_to | ( | uint64_t | native | ) |
Definition at line 2389 of file ip_connection.cpp.
void mutex_create | ( | Mutex * | mutex | ) |
Definition at line 693 of file ip_connection.cpp.
void mutex_destroy | ( | Mutex * | mutex | ) |
Definition at line 697 of file ip_connection.cpp.
void mutex_lock | ( | Mutex * | mutex | ) |
Definition at line 701 of file ip_connection.cpp.
void mutex_unlock | ( | Mutex * | mutex | ) |
Definition at line 705 of file ip_connection.cpp.
int packet_header_create | ( | PacketHeader * | header, |
uint8_t | length, | ||
uint8_t | function_id, | ||
IPConnectionPrivate * | ipcon_p, | ||
DevicePrivate * | device_p | ||
) |
Definition at line 2297 of file ip_connection.cpp.
uint8_t packet_header_get_error_code | ( | PacketHeader * | header | ) |
Definition at line 2347 of file ip_connection.cpp.
uint8_t packet_header_get_response_expected | ( | PacketHeader * | header | ) |
Definition at line 2338 of file ip_connection.cpp.
uint8_t packet_header_get_sequence_number | ( | PacketHeader * | header | ) |
Definition at line 2329 of file ip_connection.cpp.
void packet_header_set_response_expected | ( | PacketHeader * | header, |
uint8_t | response_expected | ||
) |
Definition at line 2342 of file ip_connection.cpp.
void packet_header_set_sequence_number | ( | PacketHeader * | header, |
uint8_t | sequence_number | ||
) |
Definition at line 2333 of file ip_connection.cpp.
static void queue_create | ( | Queue * | queue | ) | [static] |
Definition at line 1054 of file ip_connection.cpp.
static void queue_destroy | ( | Queue * | queue | ) | [static] |
Definition at line 1062 of file ip_connection.cpp.
static int queue_get | ( | Queue * | queue, |
int * | kind, | ||
void ** | data | ||
) | [static] |
Definition at line 1100 of file ip_connection.cpp.
static void queue_put | ( | Queue * | queue, |
int | kind, | ||
void * | data | ||
) | [static] |
Definition at line 1079 of file ip_connection.cpp.
static int read_uint32_non_blocking | ( | const char * | filename, |
uint32_t * | value | ||
) | [static] |
Definition at line 349 of file ip_connection.cpp.
static int semaphore_acquire | ( | Semaphore * | semaphore | ) | [static] |
Definition at line 856 of file ip_connection.cpp.
static void semaphore_create | ( | Semaphore * | semaphore | ) | [static] |
Definition at line 828 of file ip_connection.cpp.
static void semaphore_destroy | ( | Semaphore * | semaphore | ) | [static] |
Definition at line 848 of file ip_connection.cpp.
static void semaphore_release | ( | Semaphore * | semaphore | ) | [static] |
Definition at line 860 of file ip_connection.cpp.
static void sha1_final | ( | SHA1 * | sha1, |
uint8_t | digest[SHA1_DIGEST_LENGTH] | ||
) | [static] |
Definition at line 258 of file ip_connection.cpp.
Definition at line 225 of file ip_connection.cpp.
static uint32_t sha1_transform | ( | SHA1 * | sha1, |
const uint8_t | buffer[SHA1_BLOCK_LENGTH] | ||
) | [static] |
Definition at line 174 of file ip_connection.cpp.
static void sha1_update | ( | SHA1 * | sha1, |
const uint8_t * | data, | ||
size_t | length | ||
) | [static] |
Definition at line 234 of file ip_connection.cpp.
static int socket_connect | ( | Socket * | socket, |
struct sockaddr_in * | address, | ||
int | length | ||
) | [static] |
Definition at line 641 of file ip_connection.cpp.
static int socket_create | ( | Socket * | socket_, |
int | domain, | ||
int | type, | ||
int | protocol | ||
) | [static] |
Definition at line 614 of file ip_connection.cpp.
static void socket_destroy | ( | Socket * | socket | ) | [static] |
Definition at line 635 of file ip_connection.cpp.
static int socket_receive | ( | Socket * | socket, |
void * | buffer, | ||
int | length | ||
) | [static] |
Definition at line 649 of file ip_connection.cpp.
static int socket_send | ( | Socket * | socket, |
void * | buffer, | ||
int | length | ||
) | [static] |
Definition at line 653 of file ip_connection.cpp.
static void socket_shutdown | ( | Socket * | socket | ) | [static] |
Definition at line 645 of file ip_connection.cpp.
STATIC_ASSERT | ( | sizeof(PacketHeader) | = =8 , |
"PacketHeader has invalid size" | |||
) |
STATIC_ASSERT | ( | sizeof(Packet) | = =80 , |
"Packet has invalid size" | |||
) |
STATIC_ASSERT | ( | sizeof(EnumerateCallback) | = =34 , |
"EnumerateCallback has invalid size" | |||
) |
STATIC_ASSERT | ( | sizeof(GetAuthenticationNonce) | = =8 , |
"GetAuthenticationNonce has invalid size" | |||
) |
STATIC_ASSERT | ( | sizeof(GetAuthenticationNonceResponse) | = =12 , |
"GetAuthenticationNonceResponse has invalid size" | |||
) |
STATIC_ASSERT | ( | sizeof(Authenticate) | = =32 , |
"Authenticate has invalid size" | |||
) |
static size_t string_length | ( | const char * | s, |
size_t | max_length | ||
) | [static] |
Definition at line 297 of file ip_connection.cpp.
static void table_create | ( | Table * | table | ) | [static] |
Definition at line 948 of file ip_connection.cpp.
static void table_destroy | ( | Table * | table | ) | [static] |
Definition at line 957 of file ip_connection.cpp.
static void* table_get | ( | Table * | table, |
uint32_t | key | ||
) | [static] |
Definition at line 1017 of file ip_connection.cpp.
static void table_insert | ( | Table * | table, |
uint32_t | key, | ||
void * | value | ||
) | [static] |
Definition at line 964 of file ip_connection.cpp.
static void table_remove | ( | Table * | table, |
uint32_t | key | ||
) | [static] |
Definition at line 993 of file ip_connection.cpp.
static int thread_create | ( | Thread * | thread, |
ThreadFunction | function, | ||
void * | opaque | ||
) | [static] |
Definition at line 917 of file ip_connection.cpp.
static void thread_destroy | ( | Thread * | thread | ) | [static] |
Definition at line 924 of file ip_connection.cpp.
static bool thread_is_current | ( | Thread * | thread | ) | [static] |
Definition at line 928 of file ip_connection.cpp.
static void thread_join | ( | Thread * | thread | ) | [static] |
Definition at line 932 of file ip_connection.cpp.
static void thread_sleep | ( | int | msec | ) | [static] |
Definition at line 936 of file ip_connection.cpp.
static void* thread_wrapper | ( | void * | opaque | ) | [static] |
Definition at line 909 of file ip_connection.cpp.
const char BASE58_ALPHABET[] = "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ" [static] |
Definition at line 469 of file ip_connection.cpp.