Go to the source code of this file.
Data Structures | |
struct | context |
The information we need to keep track of a client-server connection. More... | |
struct | element |
The representation of a tuple element in C code, in both the server and a C client. More... | |
struct | tuple |
An ordered sequence of data values: integers, floats, strings. If this is a template (used during GET and READ operations to match existing tuples), an element can also be a wildcard. More... | |
struct | tuple_list |
Convenience struct, for when somebody needs to make a quick list of tuples. More... | |
Defines | |
#define | va_list __gnuc_va_list |
#define | _DBG_(x) |
#define | ASSERT(cond) |
#define | DBGPRINTF(fmt, a...) |
#define | TELL(x) DBGPRINTF(#x " = %d\n", x) |
#define | MALLOC malloc |
#define | FREE free |
#define | EXIT() exit(1) |
#define | TIMEVAL_DIFF(before, after) |
#define | SERVERNAME_ENVVAR "LINUXTUPLES_HOST" |
#define | PORTNUMBER_ENVVAR "LINUXTUPLES_PORT" |
#define | I_AM_A_TUPLE 0x31415926 |
Enumerations | |
enum | message_op { PUT = 0, GET = 1, READ = 2, GET_NB = 3, READ_NB = 4, DUMP = 5, LOG = 6 } |
Functions | |
int | get_server_portnumber (struct context *ctx) |
void | print_element (struct element *e) |
void | print_tuple (struct tuple *s) |
tuple * | make_tuple (char *fmt,...) |
void | destroy_tuple (struct tuple *t) |
int | tuples_match (struct tuple *s, struct tuple *t) |
unsigned int | random_int (void) |
int | send_chunk (struct context *ctx, char *buf, int bytes_to_send) |
int | send_tuple (struct context *ctx, struct tuple *t) |
int | recv_chunk (struct context *ctx, char *buf, int size) |
tuple * | recv_tuple (struct context *ctx) |
int | put_tuple (struct tuple *s, struct context *ctx) |
tuple * | get_tuple (struct tuple *s, struct context *ctx) |
tuple * | read_tuple (struct tuple *s, struct context *ctx) |
tuple * | get_nb_tuple (struct tuple *s, struct context *ctx) |
tuple * | read_nb_tuple (struct tuple *s, struct context *ctx) |
tuple_list * | dump_tuple_space (struct tuple_list *templates, struct context *ctx) |
int | tuple_server_log (FILE *stream, struct context *ctx) |
int | tuple_int_field (struct tuple *s, int n) |
double | tuple_double_field (struct tuple *s, int n) |
char * | tuple_string_field (struct tuple *s, int *len, int n) |
Variables | |
int | i_am_server |
char | logbuf [8192] |
int | logptr |
|
|
|
Value: |
|
Value: _DBG_(fprintf(stderr, "%d " __FILE__ ":%d " fmt, \ debug_counter++, __LINE__, ##a)) Definition at line 52 of file tuple.h. Referenced by dump_tuple_space, get_tuple, handle_get_read, read_nb_tuple, and read_tuple. |
|
Definition at line 85 of file tuple.h. Referenced by main, make_tuple_internal, recv_tuple, tuple_double_field, tuple_field, tuple_int_field, and tuple_string_field. |
|
|
|
The only valid value for tuple::tag. Definition at line 174 of file tuple.h. Referenced by make_tuple_internal, PyTuple_to_LinuxTuple, and recv_tuple. |
|
|
|
Definition at line 98 of file tuple.h. Referenced by get_server_portnumber. |
|
Definition at line 97 of file tuple.h. Referenced by get_server_portnumber. |
|
|
|
Value: ((after.tv_sec - before.tv_sec) + \ 1.0e-6 * (after.tv_usec - before.tv_usec)) Definition at line 90 of file tuple.h. Referenced by main. |
|
|
|
|
|
Deallocate all the storage for a tuple. Definition at line 261 of file tuple.c. Referenced by ctx_get_read, ctx_put_tuple, handle_get_read, and main. |
|
Definition at line 753 of file tuple.c. Referenced by ctx_dump_tuple_space. |
|
|
|
Attempt to get the server name and port number from environment variables.
|
|
Definition at line 611 of file tuple.c. Referenced by main. |
|
Create a tuple or template, starting from a printf-style variable argument list. Definition at line 246 of file tuple.c. Referenced by main. |
|
Definition at line 101 of file tuple.c. References DUMP, GET, GET_NB, LOG, PUT, READ, and READ_NB. Referenced by print_tuple. |
|
Definition at line 151 of file tuple.c. Referenced by tuple_double_field, tuple_int_field, and tuple_string_field. |
|
Definition at line 583 of file tuple.c. Referenced by ctx_put_tuple, and main. |
|
Return a 32-bit random unsigned integer, gotten from /dev/urandom. |
|
|
|
|
|
Definition at line 437 of file tuple.c. Referenced by client_thread_func, dump_tuple_space, handle_dump_space, put_tuple, and recv_tuple. |
|
Definition at line 471 of file tuple.c. Referenced by client_thread_func, dump_tuple_space, get_nb_tuple, get_tuple, handle_dump_space, read_nb_tuple, and read_tuple. |
|
Definition at line 342 of file tuple.c. Referenced by dump_tuple_space, get_nb_tuple, get_tuple, handle_dump_space, handle_get_read, put_tuple, read_nb_tuple, read_tuple, send_tuple, and tuple_server_log. |
|
Definition at line 371 of file tuple.c. Referenced by dump_tuple_space, get_nb_tuple, get_tuple, handle_dump_space, handle_get_read, put_tuple, read_nb_tuple, and read_tuple. |
|
|
|
|
|
Definition at line 829 of file tuple.c. Referenced by ctx_tuple_server_log. |
|
Definition at line 919 of file tuple.c. Referenced by main. |
|
Definition at line 276 of file tuple.c. Referenced by handle_dump_space, and handle_get_read. |
|
This flag tells whether or not the current executable is the tuple server. If it is, then broken pipes on sockets should not crash the executable. |
|
Buffer for logging tuple activity.
|
|
Pointer into logbuf. |