IIOD: Fix strcmp receiving NULL pointer as argument

It does not seem to be a problem with eglibc, but it is for other
systems (Solaris, for instance).

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
IIOD: Extend the READ command to handle channel attributes

It is now possible to read a device attribute like this:
READ <device> <attribute>

And also read a channel attribute like this:
READ <device> <channel> <attribute>

<device> and <channel> can refer to names or IDs of devices and
channels, respectively.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
IIOD: Extend the WRITE command to handle channel attributes

It is now possible to write a device attribute like this:
WRITE <device> <attribute> <value>

And also write a channel attribute like this:
WRITE <device> <channel> <attribute> <value>

<device> and <channel> can refer to names or IDs of devices and
channels, respectively.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
IIOD: Code cleanup in read_dev_attr / write_dev_attr functions

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
IIOD: Return the -EINVAL code on syntax error

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Network backend: Fix wrong command sent in write_channel_attr

The READ command was sent instead of the WRITE command.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Network backend: Added read_channel_attr backend function

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Network backend: Added write_channel_attr backend function

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