Module Name:    src
Committed By:   jakllsch
Date:           Mon May 19 18:47:19 UTC 2014

Modified Files:
        src/lib/libnpf: npf.c npf.h

Log Message:
add npf_ext_param_string()


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/lib/libnpf/npf.c
cvs rdiff -u -r1.25 -r1.26 src/lib/libnpf/npf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libnpf/npf.c
diff -u src/lib/libnpf/npf.c:1.28 src/lib/libnpf/npf.c:1.29
--- src/lib/libnpf/npf.c:1.28	Thu Feb 13 03:34:41 2014
+++ src/lib/libnpf/npf.c	Mon May 19 18:47:19 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf.c,v 1.28 2014/02/13 03:34:41 rmind Exp $	*/
+/*	$NetBSD: npf.c,v 1.29 2014/05/19 18:47:19 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 2010-2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: npf.c,v 1.28 2014/02/13 03:34:41 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf.c,v 1.29 2014/05/19 18:47:19 jakllsch Exp $");
 
 #include <sys/types.h>
 #include <netinet/in_systm.h>
@@ -432,6 +432,13 @@ npf_ext_param_bool(nl_ext_t *ext, const 
 	prop_dictionary_set_bool(extdict, key, val);
 }
 
+void
+npf_ext_param_string(nl_ext_t *ext, const char *key, const char *val)
+{
+	prop_dictionary_t extdict = ext->nxt_dict;
+	prop_dictionary_set_cstring(extdict, key, val);
+}
+
 /*
  * RULE INTERFACE.
  */

Index: src/lib/libnpf/npf.h
diff -u src/lib/libnpf/npf.h:1.25 src/lib/libnpf/npf.h:1.26
--- src/lib/libnpf/npf.h:1.25	Thu Feb 13 03:34:41 2014
+++ src/lib/libnpf/npf.h	Mon May 19 18:47:19 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf.h,v 1.25 2014/02/13 03:34:41 rmind Exp $	*/
+/*	$NetBSD: npf.h,v 1.26 2014/05/19 18:47:19 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 2011-2014 The NetBSD Foundation, Inc.
@@ -87,6 +87,7 @@ int		npf_ruleset_flush(int, const char *
 nl_ext_t *	npf_ext_construct(const char *name);
 void		npf_ext_param_u32(nl_ext_t *, const char *, uint32_t);
 void		npf_ext_param_bool(nl_ext_t *, const char *, bool);
+void		npf_ext_param_string(nl_ext_t *, const char *, const char *);
 
 nl_rule_t *	npf_rule_create(const char *, uint32_t, const char *);
 int		npf_rule_setcode(nl_rule_t *, int, const void *, size_t);

Reply via email to