Change prototype of API function iio_device_create_buffer

It was previously accepting a boolean parameter to inform of the type
of the buffer: input or output.

This was causing more trouble than solving issues. As internally the
IIO device is opened as soon as the iio_buffer is created, with the
local backend it was not possible to create an input buffer and an
output buffer at the same time for the same device.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
iio_readdev: Update to match latest API

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
IIOD: Update to match latest API

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Local backend: Use the high-speed mmap interface when possible

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Revert "Local Mmap: Added backend"

Using a separate backend to use the mmap interface was not the smartest
idea; the mmap interface being now properly handled by the local backend
(in much less code), this one can be dropped.

This reverts commit d0ee394588147ac4c630b926d1f87662272ca63f.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Properly detect if get_buffer() can be used

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
IIOD: Fix endless loop

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Suppress error message for something that is not an error

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
IIOD: Use socket functions send/recv instead of stdio

The stdio functions don't seem to cope very well with sockets (maybe
because of the double buffering, in the C library and in the kernel).

To prevent headaches when implementing new functions, IIOD now uses the
POSIX functions send/recv to deal with sockets.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Set the default channel mask of a buffer to the device's channel mask

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
IIOD: Added first version of WRITEBUF command

Note that it does not yet handle the case where different clients
want to use the same channels.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>