2011-12-04 14:44:31 +00:00
|
|
|
/* $FreeBSD$ */
|
|
|
|
|
|
|
|
#include <setjmp.h>
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#include "dhcpd.h"
|
|
|
|
|
|
|
|
extern jmp_buf env;
|
|
|
|
|
|
|
|
void
|
|
|
|
error(char *fmt, ...)
|
|
|
|
{
|
|
|
|
va_list ap;
|
|
|
|
|
|
|
|
va_start(ap, fmt);
|
|
|
|
vfprintf(stderr, fmt, ap);
|
|
|
|
va_end(ap);
|
|
|
|
fprintf(stderr, "\n");
|
|
|
|
|
|
|
|
longjmp(env, 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
warning(char *fmt, ...)
|
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
va_list ap;
|
|
|
|
|
|
|
|
va_start(ap, fmt);
|
|
|
|
ret = vfprintf(stderr, fmt, ap);
|
|
|
|
va_end(ap);
|
|
|
|
fprintf(stderr, "\n");
|
|
|
|
|
2011-12-30 14:41:47 +00:00
|
|
|
/*
|
|
|
|
* The original warning() would return "ret" here. We do this to
|
|
|
|
* check warnings explicitely.
|
|
|
|
*/
|
|
|
|
longjmp(env, 1);
|
2011-12-04 14:44:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
note(char *fmt, ...)
|
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
va_list ap;
|
|
|
|
|
|
|
|
va_start(ap, fmt);
|
|
|
|
ret = vfprintf(stderr, fmt, ap);
|
|
|
|
va_end(ap);
|
|
|
|
fprintf(stderr, "\n");
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
bootp(struct packet *packet)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
dhcp(struct packet *packet)
|
|
|
|
{
|
|
|
|
}
|