~yolanda.robla/ubuntu/trusty/memcached/add_distribution

« back to all changes in this revision

Viewing changes to memcached.h

  • Committer: Bazaar Package Importer
  • Author(s): David Martínez Moreno
  • Date: 2010-05-12 11:41:22 UTC
  • mfrom: (1.1.7 upstream) (3.3.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100512114122-e2dphwiezevuny1t
Tags: 1.4.5-1
* New upstream release.  Main changes since 1.4.2 are:
  New features:
  - Support for SASL authentication.
  - New script damemtop - a memcached top.
  - Slab optimizations.
  - New stats, for reclaimed memory and SASL events.
  Bugs fixed:
  - Malicious input can crash server (CVE-2010-1152).  Closes: #579913.
  - Fixed several problems with slab handling and growth.
  - Provide better error reporting.
  - Fix get stats accounting.
  - Fixed backwards compatibility with delete 0.
  - Documentation fixes.
  - Various build fixes, among others, fixed FTBFS with gcc-4.5 (closes:
    #565033).
* Refreshed and renamed 01_init_script_compliant_with_LSB.patch.
* Fixed lintian warnings by adding $remote_fs to init.d script.
* Removed non-existent document (doc/memory_management.txt).
* debian/control: Bumped Standards-Version to 3.8.4 (no changes).

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
#include <netinet/in.h>
16
16
#include <event.h>
17
17
#include <netdb.h>
18
 
#include <stdbool.h>
19
 
#include <stdint.h>
20
18
#include <pthread.h>
 
19
#include <unistd.h>
21
20
 
22
21
#include "protocol_binary.h"
23
22
#include "cache.h"
24
23
 
 
24
#include "sasl_defs.h"
 
25
 
25
26
/** Maximum length of a key. */
26
27
#define KEY_MAX_LENGTH 250
27
28
 
155
156
    bin_reading_stat,
156
157
    bin_reading_del_header,
157
158
    bin_reading_incr_header,
158
 
    bin_read_flush_exptime
 
159
    bin_read_flush_exptime,
 
160
    bin_reading_sasl_auth,
 
161
    bin_reading_sasl_auth_data
159
162
};
160
163
 
161
164
enum protocol {
216
219
    uint64_t          bytes_written;
217
220
    uint64_t          flush_cmds;
218
221
    uint64_t          conn_yields; /* # of yields for connections (-R option)*/
 
222
    uint64_t          auth_cmds;
 
223
    uint64_t          auth_errors;
219
224
    struct slab_stats slab_stats[MAX_NUMBER_OF_SLAB_CLASSES];
220
225
};
221
226
 
235
240
    uint64_t      get_hits;
236
241
    uint64_t      get_misses;
237
242
    uint64_t      evictions;
 
243
    uint64_t      reclaimed;
238
244
    time_t        started;          /* when the process was started */
239
245
    bool          accepting_conns;  /* whether we are currently accepting */
240
246
    uint64_t      listen_disabled_num;
268
274
    enum protocol binding_protocol;
269
275
    int backlog;
270
276
    int item_size_max;        /* Maximum item size, and upper end for slabs */
 
277
    bool sasl;              /* SASL on/off */
271
278
};
272
279
 
273
280
extern struct stats stats;
324
331
typedef struct conn conn;
325
332
struct conn {
326
333
    int    sfd;
 
334
    sasl_conn_t *sasl_conn;
327
335
    enum conn_states  state;
328
336
    enum bin_substates substate;
329
337
    struct event event;