#endif /* not lint */
/*
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1998,1999 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* Extern. */
#include "port_before.h"
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <isc/assertions.h>
#include <isc/eventlib.h>
#include <isc/memcluster.h>
#include "ctl_p.h"
#include "port_after.h"
/* Constants. */
const char * const ctl_sevnames[] = {
"debug", "warning", "error"
};
/* Public. */
/*%
* ctl_logger()
* if ctl_startup()'s caller didn't specify a logger, this one
* is used. this pollutes stderr with all kinds of trash so it will
* probably never be used in real applications.
*/
void
}
int
if (!allocated_p(*buf)) {
return (-1);
}
return (0);
}
void
}
const char *
{
case AF_INET6: {
(const struct sockaddr_in6 *) sa;
== NULL) {
return (punt);
}
return (punt);
}
return (buf);
}
case AF_INET: {
(const struct sockaddr_in *) sa;
== NULL) {
return (punt);
}
return (punt);
}
return (buf);
}
#ifndef NO_SOCKADDR_UN
case AF_UNIX: {
(const struct sockaddr_un *) sa;
if (x > size)
x = size;
return (buf);
}
#endif
default:
return (punt);
}
}
void
case AF_INET6:
*((struct sockaddr_in6 *)dst) =
*((const struct sockaddr_in6 *)src);
break;
case AF_INET:
*((struct sockaddr_in *)dst) =
*((const struct sockaddr_in *)src);
break;
#ifndef NO_SOCKADDR_UN
case AF_UNIX:
*((struct sockaddr_un *)dst) =
*((const struct sockaddr_un *)src);
break;
#endif
default:
break;
}
}
/*! \file */