61 |
|
char by[NICKLEN]; /**< who activated this connection */ |
62 |
|
}; |
63 |
|
|
64 |
– |
/*! \brief SlinkRpl structure */ |
65 |
– |
struct SlinkRpl |
66 |
– |
{ |
67 |
– |
int command; |
68 |
– |
int datalen; |
69 |
– |
int gotdatalen; |
70 |
– |
int readdata; |
71 |
– |
unsigned char *data; |
72 |
– |
}; |
73 |
– |
|
74 |
– |
/*! \brief ZipStats structure */ |
75 |
– |
struct ZipStats |
76 |
– |
{ |
77 |
– |
uint64_t in; |
78 |
– |
uint64_t in_wire; |
79 |
– |
uint64_t out; |
80 |
– |
uint64_t out_wire; |
81 |
– |
double in_ratio; |
82 |
– |
double out_ratio; |
83 |
– |
}; |
84 |
– |
|
64 |
|
/*! \brief ListTask structure */ |
65 |
|
struct ListTask |
66 |
|
{ |
203 |
|
unsigned int caps; /**< capabilities bit-field */ |
204 |
|
unsigned int enc_caps; /**< cipher capabilities bit-field */ |
205 |
|
|
227 |
– |
#ifdef HAVE_LIBCRYPTO |
228 |
– |
struct EncCapability *in_cipher; |
229 |
– |
struct EncCapability *out_cipher; |
230 |
– |
|
231 |
– |
char in_key[CIPHERKEYLEN]; |
232 |
– |
char out_key[CIPHERKEYLEN]; |
233 |
– |
#endif |
234 |
– |
|
206 |
|
fde_t fd; |
236 |
– |
fde_t ctrlfd; /**< For servers: control fd used for sending commands |
237 |
– |
to servlink */ |
238 |
– |
|
239 |
– |
struct SlinkRpl slinkrpl; /**< slink reply being parsed */ |
240 |
– |
char *slinkq; /**< sendq for control data */ |
241 |
– |
int slinkq_ofs; /**< ofset into slinkq */ |
242 |
– |
int slinkq_len; /**< length remaining after slinkq_ofs */ |
243 |
– |
|
244 |
– |
struct ZipStats zipstats; |
207 |
|
|
208 |
|
/* Anti-flood stuff. We track how many messages were parsed and how |
209 |
|
* many we were allowed in the current second, and apply a simple |
289 |
|
#define FLAGS_NEEDID 0x0000000000000020 /**< auth{} block say must use ident return */ |
290 |
|
#define FLAGS_SENDQEX 0x0000000000000040 /**< Sendq exceeded */ |
291 |
|
#define FLAGS_IPHASH 0x0000000000000080 /**< iphashed this client */ |
292 |
< |
#define FLAGS_CRYPTIN 0x0000000000000100 /**< incoming data must be decrypted */ |
293 |
< |
#define FLAGS_CRYPTOUT 0x0000000000000200 /**< outgoing data must be encrypted */ |
294 |
< |
#define FLAGS_WAITAUTH 0x0000000000000400 /**< waiting for CRYPTLINK AUTH command */ |
295 |
< |
#define FLAGS_SERVLINK 0x0000000000000800 /**< servlink has servlink process */ |
292 |
> |
#define FLAGS_UNUSED_ 0x0000000000000100 /**< Unused */ |
293 |
> |
#define FLAGS_UNUSED__ 0x0000000000000200 /**< Unused */ |
294 |
> |
#define FLAGS_UNUSED_____ 0x0000000000000400 /**< Unused */ |
295 |
> |
#define FLAGS_UNUSED______ 0x0000000000000800 /**< Unused */ |
296 |
|
#define FLAGS_MARK 0x0000000000001000 /**< marked client */ |
297 |
|
#define FLAGS_CANFLOOD 0x0000000000002000 /**< client has the ability to flood */ |
298 |
|
#define FLAGS_EXEMPTGLINE 0x0000000000004000 /**< client can't be G-lined */ |
306 |
|
#define FLAGS_EOB 0x0000000000400000 /**< server has sent us an EOB */ |
307 |
|
#define FLAGS_HIDDEN 0x0000000000800000 /**< a hidden server. not shown in /links */ |
308 |
|
#define FLAGS_BLOCKED 0x0000000001000000 /**< must wait for COMM_SELECT_WRITE */ |
309 |
< |
#define FLAGS_SBLOCKED 0x0000000002000000 /**< slinkq is blocked */ |
309 |
> |
#define FLAGS_UNUSED_______ 0x0000000002000000 /**< Unused */ |
310 |
|
#define FLAGS_USERHOST 0x0000000004000000 /**< client is in userhost hash */ |
311 |
|
#define FLAGS_BURSTED 0x0000000008000000 /**< user was already bursted */ |
312 |
|
#define FLAGS_EXEMPTRESV 0x0000000010000000 /**< client is exempt from RESV */ |
392 |
|
#define SetDead(x) ((x)->flags |= FLAGS_DEADSOCKET) |
393 |
|
#define IsClosing(x) ((x)->flags & FLAGS_CLOSING) |
394 |
|
#define SetClosing(x) ((x)->flags |= FLAGS_CLOSING) |
433 |
– |
#define IsCryptIn(x) ((x)->flags & FLAGS_CRYPTIN) |
434 |
– |
#define SetCryptIn(x) ((x)->flags |= FLAGS_CRYPTIN) |
435 |
– |
#define IsCryptOut(x) ((x)->flags & FLAGS_CRYPTOUT) |
436 |
– |
#define SetCryptOut(x) ((x)->flags |= FLAGS_CRYPTOUT) |
437 |
– |
#define IsWaitAuth(x) ((x)->flags & FLAGS_WAITAUTH) |
438 |
– |
#define SetWaitAuth(x) ((x)->flags |= FLAGS_WAITAUTH) |
439 |
– |
#define ClearWaitAuth(x) ((x)->flags &= ~FLAGS_WAITAUTH) |
440 |
– |
#define HasServlink(x) ((x)->flags & FLAGS_SERVLINK) |
441 |
– |
#define SetServlink(x) ((x)->flags |= FLAGS_SERVLINK) |
395 |
|
#define SetCanFlood(x) ((x)->flags |= FLAGS_CANFLOOD) |
396 |
|
#define IsCanFlood(x) ((x)->flags & FLAGS_CANFLOOD) |
397 |
|
#define IsDefunct(x) ((x)->flags & (FLAGS_DEADSOCKET|FLAGS_CLOSING| \ |
453 |
|
#define IsSendqBlocked(x) ((x)->flags & FLAGS_BLOCKED) |
454 |
|
#define SetSendqBlocked(x) ((x)->flags |= FLAGS_BLOCKED) |
455 |
|
#define ClearSendqBlocked(x) ((x)->flags &= ~FLAGS_BLOCKED) |
503 |
– |
#define IsSlinkqBlocked(x) ((x)->flags & FLAGS_SBLOCKED) |
504 |
– |
#define SetSlinkqBlocked(x) ((x)->flags |= FLAGS_SBLOCKED) |
505 |
– |
#define ClearSlinkqBlocked(x) ((x)->flags &= ~FLAGS_SBLOCKED) |
456 |
|
|
457 |
|
#define IsCaptured(x) ((x)->handler == DUMMY_HANDLER) |
458 |
|
#define SetCaptured(x) ((x)->handler = DUMMY_HANDLER) |