1 // Copyright 2019 Google LLC 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // https://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 // Contains the inner structure used by var_lenval. It will be allocated in the 16 // sandboxee's memory and is used for sharing buffers with varying sizes. 17 #ifndef SANDBOXED_API_LENVAL_CORE_H_ 18 #define SANDBOXED_API_LENVAL_CORE_H_ 19 20 #include <cstdint> 21 22 namespace sapi { 23 24 struct LenValStruct { LenValStructLenValStruct25 LenValStruct(uint64_t size, void* data) : size(size), data(data) {} 26 LenValStructLenValStruct27 LenValStruct() : LenValStruct(0, nullptr) {} 28 29 uint64_t size; 30 void* data; 31 }; 32 33 } // namespace sapi 34 35 #endif // SANDBOXED_API_LENVAL_CORE_H_ 36