computing-offload/qtfs/rexec/rexec_sock.h
Yikun Jiang a68570b5d9 Add computing offloading code
1. Add computing offloading code
2. Add script.md
3. Add virsh_demo.xml

Change-Id: Id9ef883e2f0eb727eb5448b9d1c47767f46b1021
Signed-off-by: Yikun Jiang <yikunkero@gmail.com>
2023-10-23 19:29:57 +08:00

41 lines
1.3 KiB
C

/******************************************************************************
* Copyright (c) Huawei Technologies Co., Ltd. 2023. All rights reserved.
* qtfs licensed under the Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
* PURPOSE.
* See the Mulan PSL v2 for more details.
* Author: Liqiang
* Create: 2023-03-20
* Description:
*******************************************************************************/
#ifndef __REXEC_SOCK_H__
#define __REXEC_SOCK_H__
enum {
REXEC_SOCK_CLIENT = 1,
REXEC_SOCK_SERVER,
};
#define UDS_SUN_PATH_LEN 108
struct rexec_conn_arg {
int cs; // client(1) or server(2)
int udstype; // DGRAM or STREAM
char sun_path[UDS_SUN_PATH_LEN];
int sockfd;
int connfd;
};
int rexec_sock_step_accept(int sock_fd);
int rexec_build_unix_connection(struct rexec_conn_arg *arg);
int rexec_sendmsg(int sockfd, char *msgbuf, int msglen, int scmfd);
int rexec_recvmsg(int sockfd, char *msgbuf, int msglen, int *scmfd, int flags);
#endif