projects
/
oweals
/
ubus.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
libubus: mark ubus socket with close-on-exec
[oweals/ubus.git]
/
libubus-internal.h
diff --git
a/libubus-internal.h
b/libubus-internal.h
index b58fb1d4c2f5730463eac69895aead623c046200..0eddf9e1b382a03fa0e36068009abc9ff8b110b0 100644
(file)
--- a/
libubus-internal.h
+++ b/
libubus-internal.h
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 2011-201
2
Felix Fietkau <nbd@openwrt.org>
+ * Copyright (C) 2011-201
4
Felix Fietkau <nbd@openwrt.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 2.1
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 2.1
@@
-14,17
+14,26
@@
#ifndef __LIBUBUS_IO_H
#define __LIBUBUS_IO_H
#ifndef __LIBUBUS_IO_H
#define __LIBUBUS_IO_H
-#define __hidden __attribute__((visibility ("hidden")))
-
extern struct blob_buf b;
extern struct blob_buf b;
+extern const struct ubus_method watch_method;
+
+static inline struct blob_attr *
+ubus_msghdr_data(struct ubus_msghdr *hdr)
+{
+ struct ubus_msghdr_buf *hdrbuf = container_of(hdr, struct ubus_msghdr_buf, hdr);
+ return hdrbuf->data;
+}
struct blob_attr **ubus_parse_msg(struct blob_attr *msg);
void ubus_handle_data(struct uloop_fd *u, unsigned int events);
int ubus_send_msg(struct ubus_context *ctx, uint32_t seq,
struct blob_attr **ubus_parse_msg(struct blob_attr *msg);
void ubus_handle_data(struct uloop_fd *u, unsigned int events);
int ubus_send_msg(struct ubus_context *ctx, uint32_t seq,
- struct blob_attr *msg, int cmd, uint32_t peer);
-void ubus_process_msg(struct ubus_context *ctx, struct ubus_msghdr *hdr);
-void ubus_process_invoke(struct ubus_context *ctx, struct ubus_msghdr *hdr);
+ struct blob_attr *msg, int cmd, uint32_t peer, int fd);
+void ubus_process_msg(struct ubus_context *ctx, struct ubus_msghdr *hdr, int fd);
int __hidden ubus_start_request(struct ubus_context *ctx, struct ubus_request *req,
struct blob_attr *msg, int cmd, uint32_t peer);
int __hidden ubus_start_request(struct ubus_context *ctx, struct ubus_request *req,
struct blob_attr *msg, int cmd, uint32_t peer);
+void ubus_process_obj_msg(struct ubus_context*ctx, struct ubus_msghdr *hdr);
+void ubus_process_req_msg(struct ubus_context *ctx, struct ubus_msghdr *hdr, int fd);
+void __hidden ubus_poll_data(struct ubus_context *ctx, int timeout);
+
#endif
#endif