X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=libubus-internal.h;h=0eddf9e1b382a03fa0e36068009abc9ff8b110b0;hb=b79e808944675040ec2cbc2534592a5d4e62477b;hp=e4a58256121f0987d7dc8fbd066b04e9a0b70376;hpb=bbd3fbc9cc914abfca9030253c0f2a68e1144c85;p=oweals%2Fubus.git diff --git a/libubus-internal.h b/libubus-internal.h index e4a5825..0eddf9e 100644 --- a/libubus-internal.h +++ b/libubus-internal.h @@ -17,6 +17,13 @@ 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,