|
CLD
0.1git
|
#include <sys/types.h>#include <stdbool.h>#include <glib.h>#include <cld_msg_rpc.h>#include <cld_common.h>#include <hail_log.h>Data Structures | |
| struct | cldc_call_opts |
| per-operation application options More... | |
| struct | cldc_node_metadata |
| struct | cldc_pkt_info |
| struct | cldc_msg |
| an outgoing message, from client to server More... | |
| struct | cldc_fh |
| an open file handle associated with a session More... | |
| struct | cldc_ops |
| application-supplied facilities More... | |
| struct | cldc_session |
| a single CLD client session More... | |
| struct | cldc_host |
| Information for a single CLD server host. More... | |
| struct | cldc_udp |
| A UDP implementation of the CLD client protocol. More... | |
| struct | cld_dirent_cur |
Functions | |
| int | cldc_receive_pkt (struct cldc_session *sess, const void *net_addr, size_t net_addrlen, const void *buf, size_t buflen) |
| Packet received from remote host. More... | |
| void | cldc_init (void) |
| int | cldc_new_sess (const struct cldc_ops *ops, const struct cldc_call_opts *copts, const void *addr, size_t addr_len, const char *user, const char *secret_key, void *private, struct cldc_session **sess_out) |
| void | cldc_kill_sess (struct cldc_session *sess) |
| int | cldc_end_sess (struct cldc_session *sess, const struct cldc_call_opts *copts) |
| int | cldc_nop (struct cldc_session *sess, const struct cldc_call_opts *copts) |
| int | cldc_del (struct cldc_session *sess, const struct cldc_call_opts *copts, const char *pathname) |
| int | cldc_open (struct cldc_session *sess, const struct cldc_call_opts *copts, const char *pathname, uint32_t open_mode, uint32_t events, struct cldc_fh **fh_out) |
| int | cldc_close (struct cldc_fh *fh, const struct cldc_call_opts *copts) |
| int | cldc_unlock (struct cldc_fh *fh, const struct cldc_call_opts *copts) |
| int | cldc_lock (struct cldc_fh *fh, const struct cldc_call_opts *copts, uint32_t lock_flags, bool wait_for_lock) |
| int | cldc_put (struct cldc_fh *fh, const struct cldc_call_opts *copts, const void *data, size_t data_len) |
| int | cldc_get (struct cldc_fh *fh, const struct cldc_call_opts *copts, bool metadata_only) |
| int | cldc_dirent_count (const void *data, size_t data_len) |
| int | cldc_dirent_first (struct cld_dirent_cur *dc) |
| int | cldc_dirent_next (struct cld_dirent_cur *dc) |
| void | cldc_dirent_cur_init (struct cld_dirent_cur *dc, const void *buf, size_t buflen) |
| void | cldc_dirent_cur_fini (struct cld_dirent_cur *dc) |
| char * | cldc_dirent_name (struct cld_dirent_cur *dc) |
| void | cldc_copts_get_data (const struct cldc_call_opts *copts, char **data, size_t *data_len) |
| void | cldc_copts_get_metadata (const struct cldc_call_opts *copts, struct cldc_node_metadata *md) |
| void | cldc_udp_free (struct cldc_udp *udp) |
| int | cldc_udp_new (const char *hostname, int port, struct cldc_udp **udp_out) |
| int | cldc_udp_receive_pkt (struct cldc_udp *udp) |
| int | cldc_udp_pkt_send (void *private, const void *addr, size_t addrlen, const void *buf, size_t buflen) |
| int | cldc_getaddr (GList **host_list, const char *thishost, struct hail_log *log) |
| int | cldc_saveaddr (struct cldc_host *hp, unsigned int priority, unsigned int weight, unsigned int port, unsigned int nlen, const char *name, struct hail_log *log) |
| int cldc_close | ( | struct cldc_fh * | fh, |
| const struct cldc_call_opts * | copts | ||
| ) |
| void cldc_copts_get_data | ( | const struct cldc_call_opts * | copts, |
| char ** | data, | ||
| size_t * | data_len | ||
| ) |
| void cldc_copts_get_metadata | ( | const struct cldc_call_opts * | copts, |
| struct cldc_node_metadata * | md | ||
| ) |
| int cldc_del | ( | struct cldc_session * | sess, |
| const struct cldc_call_opts * | copts, | ||
| const char * | pathname | ||
| ) |
| int cldc_dirent_count | ( | const void * | data, |
| size_t | data_len | ||
| ) |
| void cldc_dirent_cur_fini | ( | struct cld_dirent_cur * | dc | ) |
| void cldc_dirent_cur_init | ( | struct cld_dirent_cur * | dc, |
| const void * | buf, | ||
| size_t | buflen | ||
| ) |
| int cldc_dirent_first | ( | struct cld_dirent_cur * | dc | ) |
| char* cldc_dirent_name | ( | struct cld_dirent_cur * | dc | ) |
| int cldc_dirent_next | ( | struct cld_dirent_cur * | dc | ) |
| int cldc_end_sess | ( | struct cldc_session * | sess, |
| const struct cldc_call_opts * | copts | ||
| ) |
| int cldc_get | ( | struct cldc_fh * | fh, |
| const struct cldc_call_opts * | copts, | ||
| bool | metadata_only | ||
| ) |
| int cldc_getaddr | ( | GList ** | host_list, |
| const char * | thishost, | ||
| struct hail_log * | log | ||
| ) |
| void cldc_init | ( | void | ) |
| void cldc_kill_sess | ( | struct cldc_session * | sess | ) |
| int cldc_lock | ( | struct cldc_fh * | fh, |
| const struct cldc_call_opts * | copts, | ||
| uint32_t | lock_flags, | ||
| bool | wait_for_lock | ||
| ) |
| int cldc_new_sess | ( | const struct cldc_ops * | ops, |
| const struct cldc_call_opts * | copts, | ||
| const void * | addr, | ||
| size_t | addr_len, | ||
| const char * | user, | ||
| const char * | secret_key, | ||
| void * | private, | ||
| struct cldc_session ** | sess_out | ||
| ) |
| int cldc_nop | ( | struct cldc_session * | sess, |
| const struct cldc_call_opts * | copts | ||
| ) |
| int cldc_open | ( | struct cldc_session * | sess, |
| const struct cldc_call_opts * | copts, | ||
| const char * | pathname, | ||
| uint32_t | open_mode, | ||
| uint32_t | events, | ||
| struct cldc_fh ** | fh_out | ||
| ) |
| int cldc_put | ( | struct cldc_fh * | fh, |
| const struct cldc_call_opts * | copts, | ||
| const void * | data, | ||
| size_t | data_len | ||
| ) |
| int cldc_receive_pkt | ( | struct cldc_session * | sess, |
| const void * | net_addr, | ||
| size_t | net_addrlen, | ||
| const void * | buf, | ||
| size_t | buflen | ||
| ) |
Packet received from remote host.
Called by app when a packet is received from a remote host over the network.
| sess | Session associated with received packet |
| net_addr | Opaque network address |
| net_addrlen | Size of opaque network address |
| buf | Pointer to data buffer containing packet |
| buflen | Length of received packet |
| int cldc_saveaddr | ( | struct cldc_host * | hp, |
| unsigned int | priority, | ||
| unsigned int | weight, | ||
| unsigned int | port, | ||
| unsigned int | nlen, | ||
| const char * | name, | ||
| struct hail_log * | log | ||
| ) |
| void cldc_udp_free | ( | struct cldc_udp * | udp | ) |
| int cldc_udp_new | ( | const char * | hostname, |
| int | port, | ||
| struct cldc_udp ** | udp_out | ||
| ) |
| int cldc_udp_pkt_send | ( | void * | private, |
| const void * | addr, | ||
| size_t | addrlen, | ||
| const void * | buf, | ||
| size_t | buflen | ||
| ) |
| int cldc_udp_receive_pkt | ( | struct cldc_udp * | udp | ) |
| int cldc_unlock | ( | struct cldc_fh * | fh, |
| const struct cldc_call_opts * | copts | ||
| ) |
1.8.7