memcached.h   memcached.h 
skipping to change at line 18 skipping to change at line 18
*/ */
#ifndef __MEMCACHED_H__ #ifndef __MEMCACHED_H__
#define __MEMCACHED_H__ #define __MEMCACHED_H__
#include <stdlib.h> #include <stdlib.h>
#include <inttypes.h> #include <inttypes.h>
#include <sys/types.h> #include <sys/types.h>
#include <netinet/in.h> #include <netinet/in.h>
#ifdef MEMCACHED_INTERNAL
#include <libmemcached/libmemcached_config.h> #include <libmemcached/libmemcached_config.h>
#endif
#include <libmemcached/memcached_constants.h> #include <libmemcached/memcached_constants.h>
#include <libmemcached/memcached_types.h> #include <libmemcached/memcached_types.h>
#include <libmemcached/memcached_watchpoint.h> #include <libmemcached/memcached_watchpoint.h>
#include <libmemcached/memcached_get.h> #include <libmemcached/memcached_get.h>
#include <libmemcached/memcached_server.h> #include <libmemcached/memcached_server.h>
#include <libmemcached/memcached_string.h> #include <libmemcached/memcached_string.h>
#include <libmemcached/memcached_result.h> #include <libmemcached/memcached_result.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
skipping to change at line 40 skipping to change at line 42
/* These are Private and should not be used by applications */ /* These are Private and should not be used by applications */
#define MEMCACHED_VERSION_STRING_LENGTH 12 #define MEMCACHED_VERSION_STRING_LENGTH 12
/* string value */ /* string value */
struct memcached_continuum_item_st { struct memcached_continuum_item_st {
uint32_t index; uint32_t index;
uint32_t value; uint32_t value;
}; };
#define LIBMEMCACHED_VERSION_STRING "0.23" #define LIBMEMCACHED_VERSION_STRING "0.25"
struct memcached_stat_st { struct memcached_stat_st {
uint32_t pid; uint32_t pid;
uint32_t uptime; uint32_t uptime;
uint32_t threads; uint32_t threads;
uint32_t time; uint32_t time;
uint32_t pointer_size; uint32_t pointer_size;
uint32_t rusage_user_seconds; uint32_t rusage_user_seconds;
uint32_t rusage_user_microseconds; uint32_t rusage_user_microseconds;
uint32_t rusage_system_seconds; uint32_t rusage_system_seconds;
skipping to change at line 70 skipping to change at line 72
uint64_t cmd_set; uint64_t cmd_set;
uint64_t get_hits; uint64_t get_hits;
uint64_t get_misses; uint64_t get_misses;
uint64_t evictions; uint64_t evictions;
uint64_t bytes_read; uint64_t bytes_read;
uint64_t bytes_written; uint64_t bytes_written;
char version[MEMCACHED_VERSION_STRING_LENGTH]; char version[MEMCACHED_VERSION_STRING_LENGTH];
}; };
struct memcached_st { struct memcached_st {
uint8_t purging;
memcached_allocated is_allocated; memcached_allocated is_allocated;
memcached_server_st *hosts; memcached_server_st *hosts;
uint32_t number_of_hosts; uint32_t number_of_hosts;
uint32_t cursor_server; uint32_t cursor_server;
int cached_errno; int cached_errno;
uint32_t flags; uint32_t flags;
int send_size; int send_size;
int recv_size; int recv_size;
int32_t poll_timeout; int32_t poll_timeout;
int32_t connect_timeout; int32_t connect_timeout;
skipping to change at line 101 skipping to change at line 104
memcached_realloc_function call_realloc; memcached_realloc_function call_realloc;
memcached_trigger_key get_key_failure; memcached_trigger_key get_key_failure;
memcached_trigger_delete_key delete_trigger; memcached_trigger_delete_key delete_trigger;
char prefix_key[MEMCACHED_PREFIX_KEY_MAX_SIZE]; char prefix_key[MEMCACHED_PREFIX_KEY_MAX_SIZE];
size_t prefix_key_length; size_t prefix_key_length;
memcached_hash hash_continuum; memcached_hash hash_continuum;
uint32_t continuum_points_counter; uint32_t continuum_points_counter;
int32_t snd_timeout; int32_t snd_timeout;
int32_t rcv_timeout; int32_t rcv_timeout;
uint32_t server_failure_limit; uint32_t server_failure_limit;
uint32_t io_msg_watermark;
uint32_t io_bytes_watermark;
}; };
/* Public API */ /* Public API */
const char * memcached_lib_version(void); const char * memcached_lib_version(void);
memcached_st *memcached_create(memcached_st *ptr); memcached_st *memcached_create(memcached_st *ptr);
void memcached_free(memcached_st *ptr); void memcached_free(memcached_st *ptr);
memcached_st *memcached_clone(memcached_st *clone, memcached_st *ptr); memcached_st *memcached_clone(memcached_st *clone, memcached_st *ptr);
memcached_return memcached_delete(memcached_st *ptr, const char *key, size_ t key_length, memcached_return memcached_delete(memcached_st *ptr, const char *key, size_ t key_length,
skipping to change at line 134 skipping to change at line 139
memcached_return memcached_flush(memcached_st *ptr, time_t expiration); memcached_return memcached_flush(memcached_st *ptr, time_t expiration);
memcached_return memcached_verbosity(memcached_st *ptr, unsigned int verbos ity); memcached_return memcached_verbosity(memcached_st *ptr, unsigned int verbos ity);
void memcached_quit(memcached_st *ptr); void memcached_quit(memcached_st *ptr);
char *memcached_strerror(memcached_st *ptr, memcached_return rc); char *memcached_strerror(memcached_st *ptr, memcached_return rc);
memcached_return memcached_behavior_set(memcached_st *ptr, memcached_behavi or flag, uint64_t data); memcached_return memcached_behavior_set(memcached_st *ptr, memcached_behavi or flag, uint64_t data);
uint64_t memcached_behavior_get(memcached_st *ptr, memcached_behavior flag) ; uint64_t memcached_behavior_get(memcached_st *ptr, memcached_behavior flag) ;
/* Server Public functions */ /* Server Public functions */
memcached_return memcached_server_add_udp(memcached_st *ptr, memcached_return memcached_server_add_udp(memcached_st *ptr,
char *hostname, const char *hostname,
unsigned int port); unsigned int port);
memcached_return memcached_server_add_unix_socket(memcached_st *ptr, memcached_return memcached_server_add_unix_socket(memcached_st *ptr,
char *filename); const char *filename);
memcached_return memcached_server_add(memcached_st *ptr, char *hostname, memcached_return memcached_server_add(memcached_st *ptr, const char *hostna
me,
unsigned int port); unsigned int port);
memcached_return memcached_server_add_udp_with_weight(memcached_st *ptr,
const char *hostname,
unsigned int port,
uint32_t weight);
memcached_return memcached_server_add_unix_socket_with_weight(memcached_st
*ptr,
const char *f
ilename,
uint32_t weig
ht);
memcached_return memcached_server_add_with_weight(memcached_st *ptr, const
char *hostname,
unsigned int port,
uint32_t weight);
void memcached_server_list_free(memcached_server_st *ptr); void memcached_server_list_free(memcached_server_st *ptr);
memcached_return memcached_server_push(memcached_st *ptr, memcached_server_ st *list); memcached_return memcached_server_push(memcached_st *ptr, memcached_server_ st *list);
memcached_server_st *memcached_server_list_append(memcached_server_st *ptr, memcached_server_st *memcached_server_list_append(memcached_server_st *ptr,
char *hostname, unsigned int p const char *hostname,
ort, unsigned int port,
memcached_return *error); memcached_return *error);
memcached_server_st *memcached_server_list_append_with_weight(memcached_ser
ver_st *ptr,
const char *h
ostname,
unsigned int
port,
uint32_t weig
ht,
memcached_ret
urn *error);
unsigned int memcached_server_list_count(memcached_server_st *ptr); unsigned int memcached_server_list_count(memcached_server_st *ptr);
memcached_server_st *memcached_servers_parse(char *server_strings); memcached_server_st *memcached_servers_parse(char *server_strings);
char *memcached_stat_get_value(memcached_st *ptr, memcached_stat_st *stat, char *memcached_stat_get_value(memcached_st *ptr, memcached_stat_st *stat,
char *key, memcached_return *error); char *key, memcached_return *error);
char ** memcached_stat_get_keys(memcached_st *ptr, memcached_stat_st *stat, char ** memcached_stat_get_keys(memcached_st *ptr, memcached_stat_st *stat,
memcached_return *error); memcached_return *error);
memcached_return memcached_delete_by_key(memcached_st *ptr, memcached_return memcached_delete_by_key(memcached_st *ptr,
const char *master_key, size_t mas ter_key_length, const char *master_key, size_t mas ter_key_length,
skipping to change at line 171 skipping to change at line 193
void *context, void *context,
unsigned int number_of_callbac ks); unsigned int number_of_callbac ks);
memcached_return memcached_callback_set(memcached_st *ptr, memcached_return memcached_callback_set(memcached_st *ptr,
memcached_callback flag, memcached_callback flag,
void *data); void *data);
void *memcached_callback_get(memcached_st *ptr, void *memcached_callback_get(memcached_st *ptr,
memcached_callback flag, memcached_callback flag,
memcached_return *error); memcached_return *error);
memcached_return memcached_server_cursor(memcached_st *ptr,
memcached_server_function *callbac
k,
void *context,
unsigned int number_of_callbacks);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#include <libmemcached/memcached_storage.h> #include <libmemcached/memcached_storage.h>
#endif /* __MEMCACHED_H__ */ #endif /* __MEMCACHED_H__ */
 End of changes. 10 change blocks. 
13 lines changed or deleted 38 lines changed or added


 memcached_constants.h   memcached_constants.h 
skipping to change at line 23 skipping to change at line 23
extern "C" { extern "C" {
#endif #endif
/* Public defines */ /* Public defines */
#define MEMCACHED_DEFAULT_PORT 11211 #define MEMCACHED_DEFAULT_PORT 11211
#define MEMCACHED_MAX_KEY 251 /* We add one to have it null terminated */ #define MEMCACHED_MAX_KEY 251 /* We add one to have it null terminated */
#define MEMCACHED_MAX_BUFFER 8196 #define MEMCACHED_MAX_BUFFER 8196
#define MEMCACHED_MAX_HOST_LENGTH 64 #define MEMCACHED_MAX_HOST_LENGTH 64
#define MEMCACHED_MAX_HOST_SORT_LENGTH 86 /* Used for Ketama */ #define MEMCACHED_MAX_HOST_SORT_LENGTH 86 /* Used for Ketama */
#define MEMCACHED_POINTS_PER_SERVER 100 #define MEMCACHED_POINTS_PER_SERVER 100
#define MEMCACHED_POINTS_PER_SERVER_KETAMA 160
#define MEMCACHED_CONTINUUM_SIZE MEMCACHED_POINTS_PER_SERVER*100 /* This wo uld then set max hosts to 100 */ #define MEMCACHED_CONTINUUM_SIZE MEMCACHED_POINTS_PER_SERVER*100 /* This wo uld then set max hosts to 100 */
#define MEMCACHED_STRIDE 4 #define MEMCACHED_STRIDE 4
#define MEMCACHED_DEFAULT_TIMEOUT 1000 #define MEMCACHED_DEFAULT_TIMEOUT 1000
#define MEMCACHED_CONTINUUM_ADDITION 10 /* How many extra slots we should b uild for in the continuum */ #define MEMCACHED_CONTINUUM_ADDITION 10 /* How many extra slots we should b uild for in the continuum */
#define MEMCACHED_PREFIX_KEY_MAX_SIZE 12 #define MEMCACHED_PREFIX_KEY_MAX_SIZE 128
typedef enum { typedef enum {
MEMCACHED_SUCCESS, MEMCACHED_SUCCESS,
MEMCACHED_FAILURE, MEMCACHED_FAILURE,
MEMCACHED_HOST_LOOKUP_FAILURE, MEMCACHED_HOST_LOOKUP_FAILURE,
MEMCACHED_CONNECTION_FAILURE, MEMCACHED_CONNECTION_FAILURE,
MEMCACHED_CONNECTION_BIND_FAILURE, MEMCACHED_CONNECTION_BIND_FAILURE,
MEMCACHED_WRITE_FAILURE, MEMCACHED_WRITE_FAILURE,
MEMCACHED_READ_FAILURE, MEMCACHED_READ_FAILURE,
MEMCACHED_UNKNOWN_READ_FAILURE, MEMCACHED_UNKNOWN_READ_FAILURE,
skipping to change at line 69 skipping to change at line 70
MEMCACHED_FETCH_NOTFINISHED, MEMCACHED_FETCH_NOTFINISHED,
MEMCACHED_TIMEOUT, MEMCACHED_TIMEOUT,
MEMCACHED_BUFFERED, MEMCACHED_BUFFERED,
MEMCACHED_BAD_KEY_PROVIDED, MEMCACHED_BAD_KEY_PROVIDED,
MEMCACHED_MAXIMUM_RETURN /* Always add new error code before */ MEMCACHED_MAXIMUM_RETURN /* Always add new error code before */
} memcached_return; } memcached_return;
typedef enum { typedef enum {
MEMCACHED_DISTRIBUTION_MODULA, MEMCACHED_DISTRIBUTION_MODULA,
MEMCACHED_DISTRIBUTION_CONSISTENT, MEMCACHED_DISTRIBUTION_CONSISTENT,
MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA,
MEMCACHED_DISTRIBUTION_RANDOM
} memcached_server_distribution; } memcached_server_distribution;
typedef enum { typedef enum {
MEMCACHED_BEHAVIOR_NO_BLOCK, MEMCACHED_BEHAVIOR_NO_BLOCK,
MEMCACHED_BEHAVIOR_TCP_NODELAY, MEMCACHED_BEHAVIOR_TCP_NODELAY,
MEMCACHED_BEHAVIOR_HASH, MEMCACHED_BEHAVIOR_HASH,
MEMCACHED_BEHAVIOR_KETAMA, MEMCACHED_BEHAVIOR_KETAMA,
MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE, MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE,
MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE, MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE,
MEMCACHED_BEHAVIOR_CACHE_LOOKUPS, MEMCACHED_BEHAVIOR_CACHE_LOOKUPS,
skipping to change at line 94 skipping to change at line 96
MEMCACHED_BEHAVIOR_USER_DATA, MEMCACHED_BEHAVIOR_USER_DATA,
MEMCACHED_BEHAVIOR_SORT_HOSTS, MEMCACHED_BEHAVIOR_SORT_HOSTS,
MEMCACHED_BEHAVIOR_VERIFY_KEY, MEMCACHED_BEHAVIOR_VERIFY_KEY,
MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT, MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT,
MEMCACHED_BEHAVIOR_RETRY_TIMEOUT, MEMCACHED_BEHAVIOR_RETRY_TIMEOUT,
MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED,
MEMCACHED_BEHAVIOR_KETAMA_HASH, MEMCACHED_BEHAVIOR_KETAMA_HASH,
MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL,
MEMCACHED_BEHAVIOR_SND_TIMEOUT, MEMCACHED_BEHAVIOR_SND_TIMEOUT,
MEMCACHED_BEHAVIOR_RCV_TIMEOUT, MEMCACHED_BEHAVIOR_RCV_TIMEOUT,
MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT,
MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK,
MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK,
MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY
} memcached_behavior; } memcached_behavior;
typedef enum { typedef enum {
MEMCACHED_CALLBACK_PREFIX_KEY, MEMCACHED_CALLBACK_PREFIX_KEY,
MEMCACHED_CALLBACK_USER_DATA, MEMCACHED_CALLBACK_USER_DATA,
MEMCACHED_CALLBACK_CLEANUP_FUNCTION, MEMCACHED_CALLBACK_CLEANUP_FUNCTION,
MEMCACHED_CALLBACK_CLONE_FUNCTION, MEMCACHED_CALLBACK_CLONE_FUNCTION,
MEMCACHED_CALLBACK_MALLOC_FUNCTION, MEMCACHED_CALLBACK_MALLOC_FUNCTION,
MEMCACHED_CALLBACK_REALLOC_FUNCTION, MEMCACHED_CALLBACK_REALLOC_FUNCTION,
MEMCACHED_CALLBACK_FREE_FUNCTION, MEMCACHED_CALLBACK_FREE_FUNCTION,
skipping to change at line 118 skipping to change at line 123
typedef enum { typedef enum {
MEMCACHED_HASH_DEFAULT= 0, MEMCACHED_HASH_DEFAULT= 0,
MEMCACHED_HASH_MD5, MEMCACHED_HASH_MD5,
MEMCACHED_HASH_CRC, MEMCACHED_HASH_CRC,
MEMCACHED_HASH_FNV1_64, MEMCACHED_HASH_FNV1_64,
MEMCACHED_HASH_FNV1A_64, MEMCACHED_HASH_FNV1A_64,
MEMCACHED_HASH_FNV1_32, MEMCACHED_HASH_FNV1_32,
MEMCACHED_HASH_FNV1A_32, MEMCACHED_HASH_FNV1A_32,
MEMCACHED_HASH_HSIEH, MEMCACHED_HASH_HSIEH,
MEMCACHED_HASH_MURMUR MEMCACHED_HASH_MURMUR,
MEMCACHED_HASH_JENKINS
} memcached_hash; } memcached_hash;
typedef enum { typedef enum {
MEMCACHED_CONNECTION_UNKNOWN, MEMCACHED_CONNECTION_UNKNOWN,
MEMCACHED_CONNECTION_TCP, MEMCACHED_CONNECTION_TCP,
MEMCACHED_CONNECTION_UDP, MEMCACHED_CONNECTION_UDP,
MEMCACHED_CONNECTION_UNIX_SOCKET MEMCACHED_CONNECTION_UNIX_SOCKET
} memcached_connection; } memcached_connection;
typedef enum { typedef enum {
 End of changes. 5 change blocks. 
4 lines changed or deleted 10 lines changed or added


 memcached_server.h   memcached_server.h 
skipping to change at line 17 skipping to change at line 17
*/ */
#ifndef __MEMCACHED_SERVER_H__ #ifndef __MEMCACHED_SERVER_H__
#define __MEMCACHED_SERVER_H__ #define __MEMCACHED_SERVER_H__
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
struct memcached_server_st { struct memcached_server_st {
memcached_allocated is_allocated;
char hostname[MEMCACHED_MAX_HOST_LENGTH]; char hostname[MEMCACHED_MAX_HOST_LENGTH];
unsigned int port; unsigned int port;
int fd; int fd;
int cached_errno; int cached_errno;
unsigned int cursor_active; unsigned int cursor_active;
char write_buffer[MEMCACHED_MAX_BUFFER]; char write_buffer[MEMCACHED_MAX_BUFFER];
size_t write_buffer_offset; size_t write_buffer_offset;
char read_buffer[MEMCACHED_MAX_BUFFER]; char read_buffer[MEMCACHED_MAX_BUFFER];
size_t read_data_length; size_t read_data_length;
size_t read_buffer_length; size_t read_buffer_length;
skipping to change at line 39 skipping to change at line 40
struct addrinfo *address_info; struct addrinfo *address_info;
memcached_connection type; memcached_connection type;
uint8_t major_version; uint8_t major_version;
uint8_t minor_version; uint8_t minor_version;
uint8_t micro_version; uint8_t micro_version;
uint16_t count; uint16_t count;
time_t next_retry; time_t next_retry;
memcached_st *root; memcached_st *root;
uint64_t limit_maxbytes; uint64_t limit_maxbytes;
uint32_t server_failure_counter; uint32_t server_failure_counter;
uint32_t io_bytes_sent; /* # bytes sent since last read */
uint32_t weight;
}; };
#define memcached_server_count(A) (A)->number_of_hosts #define memcached_server_count(A) (A)->number_of_hosts
#define memcached_server_name(A,B) (B).hostname #define memcached_server_name(A,B) (B).hostname
#define memcached_server_port(A,B) (B).port #define memcached_server_port(A,B) (B).port
#define memcached_server_list(A) (A)->hosts #define memcached_server_list(A) (A)->hosts
#define memcached_server_response_count(A) (A)->cursor_active #define memcached_server_response_count(A) (A)->cursor_active
memcached_return memcached_server_cursor(memcached_st *ptr,
memcached_server_function *callbac
k,
void *context,
unsigned int number_of_callbacks);
memcached_server_st *memcached_server_by_key(memcached_st *ptr, const char
*key,
size_t key_length, memcached_r
eturn *error);
/* These should not currently be used by end users */
memcached_server_st *memcached_server_create(memcached_st *memc, memcached_
server_st *ptr);
void memcached_server_free(memcached_server_st *ptr);
memcached_server_st *memcached_server_clone(memcached_server_st *clone, mem
cached_server_st *ptr);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* __MEMCACHED_SERVER_H__ */ #endif /* __MEMCACHED_SERVER_H__ */
 End of changes. 3 change blocks. 
0 lines changed or deleted 21 lines changed or added


 memcached_string.h   memcached_string.h 
skipping to change at line 39 skipping to change at line 39
memcached_string_st *memcached_string_create(memcached_st *ptr, memcached_string_st *memcached_string_create(memcached_st *ptr,
memcached_string_st *string, memcached_string_st *string,
size_t initial_size); size_t initial_size);
memcached_return memcached_string_check(memcached_string_st *string, size_t need); memcached_return memcached_string_check(memcached_string_st *string, size_t need);
char *memcached_string_c_copy(memcached_string_st *string); char *memcached_string_c_copy(memcached_string_st *string);
memcached_return memcached_string_append_character(memcached_string_st *str ing, memcached_return memcached_string_append_character(memcached_string_st *str ing,
char character); char character);
memcached_return memcached_string_append(memcached_string_st *string, memcached_return memcached_string_append(memcached_string_st *string,
char *value, size_t length); char *value, size_t length);
size_t memcached_string_backspace(memcached_string_st *string, size_t remov e);
memcached_return memcached_string_reset(memcached_string_st *string); memcached_return memcached_string_reset(memcached_string_st *string);
void memcached_string_free(memcached_string_st *string); void memcached_string_free(memcached_string_st *string);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* __MEMCACHED_STRING_H__ */ #endif /* __MEMCACHED_STRING_H__ */
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/