1 /*
2  * Copyright (C) 2021 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.android.virt.fs;
18 
19 /** @hide */
20 parcelable AuthFsConfig {
21     parcelable InputFdAnnotation {
22         /**
23          * File descriptor number to be passed to the program.  This is also the same file
24          * descriptor number used in the backend server.
25          */
26         int fd;
27     }
28 
29     parcelable OutputFdAnnotation {
30         /**
31          * File descriptor number to be passed to the program.  This is also the same file
32          * descriptor number used in the backend server.
33          */
34         int fd;
35     }
36 
37     parcelable InputDirFdAnnotation {
38         /**
39          * File descriptor number to be passed to the program.  This is also the same file
40          * descriptor number used in the backend server.
41          */
42         int fd;
43 
44         /**
45          * A manifest file that includes serialized protobuf of
46          * android.security.fsverity.FSVerityDigests. The path must be accessible to the
47          * IAuthFsService.
48          */
49         String manifestPath;
50 
51         /**
52          * Prefix path that should be stripped from the path in the manifest.
53          */
54         String prefix;
55     }
56 
57     parcelable OutputDirFdAnnotation {
58         /**
59          * File descriptor number to be passed to the program.  This is also the same file
60          * descriptor number used in the backend server.
61          */
62         int fd;
63     }
64 
65     /** Port of the filesystem backend. */
66     int port;
67 
68     /** Annotation for the remote input file descriptors. */
69     InputFdAnnotation[] inputFdAnnotations;
70 
71     /** Annotation for the remote output file descriptors. */
72     OutputFdAnnotation[] outputFdAnnotations;
73 
74     /** Annotation for the remote input directory descriptors. */
75     InputDirFdAnnotation[] inputDirFdAnnotations;
76 
77     /** Annotation for the remote output directory descriptors. */
78     OutputDirFdAnnotation[] outputDirFdAnnotations;
79 }
80