blob: cd668b71c0e8a33e5a4bdbb4678546d4b1818efd [file] [log] [blame]
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
enclave {
include "inc/stat.h"
include "sys/uio.h"
include "time.h"
from "sgx_mem.edl" import *;
trusted {
/* define ECALLs here. */
};
untrusted {
size_t u_read_ocall([out] int *error, int fd, [user_check] void *buf, size_t count);
size_t u_pread64_ocall([out] int *error, int fd, [user_check] void *buf, size_t count, int64_t offset);
size_t u_readv_ocall([out] int *error, int fd, [in, count=iovcnt] const struct iovec *iov, int iovcnt);
size_t u_preadv64_ocall([out] int *error, int fd, [in, count=iovcnt] const struct iovec *iov, int iovcnt, int64_t offset);
size_t u_write_ocall([out] int *error, int fd, [user_check] const void *buf, size_t count);
size_t u_pwrite64_ocall([out] int *error, int fd, [user_check] const void *buf, size_t count, int64_t offset);
size_t u_writev_ocall([out] int *error, int fd, [in, count=iovcnt] const struct iovec *iov, int iovcnt);
size_t u_pwritev64_ocall([out] int *error, int fd, [in, count=iovcnt] const struct iovec *iov, int iovcnt, int64_t offset);
size_t u_sendfile_ocall([out] int *error, int out_fd, int in_fd, [in, out] int64_t *offset, size_t count);
size_t u_copy_file_range_ocall([out] int *error, int fd_in, [in, out] int64_t *off_in, int fd_out, [in, out] int64_t *off_out, size_t len, unsigned int flags);
size_t u_splice_ocall([out] int *error, int fd_in, [in, out] int64_t *off_in, int fd_out, [in, out] int64_t *off_out, size_t len, unsigned int flags);
int u_fcntl_arg0_ocall([out] int *error, int fd, int cmd);
int u_fcntl_arg1_ocall([out] int *error, int fd, int cmd, int arg);
int u_ioctl_arg0_ocall([out] int *error, int fd, int request);
int u_ioctl_arg1_ocall([out] int *error, int fd, int request, [in, out] int *arg);
int u_close_ocall([out] int *error, int fd);
int u_isatty_ocall([out] int *error, int fd);
int u_dup_ocall([out] int *error, int oldfd);
int u_eventfd_ocall([out] int *error, unsigned int initval, int flags);
int u_futimens_ocall([out] int *error, int fd, [in, count=2] const struct timespec *times);
};
};