liberpal-skeleton-v3.c 802 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
#include <stdio.h>
#include <unistd.h>
#include <sys/wait.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <linux/types.h>
#include <sys/stat.h>
#include "liberpal-skeleton.h"
#include "sgx_call.h"
#include "defines.h"

int pal_get_version(void)
{
	return 3;
}

int pal_init(pal_attr_t *attr)
{
	return __pal_init(attr);
}

int pal_create_process(pal_create_process_args *args)
{
	return __pal_create_process(args);
}

int pal_exec(pal_exec_args *attr)
{
	return wait4child(attr);
}

int pal_get_local_report(void *targetinfo, int targetinfo_len, void *report, int* report_len) {
	return __pal_get_local_report(targetinfo, targetinfo_len, report, report_len);
}

int pal_kill(int pid, int sig)
{
	return __pal_kill(pid, sig);
}

int pal_destroy(void)
{
	return __pal_destory();
}