htons((unsigned short) (port))) % HASHSIZE)
Code_t
-client_register(ZNotice_t *notice,
- struct in_addr *host,
- Client **client_p,
- int wantdefaults)
+client_register(notice, host, client_p, wantdefaults)
+ ZNotice_t *notice;
+ struct in_addr *host;
+ Client **client_p;
+ int wantdefaults;
{
Client *client;
+ Code_t retval;
/* chain the client's host onto this server's host list */
if (!client)
return ENOMEM;
memset(&client->addr, 0, sizeof(struct sockaddr_in));
-#ifdef HAVE_KRB5
- client->session_keyblock = NULL;
-#else
-#ifdef HAVE_KRB4
+#ifdef KERBEROS
memset(&client->session_key, 0, sizeof(client->session_key));
-#endif
#endif
client->last_send = 0;
client->last_ack = NOW;
client->subs = NULL;
client->realm = NULL;
client->principal = make_string(notice->z_sender, 0);
- Client_insert(&client_bucket[INET_HASH(&client->addr.sin_addr,
- notice->z_port)], client);
+ LIST_INSERT(&client_bucket[INET_HASH(&client->addr.sin_addr,
+ notice->z_port)], client);
}
/* Add default subscriptions only if this is not resulting from a brain
*/
void
-client_deregister(Client *client,
- int flush)
+client_deregister(client, flush)
+ Client *client;
+ int flush;
{
- Client_delete(client);
+ LIST_DELETE(client);
nack_release(client);
subscr_cancel_client(client);
free_string(client->principal);
-#ifdef HAVE_KRB5
- if (client->session_keyblock)
- krb5_free_keyblock(Z_krb5_ctx, client->session_keyblock);
-#endif
if (flush)
uloc_flush_client(&client->addr);
free(client);
}
void
-client_flush_host(struct in_addr *host)
+client_flush_host(host)
+ struct in_addr *host;
{
int i;
Client *client, *next;
}
Code_t
-client_send_clients(void)
+client_send_clients()
{
int i;
Client *client;
*/
void
-client_dump_clients(FILE *fp)
+client_dump_clients(fp)
+ FILE *fp;
{
Client *client;
int i;
*/
Client *
-client_find(struct in_addr *host,
- unsigned int port)
+client_find(host, port)
+ struct in_addr *host;
+ unsigned int port;
{
Client *client;
long hashval;