ubus: use network order in ubus message header fields
authorEyal Birger <eyal.birger@gmail.com>
Mon, 15 Feb 2016 04:09:38 +0000 (06:09 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 28 Feb 2016 08:56:48 +0000 (09:56 +0100)
Changing the ubus message header fields from 'host' order to 'network' order
allows passing ubus messages between hosts with different endianity.

Example use (creating a ubus proxy):

on host A (e.g. big endian router already running ubusd), run:
$ socat TCP-LISTEN:5699,fork UNIX:/var/run/ubus.sock &

On host B (e.g. little endian development PC) run:
$ socat UNIX-LISTEN:/var/run/ubus.sock,fork TCP:<host A IP>:5699 &

Now ubus applications can be run on host B and seamlessly interact with ubus
applications on host A.

Signed-off-by: Eyal Birger <eyal.birger@gmail.com>

No differences found