Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libnpf add npf_ext_param_string()
details: https://anonhg.NetBSD.org/src/rev/42e78f80fc21
branches: trunk
changeset: 329326:42e78f80fc21
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Mon May 19 18:47:19 2014 +0000
description:
add npf_ext_param_string()
diffstat:
lib/libnpf/npf.c | 11 +++++++++--
lib/libnpf/npf.h | 3 ++-
2 files changed, 11 insertions(+), 3 deletions(-)
diffs (49 lines):
diff -r 5b4d1e9ccd66 -r 42e78f80fc21 lib/libnpf/npf.c
--- a/lib/libnpf/npf.c Mon May 19 18:45:51 2014 +0000
+++ b/lib/libnpf/npf.c Mon May 19 18:47:19 2014 +0000
@@ -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 @@
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.
*/
diff -r 5b4d1e9ccd66 -r 42e78f80fc21 lib/libnpf/npf.h
--- a/lib/libnpf/npf.h Mon May 19 18:45:51 2014 +0000
+++ b/lib/libnpf/npf.h Mon May 19 18:47:19 2014 +0000
@@ -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 @@
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);
Home |
Main Index |
Thread Index |
Old Index