PERFORCE change 125247 for review
Fredrik Lindberg
fli at FreeBSD.org
Thu Aug 16 16:28:48 PDT 2007
http://perforce.freebsd.org/chv.cgi?CH=125247
Change 125247 by fli at fli_nexus on 2007/08/16 23:27:47
Add cache flush/view commands.
Affected files ...
.. //depot/projects/soc2007/fli-mdns_sd/mdns/Makefile#3 edit
.. //depot/projects/soc2007/fli-mdns_sd/mdns/cache.c#1 add
.. //depot/projects/soc2007/fli-mdns_sd/mdns/mdns.c#3 edit
Differences ...
==== //depot/projects/soc2007/fli-mdns_sd/mdns/Makefile#3 (text+ko) ====
@@ -1,4 +1,4 @@
-SRCS= mdns.c query.c db.c
+SRCS= mdns.c query.c db.c cache.c
PROG= mdns
WARNS?= 4
LDADD= -lmdns -L../libmdns -static
==== //depot/projects/soc2007/fli-mdns_sd/mdns/mdns.c#3 (text+ko) ====
@@ -37,6 +37,7 @@
int query(struct mdns *, int, char **);
int db(struct mdns *, int, char **);
+int cache(struct mdns *, int, char **);
static void
usage(char *exec)
@@ -48,6 +49,8 @@
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);
+
+ printf("%s cache [-i ifnam] view|flush\n", exec);
}
typedef int (*sub_func)(struct mdns *, int, char **);
@@ -58,7 +61,8 @@
static struct subs subs[] = {
{ .name = "query", .func = query },
- { .name = "db", .func = db }
+ { .name = "db", .func = db },
+ { .name = "cache", .func = cache }
};
static int subs_size = sizeof(subs) / sizeof(struct subs);
More information about the p4-projects
mailing list