diff options
author | dumbbell <dumbbell@FreeBSD.org> | 2011-12-04 14:44:31 +0000 |
---|---|---|
committer | dumbbell <dumbbell@FreeBSD.org> | 2011-12-04 14:44:31 +0000 |
commit | ff8355fd0adf45a0a0be9afa0e0791db4f1251ff (patch) | |
tree | 7f5d2448f6dafab8a79f813bf2da0674512a632a /tools/regression/sbin/dhclient/fake.c | |
parent | e2bfeee07672c9a691d9ee0ac15d92150d93d457 (diff) | |
download | FreeBSD-src-ff8355fd0adf45a0a0be9afa0e0791db4f1251ff.zip FreeBSD-src-ff8355fd0adf45a0a0be9afa0e0791db4f1251ff.tar.gz |
Support domain-search in dhclient(8)
The "domain-search" option (option 119) allows a DHCP server to publish
a list of implicit domain suffixes used during name lookup. This option
is described in RFC 3397.
For instance, if the domain-search option says:
".example.org .example.com"
and one wants to resolve "foobar", the resolver will try:
1. "foobar.example.org"
2. "foobar.example.com"
The file /etc/resolv.conf is updated with a "search" directive if the
DHCP server provides "domain-search".
A regression test suite is included in this patch under
tools/regression/sbin/dhclient.
PR: bin/151940
Sponsored by Yakaz (http://www.yakaz.com)
Diffstat (limited to 'tools/regression/sbin/dhclient/fake.c')
-rw-r--r-- | tools/regression/sbin/dhclient/fake.c | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/tools/regression/sbin/dhclient/fake.c b/tools/regression/sbin/dhclient/fake.c new file mode 100644 index 0000000..91d57b6 --- /dev/null +++ b/tools/regression/sbin/dhclient/fake.c @@ -0,0 +1,60 @@ +/* $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"); + + return ret; +} + +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) +{ +} |