mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
r18142@catbus: nickm | 2008-02-18 14:24:31 -0500
Our preferred spelling for a bitfield is "unsigned int", not "unsigned" or "uint8_t". svn:r13560
This commit is contained in:
parent
08f7842384
commit
3277e2a8ca
19
src/or/or.h
19
src/or/or.h
@ -802,17 +802,18 @@ typedef struct connection_t {
|
|||||||
* *_CONNECTION_MAGIC. */
|
* *_CONNECTION_MAGIC. */
|
||||||
|
|
||||||
uint8_t state; /**< Current state of this connection. */
|
uint8_t state; /**< Current state of this connection. */
|
||||||
uint8_t type:4; /**< What kind of connection is this? */
|
unsigned int type:4; /**< What kind of connection is this? */
|
||||||
uint8_t purpose:5; /**< Only used for DIR and EXIT types currently. */
|
unsigned int purpose:5; /**< Only used for DIR and EXIT types currently. */
|
||||||
|
|
||||||
/* The next fields are all one-bit booleans. Some are only applicable to
|
/* The next fields are all one-bit booleans. Some are only applicable to
|
||||||
* connection subtypes, but we hold them here anyway, to save space.
|
* connection subtypes, but we hold them here anyway, to save space.
|
||||||
*/
|
*/
|
||||||
unsigned read_blocked_on_bw:1; /**< Boolean: should we start reading again
|
unsigned int read_blocked_on_bw:1; /**< Boolean: should we start reading
|
||||||
* once the bandwidth throttler allows it? */
|
* again once the bandwidth throttler allows it? */
|
||||||
unsigned write_blocked_on_bw:1; /**< Boolean: should we start writing again
|
unsigned int write_blocked_on_bw:1; /**< Boolean: should we start writing
|
||||||
* once the bandwidth throttler allows reads? */
|
* again once the bandwidth throttler allows
|
||||||
unsigned hold_open_until_flushed:1; /**< Despite this connection's being
|
* reads? */
|
||||||
|
unsigned int hold_open_until_flushed:1; /**< Despite this connection's being
|
||||||
* marked for close, do we flush it
|
* marked for close, do we flush it
|
||||||
* before closing it? */
|
* before closing it? */
|
||||||
unsigned int inbuf_reached_eof:1; /**< Boolean: did read() return 0 on this
|
unsigned int inbuf_reached_eof:1; /**< Boolean: did read() return 0 on this
|
||||||
@ -1976,7 +1977,7 @@ typedef struct exit_redirect_t {
|
|||||||
|
|
||||||
uint32_t addr_dest;
|
uint32_t addr_dest;
|
||||||
uint16_t port_dest;
|
uint16_t port_dest;
|
||||||
unsigned is_redirect:1;
|
unsigned int is_redirect:1;
|
||||||
} exit_redirect_t;
|
} exit_redirect_t;
|
||||||
|
|
||||||
/* limits for TCP send and recv buffer size used for constrained sockets */
|
/* limits for TCP send and recv buffer size used for constrained sockets */
|
||||||
@ -2443,7 +2444,7 @@ struct socks_request_t {
|
|||||||
char address[MAX_SOCKS_ADDR_LEN]; /**< What address did the client ask to
|
char address[MAX_SOCKS_ADDR_LEN]; /**< What address did the client ask to
|
||||||
connect to/resolve? */
|
connect to/resolve? */
|
||||||
uint16_t port; /**< What port did the client ask to connect to? */
|
uint16_t port; /**< What port did the client ask to connect to? */
|
||||||
unsigned has_finished : 1; /**< Has the SOCKS handshake finished? Used to
|
unsigned int has_finished : 1; /**< Has the SOCKS handshake finished? Used to
|
||||||
* make sure we send back a socks reply for
|
* make sure we send back a socks reply for
|
||||||
* every connection. */
|
* every connection. */
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user