xref: /aosp_15_r20/external/cronet/components/nacl/loader/nacl_helper_linux.h (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 // Copyright 2013 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef COMPONENTS_NACL_LOADER_NACL_HELPER_LINUX_H_
6 #define COMPONENTS_NACL_LOADER_NACL_HELPER_LINUX_H_
7 
8 namespace nacl {
9 
10 // A mini-zygote specifically for Native Client. This file defines
11 // constants used to implement communication between the nacl_helper
12 // process and the Chrome zygote.
13 
14 #define kNaClMaxIPCMessageLength 2048
15 
16 // Used by Helper to tell Zygote it has started successfully.
17 #define kNaClHelperStartupAck "NACLHELPER_OK"
18 
19 enum NaClZygoteIPCCommand {
20   kNaClForkRequest,
21   kNaClGetTerminationStatusRequest,
22 };
23 
24 // The next set of constants define global Linux file descriptors.
25 // For communications between NaCl loader and browser.
26 // See also content/common/zygote_main_linux.cc and
27 // https://chromium.googlesource.com/chromium/src/+/main/docs/linux/zygote.md
28 
29 // For communications between NaCl loader and zygote.
30 #define kNaClZygoteDescriptor 3
31 
32 } // namespace nacl
33 
34 #endif  // COMPONENTS_NACL_LOADER_NACL_HELPER_LINUX_H_
35