- return send_request(cl, "%d %s %d %s", ADD_SUBNET, other->id, subnet->type, net2str(subnet));
-}
-
-int add_subnet_h(conn_list_t *cl)
-{
-}
-
-int send_del_subnet(conn_list_t *cl, conn_list_t *other, subnet_t *subnet)
-{
-cp
- return send_request(cl, "%d %s %d %s", DEL_SUBNET, other->id, subnet->type, net2str(subnet));
-}
-
-int del_subnet_h(conn_list_t *cl)
-{
-}
-
-/* New and closed connections notification */
-
-int send_add_host(conn_list_t *cl, conn_list_t *other)
-{
-cp
- return send_request(cl, "%d %s %lx:%d %s", ADD_HOST, other->id, other->address, other->port, opt2str(other->options));
-}
-
-int add_host_h(conn_list_t *cl)
-{
- char *options;
- conn_list_t *old, *new;
-cp
- new = new_conn_list();
-
- if(sscanf(cl->buffer, "%*d %as %lx:%d %as", &new->id, &new->address, &new->port, &options) != 4)
- {
- syslog(LOG_ERR, _("Got bad ADD_HOST from %s (%s)"), cl->id, cl->hostname);
- return -1;
- }
-
- /* Check if option string is valid */
-
- if((new->options = str2opt(options) == -1)
- {
- syslog(LOG_ERR, _("Got bad ADD_HOST from %s (%s): invalid option string"), cl->hostname);
- return -1;
- }
-
- /* Check if identity is a valid name */
-
- if(!check_id(new->id))
- {
- syslog(LOG_ERR, _("Got bad ADD_HOST from %s (%s): invalid identity name"), cl->id, cl->hostname);
- return -1;
- }
-
- /* Check if somebody tries to add ourself */
-
- if(!strcmp(new->id, myself->id))
- {
- syslog(LOG_ERR, _("Warning: got ADD_HOST from %s (%s) for ourself, restarting"), cl->id, cl->hostname);
- sighup = 1;
- return 0;
- }
-
- /* Fill in more of the new conn_list structure */
-
- new->hostname = hostlookup(htonl(new->address));
-
- /* Check if the new host already exists in the connnection list */
-
- if((old = lookup_id(id))