24#include <sys/socket.h>
28#define UNIX_PATH_MAX sizeof(((struct sockaddr_un *) NULL)->sun_path)
36 struct sockaddr_un addr;
41 (_(
"The socket name is too long. It may be no longer than %s bytes."),
46 memset (&addr, 0,
sizeof addr);
47 addr.sun_family = AF_UNIX;
50 int sock = socket (AF_UNIX, SOCK_STREAM, 0);
52 if (connect (sock, (
struct sockaddr *) &addr,
53 sizeof (
struct sockaddr_un)) < 0)
78 return recv (scb->
fd, scb->
buf, count, 0);
84 return send (scb->
fd, buf, count, 0);
void ser_base_async(struct serial *scb, int async_p)
void ser_base_print_tty_state(struct serial *scb, serial_ttystate ttystate, struct ui_file *stream)
void ser_base_raw(struct serial *scb)
int ser_base_set_tty_state(struct serial *scb, serial_ttystate ttystate)
serial_ttystate ser_base_get_tty_state(struct serial *scb)
int ser_base_drain_output(struct serial *scb)
int ser_base_send_break(struct serial *scb)
int ser_base_setbaudrate(struct serial *scb, int rate)
serial_ttystate ser_base_copy_tty_state(struct serial *scb, serial_ttystate ttystate)
int ser_base_write(struct serial *scb, const void *buf, size_t count)
int ser_base_setstopbits(struct serial *scb, int num)
int ser_base_flush_output(struct serial *scb)
int ser_base_flush_input(struct serial *scb)
int ser_base_readchar(struct serial *scb, int timeout)
int ser_base_setparity(struct serial *scb, int parity)
static int uds_open(struct serial *scb, const char *name)
static int uds_read_prim(struct serial *scb, size_t count)
static const struct serial_ops uds_ops
static int uds_write_prim(struct serial *scb, const void *buf, size_t count)
void _initialize_ser_socket()
static void uds_close(struct serial *scb)
void serial_add_interface(const struct serial_ops *optable)
unsigned char buf[BUFSIZ]