mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-12 20:39:59 +00:00
tools: acrn-crashlog: socket APIs for client/server
This patch is the initialization patch for socket protocol APIs. It adds the socket APIs for client and server. Signed-off-by: xiaojin2 <xiaojing.liu@intel.com> Signed-off-by: CHEN Gang <gang.c.chen@intel.com> Reviewed-by: Zhang Yanmin <yanmin.zhang@intel.com> Reviewed-by: Liu Chuansheng <chuansheng.liu@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com> Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com> Acked-by: Eddie Dong <Eddie.dong@intel.com>
This commit is contained in:
24
tools/acrn-crashlog/usercrash/include/protocol.h
Normal file
24
tools/acrn-crashlog/usercrash/include/protocol.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright (C) <2018> Intel Corporation
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#ifndef PROTOCOL_H
|
||||
#define PROTOCOL_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#define RESERVED_SOCKET_PREFIX "/tmp/"
|
||||
|
||||
int linux_get_control_socket(const char *name);
|
||||
|
||||
int socket_local_client(const char *name, int type);
|
||||
ssize_t send_fd(int sockfd, const void *data, size_t len, int fd);
|
||||
ssize_t recv_fd(int sockfd, void *data, size_t len, int *out_fd);
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user