1 #include <sys/socket.h>
19 struct sockaddr_un sock;
23 memset(&sock, 0,
sizeof(sock));
24 sock.sun_family = AF_UNIX;
26 sd = socket(AF_UNIX, SOCK_DGRAM, 0);
29 fcntl(sd, F_SETFL, O_NONBLOCK);
30 if (bind(sd, (
struct sockaddr *)&sock,
sizeof(sock)) != 0) {
43 struct sockaddr_un dst;
45 socklen_t socket_size =
sizeof(
struct sockaddr_un);
57 (
struct sockaddr *)&dst, &socket_size);
61 sizeof(
struct ge_console), 0, (
struct sockaddr *)&dst,
void ge_fill_console_data(struct ge *ge, struct ge_console *console)
static int console_socket_fd
static int console_socket_check(struct ge *ge, void *ctx)
static const char socket_path[]
static int console_socket_init(struct ge *ge, void *ctx)
static struct ge_peri console_socket
int console_socket_register(struct ge *ge)
int ge_register_peri(struct ge *ge, struct ge_peri *p)
void ge_log(ge_log_type type, const char *format,...)
Log message.
@ LOG_DEBUG
General detailed debug information.
int(* init)(struct ge *, void *)
The entire state of the emulated system, including registers, memory, peripherals and timings.