]> git.neil.brown.name Git - gsm0710muxd.git/commit
Add support for control and access over Unix Domain sockets.
authorNeil Brown <neilb@suse.de>
Sat, 31 Jan 2009 20:13:27 +0000 (07:13 +1100)
committerNeil Brown <neilb@suse.de>
Sat, 31 Jan 2009 20:13:27 +0000 (07:13 +1100)
commit3412e4a2ecb1da4ab3063209cb621c17d5ec9180
tree5e7ad9bc8e8581847806f97e2ca9e0ddbcff1606
parent25bc5a121b76ab3af2065be7535766345692c146
Add support for control and access over Unix Domain sockets.

Listen on /var/run/gsm-mux for connections.
Over these connections access commands
  reset_modem
  get_power
  set_power {0,1}
  alloc_channel
  set_name
  exit
  connect

"connect" provides the significant new functionality.
Further IO on that socket goes directly to a channel to
the GSM controller.  That way we can talk to it without needing
to use a pty - simply open as socket and use that.

EOF from a socket appears as a zero-byte read, so make sure to
check for that in pseudo_device_read.
Writing to a closed socket produces SIGPIPE, so we definitely don't want to
exit on that case.
In general, SIGPIPE is quite uninteresting, so universally ignore it.

Signed-off-by: Neil Brown <neilb@suse.de>
src/gsm0710muxd.c