PERFORCE change 125235 for review
Fredrik Lindberg
fli at FreeBSD.org
Thu Aug 16 12:53:15 PDT 2007
http://perforce.freebsd.org/chv.cgi?CH=125235
Change 125235 by fli at fli_nexus on 2007/08/16 19:52:24
Add commands to manipulate the record database.
Affected files ...
.. //depot/projects/soc2007/fli-mdns_sd/mdns/Makefile#2 edit
.. //depot/projects/soc2007/fli-mdns_sd/mdns/db.c#1 add
.. //depot/projects/soc2007/fli-mdns_sd/mdns/mdns.c#2 edit
Differences ...
==== //depot/projects/soc2007/fli-mdns_sd/mdns/Makefile#2 (text+ko) ====
@@ -1,4 +1,4 @@
-SRCS= mdns.c query.c
+SRCS= mdns.c query.c db.c
PROG= mdns
WARNS?= 4
LDADD= -lmdns -L../libmdns -static
==== //depot/projects/soc2007/fli-mdns_sd/mdns/mdns.c#2 (text+ko) ====
@@ -36,6 +36,7 @@
#include <mdns.h>
int query(struct mdns *, int, char **);
+int db(struct mdns *, int, char **);
static void
usage(char *exec)
@@ -43,6 +44,10 @@
printf("%s query [-v] [-i ifnam] [-f family] [-w sec] "
"[-c class] [-t type] name\n", exec);
+
+ printf("%s db [-i ifnam] `ident' name [-s] add|del `host'\n", exec);
+ printf("%s db [-i ifnam] `ident' res [-p] [-t ttl] add|del "
+ "`class' `type' `res'\n", exec);
}
typedef int (*sub_func)(struct mdns *, int, char **);
@@ -52,7 +57,8 @@
};
static struct subs subs[] = {
- { .name = "query", .func = query }
+ { .name = "query", .func = query },
+ { .name = "db", .func = db }
};
static int subs_size = sizeof(subs) / sizeof(struct subs);
More information about the p4-projects
mailing list