blob: 8cfc822e6552d86ad066a3bfc7bb503998361ff7 [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"
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);
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);
};
};