summaryrefslogtreecommitdiff
path: root/source4/scripting/ejs
diff options
context:
space:
mode:
Diffstat (limited to 'source4/scripting/ejs')
-rw-r--r--source4/scripting/ejs/ejsrpc.c20
-rw-r--r--source4/scripting/ejs/ejsrpc.h4
2 files changed, 24 insertions, 0 deletions
diff --git a/source4/scripting/ejs/ejsrpc.c b/source4/scripting/ejs/ejsrpc.c
index 08a675a117..c41cdd972b 100644
--- a/source4/scripting/ejs/ejsrpc.c
+++ b/source4/scripting/ejs/ejsrpc.c
@@ -253,6 +253,26 @@ NTSTATUS ejs_push_string(struct ejs_rpc *ejs,
return mprSetVar(v, name, mprString(s));
}
+
+/*
+ pull a ipv4address (internally a string)
+*/
+NTSTATUS ejs_pull_ipv4address(struct ejs_rpc *ejs,
+ struct MprVar *v, const char *name, const char **s)
+{
+ return ejs_pull_string(ejs, v, name, s);
+}
+
+/*
+ push a ipv4address (internally a string)
+*/
+NTSTATUS ejs_push_ipv4address(struct ejs_rpc *ejs,
+ struct MprVar *v, const char *name, char * const *s)
+{
+ return ejs_push_string(ejs, v, name, *s);
+}
+
+
NTSTATUS ejs_pull_dom_sid(struct ejs_rpc *ejs,
struct MprVar *v, const char *name, struct dom_sid *r)
{
diff --git a/source4/scripting/ejs/ejsrpc.h b/source4/scripting/ejs/ejsrpc.h
index bc9a38fcb3..7288042120 100644
--- a/source4/scripting/ejs/ejsrpc.h
+++ b/source4/scripting/ejs/ejsrpc.h
@@ -93,6 +93,10 @@ NTSTATUS ejs_pull_string(struct ejs_rpc *ejs,
struct MprVar *v, const char *name, const char **s);
NTSTATUS ejs_push_string(struct ejs_rpc *ejs,
struct MprVar *v, const char *name, const char *s);
+NTSTATUS ejs_pull_ipv4address(struct ejs_rpc *ejs,
+ struct MprVar *v, const char *name, const char **s);
+NTSTATUS ejs_push_ipv4address(struct ejs_rpc *ejs,
+ struct MprVar *v, const char *name, char * const *s);
void ejs_set_constant_int(int eid, const char *name, int value);
void ejs_set_constant_string(int eid, const char *name, const char *value);