Remove remnants of <foo>_t typedefs.
This commit is contained in:
parent
306274351b
commit
6d70eae633
|
@ -69,22 +69,6 @@ struct PreClient;
|
||||||
struct ListClient;
|
struct ListClient;
|
||||||
struct scache_entry;
|
struct scache_entry;
|
||||||
|
|
||||||
/*
|
|
||||||
* Atheme's coding standards require that we use BSD-style user-defined types
|
|
||||||
* for stuff. Fun! --nenolod
|
|
||||||
*/
|
|
||||||
typedef struct User user_t;
|
|
||||||
typedef struct Server server_t;
|
|
||||||
typedef struct Client client_t;
|
|
||||||
typedef struct LocalUser local_user_t;
|
|
||||||
typedef struct Listener listener_t;
|
|
||||||
typedef struct DNSReply dns_reply_t;
|
|
||||||
typedef struct Whowas whowas_entry_t;
|
|
||||||
typedef struct ConfItem conf_item_t;
|
|
||||||
typedef struct AuthRequest auth_request_t;
|
|
||||||
typedef struct PreClient pre_client_t;
|
|
||||||
typedef struct ListClient list_client_t;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Client structures
|
* Client structures
|
||||||
*/
|
*/
|
||||||
|
@ -100,7 +84,7 @@ struct User
|
||||||
|
|
||||||
struct Server
|
struct Server
|
||||||
{
|
{
|
||||||
user_t *user; /* who activated this connection */
|
struct User *user; /* who activated this connection */
|
||||||
char by[NICKLEN];
|
char by[NICKLEN];
|
||||||
rb_dlink_list servers;
|
rb_dlink_list servers;
|
||||||
rb_dlink_list users;
|
rb_dlink_list users;
|
||||||
|
@ -123,12 +107,12 @@ struct Client
|
||||||
{
|
{
|
||||||
rb_dlink_node node;
|
rb_dlink_node node;
|
||||||
rb_dlink_node lnode;
|
rb_dlink_node lnode;
|
||||||
user_t *user; /* ...defined, if this is a User */
|
struct User *user; /* ...defined, if this is a User */
|
||||||
server_t *serv; /* ...defined, if this is a server */
|
struct Server *serv; /* ...defined, if this is a server */
|
||||||
client_t *servptr; /* Points to server this Client is on */
|
struct Client *servptr; /* Points to server this Client is on */
|
||||||
client_t *from; /* == self, if Local Client, *NEVER* NULL! */
|
struct Client *from; /* == self, if Local Client, *NEVER* NULL! */
|
||||||
|
|
||||||
whowas_entry_t *whowas; /* Pointers to whowas structs */
|
struct Whowas *whowas; /* Pointers to whowas structs */
|
||||||
time_t tsinfo; /* TS on the nick, SVINFO on server */
|
time_t tsinfo; /* TS on the nick, SVINFO on server */
|
||||||
unsigned int umodes; /* opers, normal users subset */
|
unsigned int umodes; /* opers, normal users subset */
|
||||||
unsigned int flags; /* client flags */
|
unsigned int flags; /* client flags */
|
||||||
|
@ -173,8 +157,8 @@ struct Client
|
||||||
int received_number_of_privmsgs;
|
int received_number_of_privmsgs;
|
||||||
int flood_noticed;
|
int flood_noticed;
|
||||||
|
|
||||||
local_user_t *localClient;
|
struct LocalUser *localClient;
|
||||||
pre_client_t *preClient;
|
struct PreClient *preClient;
|
||||||
|
|
||||||
time_t large_ctcp_sent; /* ctcp to large group sent, relax flood checks */
|
time_t large_ctcp_sent; /* ctcp to large group sent, relax flood checks */
|
||||||
};
|
};
|
||||||
|
@ -219,8 +203,8 @@ struct LocalUser
|
||||||
unsigned int receiveK; /* Statistics: total k-bytes received */
|
unsigned int receiveK; /* Statistics: total k-bytes received */
|
||||||
unsigned short sendB; /* counters to count upto 1-k lots of bytes */
|
unsigned short sendB; /* counters to count upto 1-k lots of bytes */
|
||||||
unsigned short receiveB; /* sent and received. */
|
unsigned short receiveB; /* sent and received. */
|
||||||
listener_t *listener; /* listener accepted from */
|
struct Listener *listener; /* listener accepted from */
|
||||||
conf_item_t *att_conf; /* attached conf */
|
struct ConfItem *att_conf; /* attached conf */
|
||||||
struct server_conf *att_sconf;
|
struct server_conf *att_sconf;
|
||||||
|
|
||||||
struct rb_sockaddr_storage ip;
|
struct rb_sockaddr_storage ip;
|
||||||
|
@ -267,14 +251,14 @@ struct LocalUser
|
||||||
int sent_parsed; /* how many messages we've parsed in this second */
|
int sent_parsed; /* how many messages we've parsed in this second */
|
||||||
time_t last_knock; /* time of last knock */
|
time_t last_knock; /* time of last knock */
|
||||||
unsigned long random_ping;
|
unsigned long random_ping;
|
||||||
auth_request_t *auth_request;
|
struct AuthRequest *auth_request;
|
||||||
|
|
||||||
/* target change stuff */
|
/* target change stuff */
|
||||||
uint32_t targets[10]; /* targets were aware of (fnv32(use_id(target_p))) */
|
uint32_t targets[10]; /* targets were aware of (fnv32(use_id(target_p))) */
|
||||||
unsigned int targinfo[2]; /* cyclic array, no in use */
|
unsigned int targinfo[2]; /* cyclic array, no in use */
|
||||||
time_t target_last; /* last time we cleared a slot */
|
time_t target_last; /* last time we cleared a slot */
|
||||||
|
|
||||||
list_client_t *safelist_data;
|
struct ListClient *safelist_data;
|
||||||
|
|
||||||
char *mangledhost; /* non-NULL if host mangling module loaded and
|
char *mangledhost; /* non-NULL if host mangling module loaded and
|
||||||
applicable to this client */
|
applicable to this client */
|
||||||
|
@ -570,7 +554,7 @@ extern const char *get_client_name(struct Client *client, int show_ip);
|
||||||
extern const char *log_client_name(struct Client *, int);
|
extern const char *log_client_name(struct Client *, int);
|
||||||
extern int is_remote_connect(struct Client *);
|
extern int is_remote_connect(struct Client *);
|
||||||
extern void init_client(void);
|
extern void init_client(void);
|
||||||
extern client_t *make_client(struct Client *from);
|
extern struct Client *make_client(struct Client *from);
|
||||||
extern void free_pre_client(struct Client *client);
|
extern void free_pre_client(struct Client *client);
|
||||||
extern void free_client(struct Client *client);
|
extern void free_client(struct Client *client);
|
||||||
|
|
||||||
|
@ -583,10 +567,10 @@ extern void error_exit_client(struct Client *, int);
|
||||||
extern void count_local_client_memory(size_t * count, size_t * memory);
|
extern void count_local_client_memory(size_t * count, size_t * memory);
|
||||||
extern void count_remote_client_memory(size_t * count, size_t * memory);
|
extern void count_remote_client_memory(size_t * count, size_t * memory);
|
||||||
|
|
||||||
extern client_t *find_chasing(struct Client *, const char *, int *);
|
extern struct Client *find_chasing(struct Client *, const char *, int *);
|
||||||
extern client_t *find_person(const char *);
|
extern struct Client *find_person(const char *);
|
||||||
extern client_t *find_named_person(const char *);
|
extern struct Client *find_named_person(const char *);
|
||||||
extern client_t *next_client(struct Client *, const char *);
|
extern struct Client *next_client(struct Client *, const char *);
|
||||||
|
|
||||||
#define accept_message(s, t) ((s) == (t) || (rb_dlinkFind((s), &((t)->localClient->allow_list))))
|
#define accept_message(s, t) ((s) == (t) || (rb_dlinkFind((s), &((t)->localClient->allow_list))))
|
||||||
extern void del_all_accepts(struct Client *client_p);
|
extern void del_all_accepts(struct Client *client_p);
|
||||||
|
@ -597,8 +581,8 @@ extern int show_ip_conf(struct ConfItem *aconf, struct Client *target_p);
|
||||||
|
|
||||||
extern void initUser(void);
|
extern void initUser(void);
|
||||||
extern void free_user(struct User *, struct Client *);
|
extern void free_user(struct User *, struct Client *);
|
||||||
extern user_t *make_user(struct Client *);
|
extern struct User *make_user(struct Client *);
|
||||||
extern server_t *make_server(struct Client *);
|
extern struct Server *make_server(struct Client *);
|
||||||
extern void close_connection(struct Client *);
|
extern void close_connection(struct Client *);
|
||||||
extern void init_uid(void);
|
extern void init_uid(void);
|
||||||
extern char *generate_uid(void);
|
extern char *generate_uid(void);
|
||||||
|
|
|
@ -1670,14 +1670,14 @@ make_user(struct Client *client_p)
|
||||||
* side effects - add's an Server information block to a client
|
* side effects - add's an Server information block to a client
|
||||||
* if it was not previously allocated.
|
* if it was not previously allocated.
|
||||||
*/
|
*/
|
||||||
server_t *
|
struct Server *
|
||||||
make_server(struct Client *client_p)
|
make_server(struct Client *client_p)
|
||||||
{
|
{
|
||||||
server_t *serv = client_p->serv;
|
struct Server *serv = client_p->serv;
|
||||||
|
|
||||||
if(!serv)
|
if(!serv)
|
||||||
{
|
{
|
||||||
serv = (server_t *) rb_malloc(sizeof(server_t));
|
serv = (struct Server *) rb_malloc(sizeof(struct Server));
|
||||||
client_p->serv = serv;
|
client_p->serv = serv;
|
||||||
}
|
}
|
||||||
return client_p->serv;
|
return client_p->serv;
|
||||||
|
|
|
@ -52,14 +52,14 @@ static const struct in6_addr in6addr_any =
|
||||||
{ { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } };
|
{ { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } };
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static listener_t *ListenerPollList = NULL;
|
static struct Listener *ListenerPollList = NULL;
|
||||||
static int accept_precallback(rb_fde_t *F, struct sockaddr *addr, rb_socklen_t addrlen, void *data);
|
static int accept_precallback(rb_fde_t *F, struct sockaddr *addr, rb_socklen_t addrlen, void *data);
|
||||||
static void accept_callback(rb_fde_t *F, int status, struct sockaddr *addr, rb_socklen_t addrlen, void *data);
|
static void accept_callback(rb_fde_t *F, int status, struct sockaddr *addr, rb_socklen_t addrlen, void *data);
|
||||||
|
|
||||||
static listener_t *
|
static struct Listener *
|
||||||
make_listener(struct rb_sockaddr_storage *addr)
|
make_listener(struct rb_sockaddr_storage *addr)
|
||||||
{
|
{
|
||||||
listener_t *listener = (listener_t *) rb_malloc(sizeof(listener_t));
|
struct Listener *listener = (struct Listener *) rb_malloc(sizeof(struct Listener));
|
||||||
s_assert(0 != listener);
|
s_assert(0 != listener);
|
||||||
listener->name = me.name;
|
listener->name = me.name;
|
||||||
listener->F = NULL;
|
listener->F = NULL;
|
||||||
|
@ -70,7 +70,7 @@ make_listener(struct rb_sockaddr_storage *addr)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
free_listener(listener_t *listener)
|
free_listener(struct Listener *listener)
|
||||||
{
|
{
|
||||||
s_assert(NULL != listener);
|
s_assert(NULL != listener);
|
||||||
if(listener == NULL)
|
if(listener == NULL)
|
||||||
|
@ -82,7 +82,7 @@ free_listener(listener_t *listener)
|
||||||
ListenerPollList = listener->next;
|
ListenerPollList = listener->next;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
listener_t *prev = ListenerPollList;
|
struct Listener *prev = ListenerPollList;
|
||||||
for (; prev; prev = prev->next)
|
for (; prev; prev = prev->next)
|
||||||
{
|
{
|
||||||
if(listener == prev->next)
|
if(listener == prev->next)
|
||||||
|
@ -104,7 +104,7 @@ free_listener(listener_t *listener)
|
||||||
* returns "host.foo.org:6667" for a given listener
|
* returns "host.foo.org:6667" for a given listener
|
||||||
*/
|
*/
|
||||||
const char *
|
const char *
|
||||||
get_listener_name(const listener_t *listener)
|
get_listener_name(const struct Listener *listener)
|
||||||
{
|
{
|
||||||
static char buf[HOSTLEN + HOSTLEN + PORTNAMELEN + 4];
|
static char buf[HOSTLEN + HOSTLEN + PORTNAMELEN + 4];
|
||||||
int port = 0;
|
int port = 0;
|
||||||
|
@ -133,7 +133,7 @@ get_listener_name(const listener_t *listener)
|
||||||
void
|
void
|
||||||
show_ports(struct Client *source_p)
|
show_ports(struct Client *source_p)
|
||||||
{
|
{
|
||||||
listener_t *listener = 0;
|
struct Listener *listener = 0;
|
||||||
|
|
||||||
for (listener = ListenerPollList; listener; listener = listener->next)
|
for (listener = ListenerPollList; listener; listener = listener->next)
|
||||||
{
|
{
|
||||||
|
@ -165,7 +165,7 @@ show_ports(struct Client *source_p)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int
|
static int
|
||||||
inetport(listener_t *listener)
|
inetport(struct Listener *listener)
|
||||||
{
|
{
|
||||||
rb_fde_t *F;
|
rb_fde_t *F;
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -245,11 +245,11 @@ inetport(listener_t *listener)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static listener_t *
|
static struct Listener *
|
||||||
find_listener(struct rb_sockaddr_storage *addr)
|
find_listener(struct rb_sockaddr_storage *addr)
|
||||||
{
|
{
|
||||||
listener_t *listener = NULL;
|
struct Listener *listener = NULL;
|
||||||
listener_t *last_closed = NULL;
|
struct Listener *last_closed = NULL;
|
||||||
|
|
||||||
for (listener = ListenerPollList; listener; listener = listener->next)
|
for (listener = ListenerPollList; listener; listener = listener->next)
|
||||||
{
|
{
|
||||||
|
@ -307,7 +307,7 @@ find_listener(struct rb_sockaddr_storage *addr)
|
||||||
void
|
void
|
||||||
add_listener(int port, const char *vhost_ip, int family, int ssl)
|
add_listener(int port, const char *vhost_ip, int family, int ssl)
|
||||||
{
|
{
|
||||||
listener_t *listener;
|
struct Listener *listener;
|
||||||
struct rb_sockaddr_storage vaddr;
|
struct rb_sockaddr_storage vaddr;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -389,7 +389,7 @@ add_listener(int port, const char *vhost_ip, int family, int ssl)
|
||||||
* close_listener - close a single listener
|
* close_listener - close a single listener
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
close_listener(listener_t *listener)
|
close_listener(struct Listener *listener)
|
||||||
{
|
{
|
||||||
s_assert(listener != NULL);
|
s_assert(listener != NULL);
|
||||||
if(listener == NULL)
|
if(listener == NULL)
|
||||||
|
@ -414,8 +414,8 @@ close_listener(listener_t *listener)
|
||||||
void
|
void
|
||||||
close_listeners()
|
close_listeners()
|
||||||
{
|
{
|
||||||
listener_t *listener;
|
struct Listener *listener;
|
||||||
listener_t *listener_next = 0;
|
struct Listener *listener_next = 0;
|
||||||
/*
|
/*
|
||||||
* close all 'extra' listening ports we have
|
* close all 'extra' listening ports we have
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue