| 40 |
|
#define IDLEN 12 /* this is the maximum length, not the actual |
| 41 |
|
generated length; DO NOT CHANGE! */ |
| 42 |
|
|
| 43 |
– |
/* |
| 44 |
– |
* pre declare structs |
| 45 |
– |
*/ |
| 46 |
– |
struct AccessItem; |
| 47 |
– |
struct Listener; |
| 48 |
– |
struct Client; |
| 49 |
– |
struct LocalUser; |
| 50 |
– |
|
| 51 |
– |
|
| 43 |
|
|
| 44 |
|
/*! \brief addr_mask_type enumeration */ |
| 45 |
|
enum addr_mask_type |
| 72 |
|
unsigned int topicts_max; |
| 73 |
|
}; |
| 74 |
|
|
| 84 |
– |
/*! \brief Client structure */ |
| 85 |
– |
struct Client |
| 86 |
– |
{ |
| 87 |
– |
dlink_node node; |
| 88 |
– |
dlink_node lnode; /**< Used for Server->servers/users */ |
| 89 |
– |
|
| 90 |
– |
struct LocalUser *localClient; |
| 91 |
– |
struct Client *hnext; /**< For client hash table lookups by name */ |
| 92 |
– |
struct Client *idhnext; /**< For SID hash table lookups by sid */ |
| 93 |
– |
struct Server *serv; /**< ...defined, if this is a server */ |
| 94 |
– |
struct Client *servptr; /**< Points to server this Client is on */ |
| 95 |
– |
struct Client *from; /**< == self, if Local Client, *NEVER* NULL! */ |
| 96 |
– |
char *away; /**< Client's AWAY message. Can be set/unset via AWAY command */ |
| 97 |
– |
|
| 98 |
– |
time_t tsinfo; /**< TS on the nick, SVINFO on server */ |
| 99 |
– |
time_t servicestamp; /**< Last time client has been identified for its nick */ |
| 100 |
– |
|
| 101 |
– |
unsigned int flags; /**< client flags */ |
| 102 |
– |
unsigned int umodes; /**< opers, normal users subset */ |
| 103 |
– |
unsigned int hopcount; /**< number of servers to this 0 = local */ |
| 104 |
– |
unsigned int status; /**< Client type */ |
| 105 |
– |
unsigned int handler; /**< Handler index */ |
| 106 |
– |
|
| 107 |
– |
dlink_list whowas; |
| 108 |
– |
dlink_list channel; /**< chain of channel pointer blocks */ |
| 109 |
– |
|
| 110 |
– |
char name[HOSTLEN + 1]; /**< unique name for a client nick or host */ |
| 111 |
– |
char id[IDLEN + 1]; /**< client ID, unique ID per client */ |
| 112 |
– |
|
| 113 |
– |
/* |
| 114 |
– |
* client->username is the username from ident or the USER message, |
| 115 |
– |
* If the client is idented the USER message is ignored, otherwise |
| 116 |
– |
* the username part of the USER message is put here prefixed with a |
| 117 |
– |
* tilde depending on the auth{} block. Once a client has registered, |
| 118 |
– |
* this field should be considered read-only. |
| 119 |
– |
*/ |
| 120 |
– |
char username[USERLEN + 1]; /* client's username */ |
| 121 |
– |
|
| 122 |
– |
/* |
| 123 |
– |
* client->host contains the resolved name or ip address |
| 124 |
– |
* as a string for the user, it may be fiddled with for oper spoofing etc. |
| 125 |
– |
* once it's changed the *real* address goes away. This should be |
| 126 |
– |
* considered a read-only field after the client has registered. |
| 127 |
– |
*/ |
| 128 |
– |
char host[HOSTLEN + 1]; /* client's hostname */ |
| 129 |
– |
|
| 130 |
– |
/* |
| 131 |
– |
* client->info for unix clients will normally contain the info from the |
| 132 |
– |
* gcos field in /etc/passwd but anything can go here. |
| 133 |
– |
*/ |
| 134 |
– |
char info[REALLEN + 1]; /* Free form additional client info */ |
| 135 |
– |
|
| 136 |
– |
/* |
| 137 |
– |
* client->sockhost contains the ip address gotten from the socket as a |
| 138 |
– |
* string, this field should be considered read-only once the connection |
| 139 |
– |
* has been made. (set in s_bsd.c only) |
| 140 |
– |
*/ |
| 141 |
– |
char sockhost[HOSTIPLEN + 1]; /* This is the host name from the |
| 142 |
– |
socket ip address as string */ |
| 143 |
– |
}; |
| 144 |
– |
|
| 75 |
|
/*! \brief LocalUser structure |
| 76 |
|
* |
| 77 |
|
* Allocated only for local clients, that are directly connected |
| 150 |
|
char* auth_oper; /**< Operator to become if they supply the response.*/ |
| 151 |
|
}; |
| 152 |
|
|
| 153 |
+ |
/*! \brief Client structure */ |
| 154 |
+ |
struct Client |
| 155 |
+ |
{ |
| 156 |
+ |
dlink_node node; |
| 157 |
+ |
dlink_node lnode; /**< Used for Server->servers/users */ |
| 158 |
+ |
|
| 159 |
+ |
struct LocalUser *localClient; |
| 160 |
+ |
struct Client *hnext; /**< For client hash table lookups by name */ |
| 161 |
+ |
struct Client *idhnext; /**< For SID hash table lookups by sid */ |
| 162 |
+ |
struct Server *serv; /**< ...defined, if this is a server */ |
| 163 |
+ |
struct Client *servptr; /**< Points to server this Client is on */ |
| 164 |
+ |
struct Client *from; /**< == self, if Local Client, *NEVER* NULL! */ |
| 165 |
+ |
char *away; /**< Client's AWAY message. Can be set/unset via AWAY command */ |
| 166 |
+ |
|
| 167 |
+ |
time_t tsinfo; /**< TS on the nick, SVINFO on server */ |
| 168 |
+ |
time_t servicestamp; /**< Last time client has been identified for its nick */ |
| 169 |
+ |
|
| 170 |
+ |
unsigned int flags; /**< client flags */ |
| 171 |
+ |
unsigned int umodes; /**< opers, normal users subset */ |
| 172 |
+ |
unsigned int hopcount; /**< number of servers to this 0 = local */ |
| 173 |
+ |
unsigned int status; /**< Client type */ |
| 174 |
+ |
unsigned int handler; /**< Handler index */ |
| 175 |
+ |
|
| 176 |
+ |
dlink_list whowas; |
| 177 |
+ |
dlink_list channel; /**< chain of channel pointer blocks */ |
| 178 |
+ |
|
| 179 |
+ |
char name[HOSTLEN + 1]; /**< unique name for a client nick or host */ |
| 180 |
+ |
char id[IDLEN + 1]; /**< client ID, unique ID per client */ |
| 181 |
+ |
|
| 182 |
+ |
/* |
| 183 |
+ |
* client->username is the username from ident or the USER message, |
| 184 |
+ |
* If the client is idented the USER message is ignored, otherwise |
| 185 |
+ |
* the username part of the USER message is put here prefixed with a |
| 186 |
+ |
* tilde depending on the auth{} block. Once a client has registered, |
| 187 |
+ |
* this field should be considered read-only. |
| 188 |
+ |
*/ |
| 189 |
+ |
char username[USERLEN + 1]; /* client's username */ |
| 190 |
+ |
|
| 191 |
+ |
/* |
| 192 |
+ |
* client->host contains the resolved name or ip address |
| 193 |
+ |
* as a string for the user, it may be fiddled with for oper spoofing etc. |
| 194 |
+ |
* once it's changed the *real* address goes away. This should be |
| 195 |
+ |
* considered a read-only field after the client has registered. |
| 196 |
+ |
*/ |
| 197 |
+ |
char host[HOSTLEN + 1]; /* client's hostname */ |
| 198 |
+ |
|
| 199 |
+ |
/* |
| 200 |
+ |
* client->info for unix clients will normally contain the info from the |
| 201 |
+ |
* gcos field in /etc/passwd but anything can go here. |
| 202 |
+ |
*/ |
| 203 |
+ |
char info[REALLEN + 1]; /* Free form additional client info */ |
| 204 |
+ |
|
| 205 |
+ |
/* |
| 206 |
+ |
* client->sockhost contains the ip address gotten from the socket as a |
| 207 |
+ |
* string, this field should be considered read-only once the connection |
| 208 |
+ |
* has been made. (set in s_bsd.c only) |
| 209 |
+ |
*/ |
| 210 |
+ |
char sockhost[HOSTIPLEN + 1]; /* This is the host name from the |
| 211 |
+ |
socket ip address as string */ |
| 212 |
+ |
}; |
| 213 |
+ |
|
| 214 |
|
/* |
| 215 |
|
* status macros. |
| 216 |
|
*/ |