Initial commit.
This commit is contained in:
+36
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
|
||||
#if NET_4_0
|
||||
#include "il2cpp-object-internals.h"
|
||||
|
||||
namespace il2cpp
|
||||
{
|
||||
namespace icalls
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace Microsoft
|
||||
{
|
||||
namespace Win32
|
||||
{
|
||||
class LIBIL2CPP_CODEGEN_API NativeMethods
|
||||
{
|
||||
public:
|
||||
static bool CloseProcess(intptr_t handle);
|
||||
static bool GetExitCodeProcess(intptr_t processHandle, int32_t* exitCode);
|
||||
static bool GetProcessTimes(intptr_t handle, int64_t* creation, int64_t* exit, int64_t* kernel, int64_t* user);
|
||||
static bool GetProcessWorkingSetSize(intptr_t handle, intptr_t* min, intptr_t* max);
|
||||
static bool SetPriorityClass(intptr_t handle, int32_t priorityClass);
|
||||
static bool SetProcessWorkingSetSize(intptr_t handle, intptr_t min, intptr_t max);
|
||||
static bool TerminateProcess(intptr_t processHandle, int32_t exitCode);
|
||||
static int32_t GetCurrentProcessId();
|
||||
static int32_t GetPriorityClass(intptr_t handle);
|
||||
static int32_t WaitForInputIdle(intptr_t handle, int32_t milliseconds);
|
||||
static intptr_t GetCurrentProcess();
|
||||
};
|
||||
} // namespace Win32
|
||||
} // namespace Microsoft
|
||||
} // namespace System
|
||||
} // namespace icalls
|
||||
} // namespace il2cpp
|
||||
#endif
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
|
||||
#if NET_4_0
|
||||
|
||||
struct Il2CppString;
|
||||
|
||||
namespace il2cpp
|
||||
{
|
||||
namespace icalls
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace Mono
|
||||
{
|
||||
namespace Net
|
||||
{
|
||||
namespace Security
|
||||
{
|
||||
class LIBIL2CPP_CODEGEN_API MonoTlsProviderFactory
|
||||
{
|
||||
public:
|
||||
static bool IsBtlsSupported();
|
||||
static Il2CppString* GetDefaultProviderForPlatform();
|
||||
};
|
||||
} // namespace Security
|
||||
} // namespace Net
|
||||
} // namespace Mono
|
||||
} // namespace System
|
||||
} // namespace icalls
|
||||
} // namespace il2cpp
|
||||
|
||||
#endif
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include "il2cpp-config.h"
|
||||
|
||||
struct Il2CppString;
|
||||
|
||||
namespace il2cpp
|
||||
{
|
||||
namespace icalls
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace ComponentModel
|
||||
{
|
||||
class LIBIL2CPP_CODEGEN_API Win32Exception
|
||||
{
|
||||
public:
|
||||
static Il2CppString *W32ErrorMessage(int32_t code);
|
||||
};
|
||||
} /* namespace ComponentModel */
|
||||
} /* namespace System */
|
||||
} /* namespace System */
|
||||
} /* namespace icalls */
|
||||
} /* namespace il2cpp */
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include "il2cpp-object-internals.h"
|
||||
#include "il2cpp-config.h"
|
||||
|
||||
struct Il2CppObject;
|
||||
struct Il2CppDelegate;
|
||||
struct Il2CppReflectionType;
|
||||
struct Il2CppReflectionMethod;
|
||||
struct Il2CppReflectionField;
|
||||
struct Il2CppArray;
|
||||
struct Il2CppException;
|
||||
struct Il2CppReflectionModule;
|
||||
struct Il2CppAssembly;
|
||||
struct Il2CppAssemblyName;
|
||||
struct Il2CppAppDomain;
|
||||
|
||||
namespace il2cpp
|
||||
{
|
||||
namespace icalls
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace Configuration
|
||||
{
|
||||
class LIBIL2CPP_CODEGEN_API DefaultConfig
|
||||
{
|
||||
public:
|
||||
static Il2CppString* get_machine_config_path();
|
||||
static Il2CppString* get_bundled_machine_config();
|
||||
};
|
||||
} /* namespace Configuration */
|
||||
} /* namespace System */
|
||||
} /* namespace System */
|
||||
} /* namespace icalls */
|
||||
} /* namespace il2cpp */
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
#include "il2cpp-config.h"
|
||||
struct Il2CppString;
|
||||
|
||||
namespace il2cpp
|
||||
{
|
||||
namespace icalls
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace Configuration
|
||||
{
|
||||
class LIBIL2CPP_CODEGEN_API InternalConfigurationHost
|
||||
{
|
||||
public:
|
||||
static Il2CppString* get_bundled_machine_config();
|
||||
};
|
||||
} /* namespace Configuration */
|
||||
} /* namespace System */
|
||||
} /* namespace System */
|
||||
} /* namespace icalls */
|
||||
} /* namespace il2cpp */
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include "il2cpp-config.h"
|
||||
#include "il2cpp-object-internals.h"
|
||||
|
||||
struct Il2CppObject;
|
||||
struct Il2CppDelegate;
|
||||
struct Il2CppReflectionType;
|
||||
struct Il2CppReflectionMethod;
|
||||
struct Il2CppReflectionField;
|
||||
struct Il2CppArray;
|
||||
struct Il2CppException;
|
||||
struct Il2CppReflectionModule;
|
||||
struct Il2CppAssembly;
|
||||
struct Il2CppAssemblyName;
|
||||
struct Il2CppAppDomain;
|
||||
|
||||
namespace il2cpp
|
||||
{
|
||||
namespace icalls
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace Diagnostics
|
||||
{
|
||||
class LIBIL2CPP_CODEGEN_API DefaultTraceListener
|
||||
{
|
||||
public:
|
||||
static void WriteWindowsDebugString(Il2CppString* message);
|
||||
};
|
||||
} /* namespace Diagnostics */
|
||||
} /* namespace System */
|
||||
} /* namespace System */
|
||||
} /* namespace icalls */
|
||||
} /* namespace il2cpp */
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include "il2cpp-config.h"
|
||||
#include "il2cpp-object-internals.h"
|
||||
|
||||
struct Il2CppObject;
|
||||
struct Il2CppDelegate;
|
||||
struct Il2CppReflectionType;
|
||||
struct Il2CppReflectionMethod;
|
||||
struct Il2CppReflectionField;
|
||||
struct Il2CppArray;
|
||||
struct Il2CppException;
|
||||
struct Il2CppReflectionModule;
|
||||
struct Il2CppAssembly;
|
||||
struct Il2CppAssemblyName;
|
||||
struct Il2CppAppDomain;
|
||||
|
||||
namespace il2cpp
|
||||
{
|
||||
namespace icalls
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace Diagnostics
|
||||
{
|
||||
class LIBIL2CPP_CODEGEN_API FileVersionInfo
|
||||
{
|
||||
public:
|
||||
static void GetVersionInfo_internal(void* /* System.Diagnostics.FileVersionInfo */ self, Il2CppString* fileName);
|
||||
};
|
||||
} /* namespace Diagnostics */
|
||||
} /* namespace System */
|
||||
} /* namespace System */
|
||||
} /* namespace icalls */
|
||||
} /* namespace il2cpp */
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include "il2cpp-config.h"
|
||||
#include "il2cpp-object-internals.h"
|
||||
|
||||
struct Il2CppObject;
|
||||
struct Il2CppDelegate;
|
||||
struct Il2CppReflectionType;
|
||||
struct Il2CppReflectionMethod;
|
||||
struct Il2CppReflectionField;
|
||||
struct Il2CppArray;
|
||||
struct Il2CppException;
|
||||
struct Il2CppReflectionModule;
|
||||
struct Il2CppAssembly;
|
||||
struct Il2CppAssemblyName;
|
||||
struct Il2CppAppDomain;
|
||||
|
||||
namespace il2cpp
|
||||
{
|
||||
namespace icalls
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace Diagnostics
|
||||
{
|
||||
struct Il2CppCounterSample;
|
||||
|
||||
class LIBIL2CPP_CODEGEN_API PerformanceCounter
|
||||
{
|
||||
public:
|
||||
static void FreeData(intptr_t impl);
|
||||
static bool GetSample(intptr_t impl, bool only_value, Il2CppCounterSample* sample);
|
||||
static int64_t UpdateValue(intptr_t impl, bool do_incr, int64_t value);
|
||||
static intptr_t GetImpl(Il2CppString* category, Il2CppString* counter, Il2CppString* instance, Il2CppString* machine, int* type, bool* custom);
|
||||
};
|
||||
} /* namespace Diagnostics */
|
||||
} /* namespace System */
|
||||
} /* namespace System */
|
||||
} /* namespace icalls */
|
||||
} /* namespace il2cpp */
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include "il2cpp-config.h"
|
||||
#include "il2cpp-object-internals.h"
|
||||
|
||||
struct Il2CppObject;
|
||||
struct Il2CppDelegate;
|
||||
struct Il2CppReflectionType;
|
||||
struct Il2CppReflectionMethod;
|
||||
struct Il2CppReflectionField;
|
||||
struct Il2CppArray;
|
||||
struct Il2CppException;
|
||||
struct Il2CppReflectionModule;
|
||||
struct Il2CppAssembly;
|
||||
struct Il2CppAssemblyName;
|
||||
struct Il2CppAppDomain;
|
||||
|
||||
namespace il2cpp
|
||||
{
|
||||
namespace icalls
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace Diagnostics
|
||||
{
|
||||
typedef int32_t PerformanceCounterCategoryType;
|
||||
|
||||
class LIBIL2CPP_CODEGEN_API PerformanceCounterCategory
|
||||
{
|
||||
public:
|
||||
static Il2CppString* CategoryHelpInternal(Il2CppString* category, Il2CppString* machine);
|
||||
static bool CounterCategoryExists(Il2CppString* counter, Il2CppString* category, Il2CppString* machine);
|
||||
static bool Create(Il2CppString* categoryName, Il2CppString* categoryHelp, PerformanceCounterCategoryType categoryType, Il2CppArray* items);
|
||||
static Il2CppArray* GetCategoryNames(Il2CppString* machine);
|
||||
static Il2CppArray* GetCounterNames(Il2CppString* category, Il2CppString* machine);
|
||||
static Il2CppArray* GetInstanceNames(Il2CppString* category, Il2CppString* machine);
|
||||
static int32_t InstanceExistsInternal(Il2CppString* instance, Il2CppString* category, Il2CppString* machine);
|
||||
static bool CategoryDelete(Il2CppString* name);
|
||||
};
|
||||
} /* namespace Diagnostics */
|
||||
} /* namespace System */
|
||||
} /* namespace System */
|
||||
} /* namespace icalls */
|
||||
} /* namespace il2cpp */
|
||||
+262
@@ -0,0 +1,262 @@
|
||||
#pragma once
|
||||
|
||||
#include "il2cpp-class-internals.h"
|
||||
|
||||
namespace il2cpp
|
||||
{
|
||||
namespace icalls
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace Diagnostics
|
||||
{
|
||||
struct CategoryDesc
|
||||
{
|
||||
const char *name;
|
||||
const char *help;
|
||||
unsigned char id;
|
||||
signed int type : 2;
|
||||
unsigned int instance_type : 6;
|
||||
short first_counter;
|
||||
};
|
||||
|
||||
#define PERFCTR_CAT(id, name, help, type, inst, first_counter) CATEGORY_ ## id,
|
||||
#define PERFCTR_COUNTER(id, name, help, type, field)
|
||||
enum
|
||||
{
|
||||
#include "perfcounters-def.h"
|
||||
NUM_CATEGORIES
|
||||
};
|
||||
|
||||
#undef PERFCTR_CAT
|
||||
#undef PERFCTR_COUNTER
|
||||
#define PERFCTR_CAT(id, name, help, type, inst, first_counter) CATEGORY_START_ ## id = -1,
|
||||
#define PERFCTR_COUNTER(id, name, help, type, field) COUNTER_ ## id,
|
||||
/* each counter is assigned an id starting from 0 inside the category */
|
||||
enum
|
||||
{
|
||||
#include "perfcounters-def.h"
|
||||
END_COUNTERS
|
||||
};
|
||||
|
||||
#undef PERFCTR_CAT
|
||||
#undef PERFCTR_COUNTER
|
||||
#define PERFCTR_CAT(id, name, help, type, inst, first_counter)
|
||||
#define PERFCTR_COUNTER(id, name, help, type, field) CCOUNTER_ ## id,
|
||||
/* this is used just to count the number of counters */
|
||||
enum
|
||||
{
|
||||
#include "perfcounters-def.h"
|
||||
NUM_COUNTERS
|
||||
};
|
||||
|
||||
struct CounterDesc
|
||||
{
|
||||
const char *name;
|
||||
const char *help;
|
||||
short id;
|
||||
unsigned short offset; // offset inside Il2CppPerfCounters
|
||||
int type;
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
FTYPE_CATEGORY = 'C',
|
||||
FTYPE_DELETED = 'D',
|
||||
FTYPE_PREDEF_INSTANCE = 'P', // an instance of a predef counter
|
||||
FTYPE_INSTANCE = 'I',
|
||||
FTYPE_DIRTY = 'd',
|
||||
FTYPE_END = 0
|
||||
};
|
||||
|
||||
struct SharedHeader
|
||||
{
|
||||
unsigned char ftype;
|
||||
unsigned char extra;
|
||||
unsigned short size;
|
||||
};
|
||||
|
||||
struct SharedCategory
|
||||
{
|
||||
SharedHeader header;
|
||||
unsigned short num_counters;
|
||||
unsigned short counters_data_size;
|
||||
int num_instances;
|
||||
/* variable length data follows */
|
||||
char name[1];
|
||||
// string name
|
||||
// string help
|
||||
// SharedCounter counters_info [num_counters]
|
||||
};
|
||||
|
||||
struct SharedInstance
|
||||
{
|
||||
SharedHeader header;
|
||||
size_t category_offset;
|
||||
/* variable length data follows */
|
||||
char instance_name[1];
|
||||
// string name
|
||||
};
|
||||
|
||||
struct SharedCounter
|
||||
{
|
||||
unsigned char type;
|
||||
uint8_t seq_num;
|
||||
/* variable length data follows */
|
||||
char name[1];
|
||||
// string name
|
||||
// string help
|
||||
};
|
||||
|
||||
struct CatSearch
|
||||
{
|
||||
Il2CppString *name;
|
||||
SharedCategory *cat;
|
||||
};
|
||||
|
||||
/* map of PerformanceCounterType.cs */
|
||||
enum
|
||||
{
|
||||
NumberOfItemsHEX32 = 0x00000000,
|
||||
NumberOfItemsHEX64 = 0x00000100,
|
||||
NumberOfItems32 = 0x00010000,
|
||||
NumberOfItems64 = 0x00010100,
|
||||
CounterDelta32 = 0x00400400,
|
||||
CounterDelta64 = 0x00400500,
|
||||
SampleCounter = 0x00410400,
|
||||
CountPerTimeInterval32 = 0x00450400,
|
||||
CountPerTimeInterval64 = 0x00450500,
|
||||
RateOfCountsPerSecond32 = 0x10410400,
|
||||
RateOfCountsPerSecond64 = 0x10410500,
|
||||
RawFraction = 0x20020400,
|
||||
CounterTimer = 0x20410500,
|
||||
Timer100Ns = 0x20510500,
|
||||
SampleFraction = 0x20C20400,
|
||||
CounterTimerInverse = 0x21410500,
|
||||
Timer100NsInverse = 0x21510500,
|
||||
CounterMultiTimer = 0x22410500,
|
||||
CounterMultiTimer100Ns = 0x22510500,
|
||||
CounterMultiTimerInverse = 0x23410500,
|
||||
CounterMultiTimer100NsInverse = 0x23510500,
|
||||
AverageTimer32 = 0x30020400,
|
||||
ElapsedTime = 0x30240500,
|
||||
AverageCount64 = 0x40020500,
|
||||
SampleBase = 0x40030401,
|
||||
AverageBase = 0x40030402,
|
||||
RawBase = 0x40030403,
|
||||
CounterMultiBase = 0x42030500
|
||||
};
|
||||
|
||||
/* maps a small integer type to the counter types above */
|
||||
static const int simple_type_to_type[] =
|
||||
{
|
||||
NumberOfItemsHEX32, NumberOfItemsHEX64,
|
||||
NumberOfItems32, NumberOfItems64,
|
||||
CounterDelta32, CounterDelta64,
|
||||
SampleCounter, CountPerTimeInterval32,
|
||||
CountPerTimeInterval64, RateOfCountsPerSecond32,
|
||||
RateOfCountsPerSecond64, RawFraction,
|
||||
CounterTimer, Timer100Ns,
|
||||
SampleFraction, CounterTimerInverse,
|
||||
Timer100NsInverse, CounterMultiTimer,
|
||||
CounterMultiTimer100Ns, CounterMultiTimerInverse,
|
||||
CounterMultiTimer100NsInverse, AverageTimer32,
|
||||
ElapsedTime, AverageCount64,
|
||||
SampleBase, AverageBase,
|
||||
RawBase, CounterMultiBase
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
SingleInstance,
|
||||
MultiInstance,
|
||||
CatTypeUnknown = -1
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
ProcessInstance,
|
||||
ThreadInstance,
|
||||
CPUInstance,
|
||||
MonoInstance,
|
||||
NetworkInterfaceInstance,
|
||||
CustomInstance
|
||||
};
|
||||
|
||||
/* map of CounterSample.cs */
|
||||
struct Il2CppCounterSample
|
||||
{
|
||||
int64_t rawValue;
|
||||
int64_t baseValue;
|
||||
int64_t counterFrequency;
|
||||
int64_t systemFrequency;
|
||||
int64_t timeStamp;
|
||||
int64_t timeStamp100nSec;
|
||||
int64_t counterTimeStamp;
|
||||
int counterType;
|
||||
};
|
||||
|
||||
#undef PERFCTR_CAT
|
||||
#undef PERFCTR_COUNTER
|
||||
#define PERFCTR_CAT(id, name, help, type, inst, first_counter) {name, help, CATEGORY_ ## id, type, inst ## Instance, CCOUNTER_ ## first_counter},
|
||||
#define PERFCTR_COUNTER(id, name, help, type, field)
|
||||
static const CategoryDesc
|
||||
predef_categories[] =
|
||||
{
|
||||
/* sample runtime counter */
|
||||
#include "perfcounters-def.h"
|
||||
{ NULL, NULL, NUM_CATEGORIES, -1, 0, NUM_COUNTERS }
|
||||
};
|
||||
|
||||
#undef PERFCTR_CAT
|
||||
#undef PERFCTR_COUNTER
|
||||
#define PERFCTR_CAT(id, name, help, type, inst, first_counter)
|
||||
#define PERFCTR_COUNTER(id, name, help, type, field) {name, help, COUNTER_ ## id, offsetof (Il2CppPerfCounters, field), type},
|
||||
static const CounterDesc
|
||||
predef_counters[] =
|
||||
{
|
||||
#include "perfcounters-def.h"
|
||||
{ NULL, NULL, -1, 0, 0 }
|
||||
};
|
||||
/*
|
||||
* We have several different classes of counters:
|
||||
* *) system counters
|
||||
* *) runtime counters
|
||||
* *) remote counters
|
||||
* *) user-defined counters
|
||||
* *) windows counters (the implementation on windows will use this)
|
||||
*
|
||||
* To easily handle the differences we create a vtable for each class that contains the
|
||||
* function pointers with the actual implementation to access the counters.
|
||||
*/
|
||||
typedef struct _ImplVtable ImplVtable;
|
||||
|
||||
typedef bool(*SampleFunc) (ImplVtable *vtable, bool only_value, Il2CppCounterSample* sample);
|
||||
typedef uint64_t(*UpdateFunc) (ImplVtable *vtable, bool do_incr, int64_t value);
|
||||
typedef void(*CleanupFunc) (ImplVtable *vtable);
|
||||
|
||||
struct _ImplVtable
|
||||
{
|
||||
void *arg;
|
||||
SampleFunc sample;
|
||||
UpdateFunc update;
|
||||
CleanupFunc cleanup;
|
||||
};
|
||||
|
||||
struct CustomVTable
|
||||
{
|
||||
ImplVtable vtable;
|
||||
SharedInstance *instance_desc;
|
||||
SharedCounter *counter_desc;
|
||||
};
|
||||
|
||||
const CategoryDesc* find_category(Il2CppString *category);
|
||||
const CounterDesc* get_counter_in_category(const CategoryDesc *desc, Il2CppString *counter);
|
||||
ImplVtable* create_vtable(void *arg, SampleFunc sample, UpdateFunc update);
|
||||
} /* namespace Diagnostics */
|
||||
} /* namespace System */
|
||||
} /* namespace System */
|
||||
} /* namespace icalls */
|
||||
} /* namespace il2cpp */
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include "il2cpp-config.h"
|
||||
#include "il2cpp-object-internals.h"
|
||||
|
||||
struct Il2CppObject;
|
||||
struct Il2CppDelegate;
|
||||
struct Il2CppReflectionType;
|
||||
struct Il2CppReflectionMethod;
|
||||
struct Il2CppReflectionField;
|
||||
struct Il2CppArray;
|
||||
struct Il2CppException;
|
||||
struct Il2CppReflectionModule;
|
||||
struct Il2CppAssembly;
|
||||
struct Il2CppAssemblyName;
|
||||
struct Il2CppAppDomain;
|
||||
|
||||
namespace il2cpp
|
||||
{
|
||||
namespace icalls
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace Diagnostics
|
||||
{
|
||||
struct ProcInfo;
|
||||
|
||||
class LIBIL2CPP_CODEGEN_API Process
|
||||
{
|
||||
public:
|
||||
static Il2CppArray* GetProcesses_internal();
|
||||
static int32_t GetPid_internal();
|
||||
static bool CreateProcess_internal(void* /* System.Diagnostics.ProcessStartInfo */ startInfo, intptr_t _stdin, intptr_t _stdout, intptr_t _stderr, ProcInfo* proc_info);
|
||||
static int64_t ExitTime_internal(intptr_t handle);
|
||||
static Il2CppArray* GetModules_internal(void* /* System.Diagnostics.Process */ self, intptr_t handle);
|
||||
static int32_t GetPriorityClass(intptr_t handle, int32_t* error);
|
||||
static int64_t GetProcessData(int32_t pid, int32_t data_type, int32_t* error);
|
||||
static intptr_t GetProcess_internal(int32_t pid);
|
||||
static bool GetWorkingSet_internal(intptr_t handle, int32_t* min, int32_t* max);
|
||||
static bool Kill_internal(intptr_t handle, int32_t signo);
|
||||
static Il2CppString* ProcessName_internal(intptr_t handle);
|
||||
static void Process_free_internal(void* /* System.Diagnostics.Process */ self, intptr_t handle);
|
||||
static bool SetPriorityClass(intptr_t handle, int32_t priority, int32_t* error);
|
||||
static bool SetWorkingSet_internal(intptr_t handle, int32_t min, int32_t max, bool use_min);
|
||||
static bool ShellExecuteEx_internal(void* /* System.Diagnostics.ProcessStartInfo */ startInfo, ProcInfo* proc_info);
|
||||
static int64_t StartTime_internal(intptr_t handle);
|
||||
static int64_t Times(intptr_t handle, int32_t type);
|
||||
static bool WaitForExit_internal(void* /* System.Diagnostics.Process */ self, intptr_t handle, int32_t ms);
|
||||
static bool WaitForInputIdle_internal(void* /* System.Diagnostics.Process */ self, intptr_t handle, int32_t ms);
|
||||
static int32_t ExitCode_internal(intptr_t handle);
|
||||
};
|
||||
} /* namespace Diagnostics */
|
||||
} /* namespace System */
|
||||
} /* namespace System */
|
||||
} /* namespace icalls */
|
||||
} /* namespace il2cpp */
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include "il2cpp-config.h"
|
||||
|
||||
namespace il2cpp
|
||||
{
|
||||
namespace icalls
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace Diagnostics
|
||||
{
|
||||
class LIBIL2CPP_CODEGEN_API Stopwatch
|
||||
{
|
||||
public:
|
||||
static int64_t GetTimestamp();
|
||||
};
|
||||
} /* namespace Diagnostics */
|
||||
} /* namespace System */
|
||||
} /* namespace mscorlib */
|
||||
} /* namespace icalls */
|
||||
} /* namespace il2cpp */
|
||||
+135
@@ -0,0 +1,135 @@
|
||||
/*
|
||||
* Define the system and runtime performance counters.
|
||||
* Each category is defined with the macro:
|
||||
* PERFCTR_CAT(catid, name, help, type, instances, first_counter_id)
|
||||
* and after that follows the counters inside the category, defined by the macro:
|
||||
* PERFCTR_COUNTER(counter_id, name, help, type, field)
|
||||
* field is the field inside MonoPerfCounters per predefined counters.
|
||||
* Note we set it to unused for unrelated counters: it is unused
|
||||
* in those cases.
|
||||
*/
|
||||
//PERFCTR_CAT(CPU, "Processor", "", MultiInstance, CPU, CPU_USER_TIME)
|
||||
//PERFCTR_COUNTER(CPU_USER_TIME, "% User Time", "", Timer100Ns, unused)
|
||||
//PERFCTR_COUNTER(CPU_PRIV_TIME, "% Privileged Time", "", Timer100Ns, unused)
|
||||
//PERFCTR_COUNTER(CPU_INTR_TIME, "% Interrupt Time", "", Timer100Ns, unused)
|
||||
//PERFCTR_COUNTER(CPU_DCP_TIME, "% DCP Time", "", Timer100Ns, unused)
|
||||
//PERFCTR_COUNTER(CPU_PROC_TIME, "% Processor Time", "", Timer100NsInverse, unused)
|
||||
//
|
||||
//PERFCTR_CAT(PROC, "Process", "", MultiInstance, Process, PROC_USER_TIME)
|
||||
//PERFCTR_COUNTER(PROC_USER_TIME, "% User Time", "", Timer100Ns, unused)
|
||||
//PERFCTR_COUNTER(PROC_PRIV_TIME, "% Privileged Time", "", Timer100Ns, unused)
|
||||
//PERFCTR_COUNTER(PROC_PROC_TIME, "% Processor Time", "", Timer100Ns, unused)
|
||||
//PERFCTR_COUNTER(PROC_THREADS, "Thread Count", "", NumberOfItems64, unused)
|
||||
//PERFCTR_COUNTER(PROC_VBYTES, "Virtual Bytes", "", NumberOfItems64, unused)
|
||||
//PERFCTR_COUNTER(PROC_WSET, "Working Set", "", NumberOfItems64, unused)
|
||||
//PERFCTR_COUNTER(PROC_PBYTES, "Private Bytes", "", NumberOfItems64, unused)
|
||||
|
||||
/* sample runtime counter */
|
||||
PERFCTR_CAT(MONO_MEM, "Mono Memory", "", SingleInstance, Mono, MEM_NUM_OBJECTS)
|
||||
PERFCTR_COUNTER(MEM_NUM_OBJECTS, "Allocated Objects", "", NumberOfItems64, unused)
|
||||
//PERFCTR_COUNTER(MEM_PHYS_TOTAL, "Total Physical Memory", "Physical memory installed in the machine, in bytes", NumberOfItems64, unused)
|
||||
//PERFCTR_COUNTER(MEM_PHYS_AVAILABLE, "Available Physical Memory", "Physical memory available in the machine, in bytes", NumberOfItems64, unused)
|
||||
//
|
||||
//PERFCTR_CAT(ASPNET, "ASP.NET", "", MultiInstance, Mono, ASPNET_REQ_Q)
|
||||
//PERFCTR_COUNTER(ASPNET_REQ_Q, "Requests Queued", "", NumberOfItems64, aspnet_requests_queued)
|
||||
//PERFCTR_COUNTER(ASPNET_REQ_TOTAL, "Requests Total", "", NumberOfItems32, aspnet_requests)
|
||||
//PERFCTR_COUNTER(ASPNET_REQ_PSEC, "Requests/Sec", "", RateOfCountsPerSecond32, aspnet_requests)
|
||||
//
|
||||
//PERFCTR_CAT(JIT, ".NET CLR JIT", "", MultiInstance, Mono, JIT_BYTES)
|
||||
//PERFCTR_COUNTER(JIT_BYTES, "# of IL Bytes JITted", "", NumberOfItems32, jit_bytes)
|
||||
//PERFCTR_COUNTER(JIT_METHODS, "# of IL Methods JITted", "", NumberOfItems32, jit_methods)
|
||||
//PERFCTR_COUNTER(JIT_TIME, "% Time in JIT", "", RawFraction, jit_time)
|
||||
//PERFCTR_COUNTER(JIT_BYTES_PSEC, "IL Bytes Jitted/Sec", "", RateOfCountsPerSecond32, jit_bytes)
|
||||
//PERFCTR_COUNTER(JIT_FAILURES, "Standard Jit Failures", "", NumberOfItems32, jit_failures)
|
||||
//
|
||||
//PERFCTR_CAT(EXC, ".NET CLR Exceptions", "", MultiInstance, Mono, EXC_THROWN)
|
||||
//PERFCTR_COUNTER(EXC_THROWN, "# of Exceps Thrown", "", NumberOfItems32, exceptions_thrown)
|
||||
//PERFCTR_COUNTER(EXC_THROWN_PSEC, "# of Exceps Thrown/Sec", "", RateOfCountsPerSecond32, exceptions_thrown)
|
||||
//PERFCTR_COUNTER(EXC_FILTERS_PSEC, "# of Filters/Sec", "", RateOfCountsPerSecond32, exceptions_filters)
|
||||
//PERFCTR_COUNTER(EXC_FINALLYS_PSEC, "# of Finallys/Sec", "", RateOfCountsPerSecond32, exceptions_finallys)
|
||||
//PERFCTR_COUNTER(EXC_CATCH_DEPTH, "Throw to Catch Depth/Sec", "", NumberOfItems32, exceptions_depth)
|
||||
//
|
||||
//PERFCTR_CAT(GC, ".NET CLR Memory", "", MultiInstance, Mono, GC_GEN0)
|
||||
//PERFCTR_COUNTER(GC_GEN0, "# Gen 0 Collections", "", NumberOfItems32, gc_collections0)
|
||||
//PERFCTR_COUNTER(GC_GEN1, "# Gen 1 Collections", "", NumberOfItems32, gc_collections1)
|
||||
//PERFCTR_COUNTER(GC_GEN2, "# Gen 2 Collections", "", NumberOfItems32, gc_collections2)
|
||||
//PERFCTR_COUNTER(GC_PROM0, "Promoted Memory from Gen 0", "", NumberOfItems32, gc_promotions0)
|
||||
//PERFCTR_COUNTER(GC_PROM1, "Promoted Memory from Gen 1", "", NumberOfItems32, gc_promotions1)
|
||||
//PERFCTR_COUNTER(GC_PROM0SEC, "Gen 0 Promoted Bytes/Sec", "", RateOfCountsPerSecond32, gc_promotions0)
|
||||
//PERFCTR_COUNTER(GC_PROM1SEC, "Gen 1 Promoted Bytes/Sec", "", RateOfCountsPerSecond32, gc_promotions1)
|
||||
//PERFCTR_COUNTER(GC_PROMFIN, "Promoted Finalization-Memory from Gen 0", "", NumberOfItems32, gc_promotion_finalizers)
|
||||
//PERFCTR_COUNTER(GC_GEN0SIZE, "Gen 0 heap size", "", NumberOfItems32, gc_gen0size)
|
||||
//PERFCTR_COUNTER(GC_GEN1SIZE, "Gen 1 heap size", "", NumberOfItems32, gc_gen1size)
|
||||
//PERFCTR_COUNTER(GC_GEN2SIZE, "Gen 2 heap size", "", NumberOfItems32, gc_gen2size)
|
||||
//PERFCTR_COUNTER(GC_LOSIZE, "Large Object Heap size", "", NumberOfItems32, gc_lossize)
|
||||
//PERFCTR_COUNTER(GC_FINSURV, "Finalization Survivors", "", NumberOfItems32, gc_fin_survivors)
|
||||
//PERFCTR_COUNTER(GC_NHANDLES, "# GC Handles", "", NumberOfItems32, gc_num_handles)
|
||||
//PERFCTR_COUNTER(GC_BYTESSEC, "Allocated Bytes/sec", "", RateOfCountsPerSecond32, gc_allocated)
|
||||
//PERFCTR_COUNTER(GC_INDGC, "# Induced GC", "", NumberOfItems32, gc_induced)
|
||||
//PERFCTR_COUNTER(GC_PERCTIME, "% Time in GC", "", RawFraction, gc_time)
|
||||
//PERFCTR_COUNTER(GC_BYTES, "# Bytes in all Heaps", "", NumberOfItems32, gc_total_bytes)
|
||||
//PERFCTR_COUNTER(GC_COMMBYTES, "# Total committed Bytes", "", NumberOfItems32, gc_committed_bytes)
|
||||
//PERFCTR_COUNTER(GC_RESBYTES, "# Total reserved Bytes", "", NumberOfItems32, gc_reserved_bytes)
|
||||
//PERFCTR_COUNTER(GC_PINNED, "# of Pinned Objects", "", NumberOfItems32, gc_num_pinned)
|
||||
//PERFCTR_COUNTER(GC_SYNKB, "# of Sink Blocks in use", "", NumberOfItems32, gc_sync_blocks)
|
||||
//
|
||||
//PERFCTR_CAT(REMOTING, ".NET CLR Remoting", "", MultiInstance, Mono, REMOTING_CALLSEC)
|
||||
//PERFCTR_COUNTER(REMOTING_CALLSEC, "Remote Calls/sec", "", RateOfCountsPerSecond32, remoting_calls)
|
||||
//PERFCTR_COUNTER(REMOTING_CALLS, "Total Remote Calls", "", NumberOfItems32, remoting_calls)
|
||||
//PERFCTR_COUNTER(REMOTING_CHANNELS, "Channels", "", NumberOfItems32, remoting_channels)
|
||||
//PERFCTR_COUNTER(REMOTING_CPROXIES, "Context Proxies", "", NumberOfItems32, remoting_proxies)
|
||||
//PERFCTR_COUNTER(REMOTING_CBLOADED, "Context-Bound Classes Loaded", "", NumberOfItems32, remoting_classes)
|
||||
//PERFCTR_COUNTER(REMOTING_CBALLOCSEC, "Context-Bound Objects Alloc / sec", "", RateOfCountsPerSecond32, remoting_objects)
|
||||
//PERFCTR_COUNTER(REMOTING_CONTEXTS, "Contexts", "", NumberOfItems32, remoting_contexts)
|
||||
//
|
||||
//PERFCTR_CAT(LOADING, ".NET CLR Loading", "", MultiInstance, Mono, LOADING_CLASSES)
|
||||
//PERFCTR_COUNTER(LOADING_CLASSES, "Current Classes Loaded", "", NumberOfItems32, loader_classes)
|
||||
//PERFCTR_COUNTER(LOADING_TOTCLASSES, "Total Classes Loaded", "", NumberOfItems32, loader_total_classes)
|
||||
//PERFCTR_COUNTER(LOADING_CLASSESSEC, "Rate of Classes Loaded", "", RateOfCountsPerSecond32, loader_total_classes)
|
||||
//PERFCTR_COUNTER(LOADING_APPDOMAINS, "Current appdomains", "", NumberOfItems32, loader_appdomains)
|
||||
//PERFCTR_COUNTER(LOADING_TOTAPPDOMAINS, "Total Appdomains", "", NumberOfItems32, loader_total_appdomains)
|
||||
//PERFCTR_COUNTER(LOADING_APPDOMAINSEC, "Rate of appdomains", "", RateOfCountsPerSecond32, loader_total_appdomains)
|
||||
//PERFCTR_COUNTER(LOADING_ASSEMBLIES, "Current Assemblies", "", NumberOfItems32, loader_assemblies)
|
||||
//PERFCTR_COUNTER(LOADING_TOTASSEMBLIES, "Total Assemblies", "", NumberOfItems32, loader_total_assemblies)
|
||||
//PERFCTR_COUNTER(LOADING_ASSEMBLIESEC, "Rate of Assemblies", "", RateOfCountsPerSecond32, loader_total_assemblies)
|
||||
//PERFCTR_COUNTER(LOADING_FAILURES, "Total # of Load Failures", "", NumberOfItems32, loader_failures)
|
||||
//PERFCTR_COUNTER(LOADING_FAILURESSEC, "Rate of Load Failures", "", RateOfCountsPerSecond32, loader_failures)
|
||||
//PERFCTR_COUNTER(LOADING_BYTES, "Bytes in Loader Heap", "", NumberOfItems32, loader_bytes)
|
||||
//PERFCTR_COUNTER(LOADING_APPUNLOADED, "Total appdomains unloaded", "", NumberOfItems32, loader_appdomains_uloaded)
|
||||
//PERFCTR_COUNTER(LOADING_APPUNLOADEDSEC, "Rate of appdomains unloaded", "", RateOfCountsPerSecond32, loader_appdomains_uloaded)
|
||||
//
|
||||
//PERFCTR_CAT(THREAD, ".NET CLR LocksAndThreads", "", MultiInstance, Mono, THREAD_CONTENTIONS)
|
||||
//PERFCTR_COUNTER(THREAD_CONTENTIONS, "Total # of Contentions", "", NumberOfItems32, thread_contentions)
|
||||
//PERFCTR_COUNTER(THREAD_CONTENTIONSSEC, "Contention Rate / sec", "", RateOfCountsPerSecond32, thread_contentions)
|
||||
//PERFCTR_COUNTER(THREAD_QUEUELEN, "Current Queue Length", "", NumberOfItems32, thread_queue_len)
|
||||
//PERFCTR_COUNTER(THREAD_QUEUELENP, "Queue Length Peak", "", NumberOfItems32, thread_queue_max)
|
||||
//PERFCTR_COUNTER(THREAD_QUEUELENSEC, "Queue Length / sec", "", RateOfCountsPerSecond32, thread_queue_max)
|
||||
//PERFCTR_COUNTER(THREAD_NUMLOG, "# of current logical Threads", "", NumberOfItems32, thread_num_logical)
|
||||
//PERFCTR_COUNTER(THREAD_NUMPHYS, "# of current physical Threads", "", NumberOfItems32, thread_num_physical)
|
||||
//PERFCTR_COUNTER(THREAD_NUMREC, "# of current recognized threads", "", NumberOfItems32, thread_cur_recognized)
|
||||
//PERFCTR_COUNTER(THREAD_TOTREC, "# of total recognized threads", "", NumberOfItems32, thread_num_recognized)
|
||||
//PERFCTR_COUNTER(THREAD_TOTRECSEC, "rate of recognized threads / sec", "", RateOfCountsPerSecond32, thread_num_recognized)
|
||||
//
|
||||
//PERFCTR_CAT(INTEROP, ".NET CLR Interop", "", MultiInstance, Mono, INTEROP_NUMCCW)
|
||||
//PERFCTR_COUNTER(INTEROP_NUMCCW, "# of CCWs", "", NumberOfItems32, interop_num_ccw)
|
||||
//PERFCTR_COUNTER(INTEROP_STUBS, "# of Stubs", "", NumberOfItems32, interop_num_stubs)
|
||||
//PERFCTR_COUNTER(INTEROP_MARSH, "# of marshalling", "", NumberOfItems32, interop_num_marshals)
|
||||
//
|
||||
//PERFCTR_CAT(SECURITY, ".NET CLR Security", "", MultiInstance, Mono, SECURITY_CHECKS)
|
||||
//PERFCTR_COUNTER(SECURITY_CHECKS, "Total Runtime Checks", "", NumberOfItems32, security_num_checks)
|
||||
//PERFCTR_COUNTER(SECURITY_LCHECKS, "# Link Time Checks", "", NumberOfItems32, security_num_link_checks)
|
||||
//PERFCTR_COUNTER(SECURITY_PERCTIME, "% Time in RT checks", "", RawFraction, security_time)
|
||||
//PERFCTR_COUNTER(SECURITY_SWDEPTH, "Stack Walk Depth", "", NumberOfItems32, security_depth)
|
||||
//
|
||||
//PERFCTR_CAT(THREADPOOL, "Mono Threadpool", "", MultiInstance, Mono, THREADPOOL_WORKITEMS)
|
||||
//PERFCTR_COUNTER(THREADPOOL_WORKITEMS, "Work Items Added", "", NumberOfItems64, threadpool_workitems)
|
||||
//PERFCTR_COUNTER(THREADPOOL_WORKITEMS_PSEC, "Work Items Added/Sec", "", RateOfCountsPerSecond32, threadpool_workitems)
|
||||
//PERFCTR_COUNTER(THREADPOOL_IOWORKITEMS, "IO Work Items Added", "", NumberOfItems64, threadpool_ioworkitems)
|
||||
//PERFCTR_COUNTER(THREADPOOL_IOWORKITEMS_PSEC, "IO Work Items Added/Sec", "", RateOfCountsPerSecond32, threadpool_ioworkitems)
|
||||
//PERFCTR_COUNTER(THREADPOOL_THREADS, "# of Threads", "", NumberOfItems32, threadpool_threads)
|
||||
//PERFCTR_COUNTER(THREADPOOL_IOTHREADS, "# of IO Threads", "", NumberOfItems32, threadpool_iothreads)
|
||||
//
|
||||
//PERFCTR_CAT(NETWORK, "Network Interface", "", MultiInstance, NetworkInterface, NETWORK_BYTESRECSEC)
|
||||
//PERFCTR_COUNTER(NETWORK_BYTESRECSEC, "Bytes Received/sec", "", RateOfCountsPerSecond64, unused)
|
||||
//PERFCTR_COUNTER(NETWORK_BYTESSENTSEC, "Bytes Sent/sec", "", RateOfCountsPerSecond64, unused)
|
||||
//PERFCTR_COUNTER(NETWORK_BYTESTOTALSEC, "Bytes Total/sec", "", RateOfCountsPerSecond64, unused)
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include "il2cpp-object-internals.h"
|
||||
#include "il2cpp-config.h"
|
||||
|
||||
struct Il2CppObject;
|
||||
struct Il2CppDelegate;
|
||||
struct Il2CppReflectionType;
|
||||
struct Il2CppReflectionMethod;
|
||||
struct Il2CppReflectionField;
|
||||
struct Il2CppArray;
|
||||
struct Il2CppException;
|
||||
struct Il2CppReflectionModule;
|
||||
struct Il2CppAssembly;
|
||||
struct Il2CppAssemblyName;
|
||||
struct Il2CppAppDomain;
|
||||
|
||||
namespace il2cpp
|
||||
{
|
||||
namespace icalls
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace IO
|
||||
{
|
||||
struct FAMConnection;
|
||||
|
||||
class LIBIL2CPP_CODEGEN_API FAMWatcher
|
||||
{
|
||||
public:
|
||||
static int32_t InternalFAMNextEvent(FAMConnection* fc, Il2CppString** filename, int32_t* code, int32_t* reqnum);
|
||||
};
|
||||
} /* namespace IO */
|
||||
} /* namespace System */
|
||||
} /* namespace System */
|
||||
} /* namespace icalls */
|
||||
} /* namespace il2cpp */
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include "il2cpp-object-internals.h"
|
||||
#include "il2cpp-config.h"
|
||||
|
||||
struct Il2CppObject;
|
||||
struct Il2CppDelegate;
|
||||
struct Il2CppReflectionType;
|
||||
struct Il2CppReflectionMethod;
|
||||
struct Il2CppReflectionField;
|
||||
struct Il2CppArray;
|
||||
struct Il2CppException;
|
||||
struct Il2CppReflectionModule;
|
||||
struct Il2CppAssembly;
|
||||
struct Il2CppAssemblyName;
|
||||
struct Il2CppAppDomain;
|
||||
|
||||
namespace il2cpp
|
||||
{
|
||||
namespace icalls
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace IO
|
||||
{
|
||||
class LIBIL2CPP_CODEGEN_API FileSystemWatcher
|
||||
{
|
||||
public:
|
||||
static int32_t InternalSupportsFSW();
|
||||
};
|
||||
} /* namespace IO */
|
||||
} /* namespace System */
|
||||
} /* namespace System */
|
||||
} /* namespace icalls */
|
||||
} /* namespace il2cpp */
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include "il2cpp-object-internals.h"
|
||||
#include "il2cpp-config.h"
|
||||
|
||||
struct Il2CppObject;
|
||||
struct Il2CppDelegate;
|
||||
struct Il2CppReflectionType;
|
||||
struct Il2CppReflectionMethod;
|
||||
struct Il2CppReflectionField;
|
||||
struct Il2CppArray;
|
||||
struct Il2CppException;
|
||||
struct Il2CppReflectionModule;
|
||||
struct Il2CppAssembly;
|
||||
struct Il2CppAssemblyName;
|
||||
struct Il2CppAppDomain;
|
||||
|
||||
namespace il2cpp
|
||||
{
|
||||
namespace icalls
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace IO
|
||||
{
|
||||
typedef int32_t InotifyMask;
|
||||
|
||||
class LIBIL2CPP_CODEGEN_API InotifyWatcher
|
||||
{
|
||||
public:
|
||||
static intptr_t RemoveWatch(intptr_t fd, int32_t wd);
|
||||
static int32_t AddWatch(intptr_t fd, Il2CppString* name, InotifyMask mask);
|
||||
static intptr_t GetInotifyInstance();
|
||||
};
|
||||
} /* namespace IO */
|
||||
} /* namespace System */
|
||||
} /* namespace System */
|
||||
} /* namespace icalls */
|
||||
} /* namespace il2cpp */
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
#if NET_4_0
|
||||
#include "il2cpp-object-internals.h"
|
||||
|
||||
namespace il2cpp
|
||||
{
|
||||
namespace icalls
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace IO
|
||||
{
|
||||
class LIBIL2CPP_CODEGEN_API KqueueMonitor
|
||||
{
|
||||
public:
|
||||
static int32_t kevent_notimeout(int32_t* kq, intptr_t ev, int32_t nchanges, intptr_t evtlist, int32_t nevents);
|
||||
};
|
||||
} // namespace IO
|
||||
} // namespace System
|
||||
} // namespace System
|
||||
} // namespace icalls
|
||||
} // namespace il2cpp
|
||||
#endif
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
|
||||
#if !NET_4_0
|
||||
|
||||
#include "il2cpp-object-internals.h"
|
||||
|
||||
namespace il2cpp
|
||||
{
|
||||
namespace icalls
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace Net
|
||||
{
|
||||
namespace NetworkInformation
|
||||
{
|
||||
class LIBIL2CPP_CODEGEN_API LinuxNetworkInterface
|
||||
{
|
||||
public:
|
||||
static int32_t GetInterfaceAddresses(intptr_t* ifap);
|
||||
static void FreeInterfaceAddresses(intptr_t ifap);
|
||||
static void InitializeInterfaceAddresses();
|
||||
};
|
||||
} // namespace NetworkInformation
|
||||
} // namespace Net
|
||||
} // namespace System
|
||||
} // namespace System
|
||||
} // namespace icalls
|
||||
} // namespace il2cpp
|
||||
|
||||
#endif
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
#if NET_4_0
|
||||
namespace il2cpp
|
||||
{
|
||||
namespace icalls
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace Net
|
||||
{
|
||||
namespace NetworkInformation
|
||||
{
|
||||
class LIBIL2CPP_CODEGEN_API MacOsIPInterfaceProperties
|
||||
{
|
||||
public:
|
||||
static bool ParseRouteInfo_internal(Il2CppString* iface, Il2CppArray** gw_addr_list);
|
||||
};
|
||||
} // namespace NetworkInformation
|
||||
} // namespace Net
|
||||
} // namespace System
|
||||
} // namespace System
|
||||
} // namespace icalls
|
||||
} // namespace il2cpp
|
||||
#endif
|
||||
+257
@@ -0,0 +1,257 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include "il2cpp-config.h"
|
||||
#include "il2cpp-object-internals.h"
|
||||
|
||||
struct Il2CppArray;
|
||||
struct Il2CppObject;
|
||||
struct Il2CppString;
|
||||
|
||||
namespace il2cpp
|
||||
{
|
||||
namespace icalls
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace Net
|
||||
{
|
||||
namespace Sockets
|
||||
{
|
||||
enum AddressFamily
|
||||
{
|
||||
kAddressFamilyUnknown = -1,
|
||||
kAddressFamilyUnspecified = 0,
|
||||
kAddressFamilyUnix = 1,
|
||||
kAddressFamilyInterNetwork = 2,
|
||||
kAddressFamilyImpLink = 3,
|
||||
kAddressFamilyPup = 4,
|
||||
kAddressFamilyChaos = 5,
|
||||
kAddressFamilyNS = 6,
|
||||
kAddressFamilyIpx = 6,
|
||||
kAddressFamilyIso = 7,
|
||||
kAddressFamilyOsi = 7,
|
||||
kAddressFamilyEcma = 8,
|
||||
kAddressFamilyDataKit = 9,
|
||||
kAddressFamilyCcitt = 10,
|
||||
kAddressFamilySna = 11,
|
||||
kAddressFamilyDecNet = 12,
|
||||
kAddressFamilyDataLink = 13,
|
||||
kAddressFamilyLat = 14,
|
||||
kAddressFamilyHyperChannel = 15,
|
||||
kAddressFamilyAppleTalk = 16,
|
||||
kAddressFamilyNetBios = 17,
|
||||
kAddressFamilyVoiceView = 18,
|
||||
kAddressFamilyFireFox = 19,
|
||||
kAddressFamilyBanyan = 21,
|
||||
kAddressFamilyAtm = 22,
|
||||
kAddressFamilyInterNetworkV6 = 23,
|
||||
kAddressFamilyCluster = 24,
|
||||
kAddressFamilyIeee12844 = 25,
|
||||
kAddressFamilyIrda = 26,
|
||||
kAddressFamilyNetworkDesigners = 28,
|
||||
kAddressFamilyMax = 29,
|
||||
};
|
||||
|
||||
enum SocketType
|
||||
{
|
||||
kSocketTypeUnknown = -1,
|
||||
kSocketTypeStream = 1,
|
||||
kSocketTypeDgram = 2,
|
||||
kSocketTypeRaw = 3,
|
||||
kSocketTypeRdm = 4,
|
||||
kSocketTypeSeqpacket = 5,
|
||||
};
|
||||
|
||||
enum ProtocolType
|
||||
{
|
||||
kProtocolTypeUnknown = -1,
|
||||
kProtocolTypeIP = 0,
|
||||
kProtocolTypeIcmp = 1,
|
||||
kProtocolTypeIgmp = 2,
|
||||
kProtocolTypeGgp = 3,
|
||||
kProtocolTypeTcp = 6,
|
||||
kProtocolTypePup = 12,
|
||||
kProtocolTypeUdp = 17,
|
||||
kProtocolTypeIdp = 22,
|
||||
kProtocolTypeND = 77,
|
||||
kProtocolTypeRaw = 255,
|
||||
kProtocolTypeUnspecified = 0,
|
||||
kProtocolTypeIpx = 1000,
|
||||
kProtocolTypeSpx = 1256,
|
||||
kProtocolTypeSpxII = 1257,
|
||||
|
||||
// #if NET_1_1
|
||||
kProtocolTypeIPv6 = 41,
|
||||
// #endif
|
||||
|
||||
// #if NET_2_0
|
||||
kProtocolTypeIPv4 = 4,
|
||||
kProtocolTypeIPv6RoutingHeader = 43,
|
||||
kProtocolTypeIPv6FragmentHeader = 44,
|
||||
kProtocolTypeIPSecEncapsulatingSecurityPayload = 50,
|
||||
kProtocolTypeIPSecAuthenticationHeader = 51,
|
||||
kProtocolTypeIcmpV6 = 58,
|
||||
kProtocolTypeIPv6NoNextHeader = 59,
|
||||
kProtocolTypeIPv6DestinationOptions = 60,
|
||||
kProtocolTypeIPv6HopByHopOptions = 0,
|
||||
// #endif
|
||||
};
|
||||
|
||||
enum SocketOptionLevel
|
||||
{
|
||||
kSocketOptionLevelSocket = 65535,
|
||||
kSocketOptionLevelIP = 0,
|
||||
kSocketOptionLevelTcp = 6,
|
||||
kSocketOptionLevelUdp = 17,
|
||||
|
||||
//#if NET_1_1
|
||||
kSocketOptionLevelIPv6 = 41,
|
||||
//#endif
|
||||
};
|
||||
|
||||
enum SocketOptionName
|
||||
{
|
||||
kSocketOptionNameDebug = 1,
|
||||
kSocketOptionNameAcceptConnection = 2,
|
||||
kSocketOptionNameReuseAddress = 4,
|
||||
kSocketOptionNameKeepAlive = 8,
|
||||
kSocketOptionNameDontRoute = 16,
|
||||
kSocketOptionNameBroadcast = 32,
|
||||
kSocketOptionNameUseLoopback = 64,
|
||||
kSocketOptionNameLinger = 128,
|
||||
kSocketOptionNameOutOfBandInline = 256,
|
||||
kSocketOptionNameDontLinger = -129,
|
||||
kSocketOptionNameExclusiveAddressUse = -5,
|
||||
kSocketOptionNameSendBuffer = 4097,
|
||||
kSocketOptionNameReceiveBuffer = 4098,
|
||||
kSocketOptionNameSendLowWater = 4099,
|
||||
kSocketOptionNameReceiveLowWater = 4100,
|
||||
kSocketOptionNameSendTimeout = 4101,
|
||||
kSocketOptionNameReceiveTimeout = 4102,
|
||||
kSocketOptionNameError = 4103,
|
||||
kSocketOptionNameType = 4104,
|
||||
kSocketOptionNameMaxConnections = 2147483647,
|
||||
kSocketOptionNameIPOptions = 1,
|
||||
kSocketOptionNameHeaderIncluded = 2,
|
||||
kSocketOptionNameTypeOfService = 3,
|
||||
kSocketOptionNameIpTimeToLive = 4,
|
||||
kSocketOptionNameMulticastInterface = 9,
|
||||
kSocketOptionNameMulticastTimeToLive = 10,
|
||||
kSocketOptionNameMulticastLoopback = 11,
|
||||
kSocketOptionNameAddMembership = 12,
|
||||
kSocketOptionNameDropMembership = 13,
|
||||
kSocketOptionNameDontFragment = 14,
|
||||
kSocketOptionNameAddSourceMembership = 15,
|
||||
kSocketOptionNameDropSourceMembership = 16,
|
||||
kSocketOptionNameBlockSource = 17,
|
||||
kSocketOptionNameUnblockSource = 18,
|
||||
kSocketOptionNamePacketInformation = 19,
|
||||
kSocketOptionNameNoDelay = 1,
|
||||
kSocketOptionNameBsdUrgent = 2,
|
||||
kSocketOptionNameExpedited = 2,
|
||||
kSocketOptionNameNoChecksum = 1,
|
||||
kSocketOptionNameChecksumCoverage = 20,
|
||||
|
||||
// #if NET_2_0
|
||||
kSocketOptionNameHopLimit = 21,
|
||||
kSocketOptionNameUpdateAcceptContext = 28683,
|
||||
kSocketOptionNameUpdateConnectContext = 28688,
|
||||
// #endif
|
||||
};
|
||||
|
||||
enum SelectMode
|
||||
{
|
||||
kSelectModeSelectRead = 0,
|
||||
kSelectModeSelectWrite = 1,
|
||||
kSelectModeSelectError = 2,
|
||||
};
|
||||
|
||||
enum SocketFlags
|
||||
{
|
||||
kSocketFlagsNone = 0x00000000,
|
||||
kSocketFlagsOutOfBand = 0x00000001,
|
||||
kSocketFlagsPeek = 0x00000002,
|
||||
kSocketFlagsDontRoute = 0x00000004,
|
||||
kSocketFlagsMaxIOVectorLength = 0x00000010,
|
||||
// #if NET_2_0
|
||||
kSocketFlagsTruncated = 0x00000100,
|
||||
kSocketFlagsControlDataTruncated = 0x00000200,
|
||||
kSocketFlagsBroadcast = 0x00000400,
|
||||
kSocketFlagsMulticast = 0x00000800,
|
||||
// #endif
|
||||
kSocketFlagsPartial = 0x00008000,
|
||||
};
|
||||
|
||||
enum TransmitFileOptions
|
||||
{
|
||||
kTransmitFileOptionsUseDefaultWorkerThread = 0x00000000,
|
||||
kTransmitFileOptionsDisconnect = 0x00000001,
|
||||
kTransmitFileOptionsReuseSocket = 0x00000002,
|
||||
kTransmitFileOptionsWriteBehind = 0x00000004,
|
||||
kTransmitFileOptionsUseSystemThread = 0x00000010,
|
||||
kTransmitFileOptionsUseKernelApc = 0x00000020,
|
||||
};
|
||||
|
||||
enum SocketShutdown
|
||||
{
|
||||
kSocketShutdownReceive = 0,
|
||||
kSocketShutdownSend = 1,
|
||||
kSocketShutdownBoth = 2,
|
||||
};
|
||||
|
||||
class LIBIL2CPP_CODEGEN_API Socket
|
||||
{
|
||||
public:
|
||||
static intptr_t Accept(intptr_t, int32_t*, bool);
|
||||
static int32_t Available(intptr_t, int32_t*);
|
||||
static void Bind(intptr_t, Il2CppSocketAddress*, int32_t*);
|
||||
static void Blocking(intptr_t, bool, int32_t*);
|
||||
static void Close(intptr_t, int32_t*);
|
||||
static void Connect(intptr_t, Il2CppSocketAddress*, int32_t*);
|
||||
static void Disconnect(intptr_t, bool, int32_t*);
|
||||
static void GetSocketOptionArray(intptr_t, SocketOptionLevel, SocketOptionName, Il2CppArray**, int32_t*);
|
||||
static void GetSocketOptionObj(intptr_t, SocketOptionLevel, SocketOptionName, Il2CppObject**, int32_t*);
|
||||
static void Listen(intptr_t, int32_t, int32_t*);
|
||||
static Il2CppSocketAddress* LocalEndPoint(intptr_t, int32_t*);
|
||||
static bool Poll(intptr_t, SelectMode, int32_t, int32_t*);
|
||||
static int32_t ReceiveArray(intptr_t, Il2CppArray*, SocketFlags, int32_t*);
|
||||
static int32_t Receive(intptr_t, Il2CppArray*, int32_t, int32_t, SocketFlags, int32_t*);
|
||||
static int32_t RecvFrom(intptr_t, Il2CppArray*, int32_t, int32_t, SocketFlags, Il2CppSocketAddress**, int32_t*);
|
||||
static Il2CppSocketAddress* RemoteEndPoint(intptr_t, int32_t*);
|
||||
static void Select(Il2CppArray**, int32_t, int32_t*);
|
||||
static bool SendFile(intptr_t, Il2CppString*, Il2CppArray*, Il2CppArray*, TransmitFileOptions);
|
||||
static int32_t SendTo(intptr_t, Il2CppArray*, int32_t, int32_t, SocketFlags, Il2CppSocketAddress*, int32_t*);
|
||||
static int32_t SendArray(intptr_t, Il2CppArray*, SocketFlags, int32_t*);
|
||||
static int32_t Send(intptr_t, Il2CppArray*, int32_t, int32_t, SocketFlags, int32_t*);
|
||||
static void SetSocketOption(intptr_t, SocketOptionLevel, SocketOptionName, Il2CppObject*, Il2CppArray*, int32_t, int32_t*);
|
||||
static void Shutdown(intptr_t, SocketShutdown, int32_t*);
|
||||
static intptr_t Socket_internal(Il2CppObject * self, AddressFamily, SocketType, ProtocolType, int32_t*);
|
||||
static int32_t WSAIoctl(intptr_t, int32_t, Il2CppArray*, Il2CppArray*, int32_t*);
|
||||
#if NET_4_0
|
||||
static bool SendFile_internal(intptr_t sock, Il2CppString* filename, Il2CppArray* pre_buffer, Il2CppArray* post_buffer, int32_t flags, int32_t* error, bool blocking);
|
||||
static bool SupportsPortReuse(ProtocolType proto);
|
||||
static int32_t IOControl_internal(intptr_t sock, int32_t ioctl_code, Il2CppArray* input, Il2CppArray* output, int32_t* error);
|
||||
static int32_t ReceiveFrom_internal(intptr_t sock, uint8_t* buffer, int32_t count, SocketFlags flags, Il2CppSocketAddress** sockaddr, int32_t* error, bool blocking);
|
||||
static int32_t SendTo_internal(intptr_t sock, uint8_t* buffer, int32_t count, SocketFlags flags, Il2CppSocketAddress* sa, int32_t* error, bool blocking);
|
||||
static Il2CppSocketAddress* LocalEndPoint_internal(intptr_t socket, int32_t family, int32_t* error);
|
||||
static Il2CppSocketAddress* RemoteEndPoint_internal(intptr_t socket, int32_t family, int32_t* error);
|
||||
static void cancel_blocking_socket_operation(Il2CppObject* thread);
|
||||
static void Connect_internal(intptr_t sock, Il2CppSocketAddress* sa, int32_t* error, bool blocking);
|
||||
static bool Duplicate_internal(intptr_t handle, int32_t targetProcessId, intptr_t *duplicate_handle, int32_t *werror);
|
||||
|
||||
static int32_t ReceiveArray40(intptr_t, void*, int32_t, SocketFlags, int32_t*, bool);
|
||||
static int32_t Receive40(intptr_t, uint8_t*, int32_t, SocketFlags, int32_t*, bool);
|
||||
static int32_t SendArray40(intptr_t, void*, int32_t, SocketFlags, int32_t*, bool);
|
||||
static int32_t Send40(intptr_t, uint8_t*, int32_t, SocketFlags, int32_t*, bool);
|
||||
static bool IsProtocolSupported_internal(int32_t networkInterface);
|
||||
#endif
|
||||
};
|
||||
} /* namespace Sockets */
|
||||
} /* namespace Net */
|
||||
} /* namespace System */
|
||||
} /* namespace System */
|
||||
} /* namespace icalls */
|
||||
} /* namespace il2cpp */
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include "il2cpp-config.h"
|
||||
|
||||
struct Il2CppArray;
|
||||
struct Il2CppString;
|
||||
|
||||
namespace il2cpp
|
||||
{
|
||||
namespace icalls
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace Net
|
||||
{
|
||||
namespace Sockets
|
||||
{
|
||||
class LIBIL2CPP_CODEGEN_API SocketException
|
||||
{
|
||||
public:
|
||||
static int32_t WSAGetLastError();
|
||||
};
|
||||
} /* namespace Sockets */
|
||||
} /* namespace Net */
|
||||
} /* namespace System */
|
||||
} /* namespace System */
|
||||
} /* namespace icalls */
|
||||
} /* namespace il2cpp */
|
||||
@@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include "il2cpp-config.h"
|
||||
|
||||
struct Il2CppArray;
|
||||
struct Il2CppString;
|
||||
|
||||
namespace il2cpp
|
||||
{
|
||||
namespace icalls
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace Net
|
||||
{
|
||||
class LIBIL2CPP_CODEGEN_API Dns
|
||||
{
|
||||
public:
|
||||
static bool GetHostByAddr(Il2CppString*, Il2CppString**, Il2CppArray**, Il2CppArray**);
|
||||
static bool GetHostByName(Il2CppString*, Il2CppString**, Il2CppArray**, Il2CppArray**);
|
||||
#if NET_4_0
|
||||
static bool GetHostByAddr40(Il2CppString*, Il2CppString**, Il2CppArray**, Il2CppArray**, int32_t hint);
|
||||
static bool GetHostByName40(Il2CppString*, Il2CppString**, Il2CppArray**, Il2CppArray**, int32_t hint);
|
||||
#endif
|
||||
static bool GetHostName(Il2CppString**);
|
||||
};
|
||||
} /* namespace Net */
|
||||
} /* namespace System */
|
||||
} /* namespace System */
|
||||
} /* namespace icalls */
|
||||
} /* namespace il2cpp */
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include "il2cpp-config.h"
|
||||
#include "il2cpp-object-internals.h"
|
||||
|
||||
struct Il2CppString;
|
||||
|
||||
namespace il2cpp
|
||||
{
|
||||
namespace icalls
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace Threading
|
||||
{
|
||||
class LIBIL2CPP_CODEGEN_API Semaphore
|
||||
{
|
||||
public:
|
||||
#if !NET_4_0
|
||||
static intptr_t CreateSemaphore_internal(int32_t initialCount, int32_t maximumCount, Il2CppString* name, bool* created);
|
||||
static int32_t ReleaseSemaphore_internal(intptr_t handlePtr, int32_t releaseCount, bool* fail);
|
||||
#else
|
||||
static intptr_t CreateSemaphore_internal40(int32_t initialCount, int32_t maximumCount, Il2CppString* name, int32_t* errorCode);
|
||||
static bool ReleaseSemaphore_internal40(intptr_t handlePtr, int32_t releaseCount, int32_t* previousCount);
|
||||
#endif
|
||||
static intptr_t OpenSemaphore_internal(Il2CppString* name, int32_t rights, int32_t* error);
|
||||
};
|
||||
} /* namespace Threading */
|
||||
} /* namespace System */
|
||||
} /* namespace System */
|
||||
} /* namespace icalls */
|
||||
} /* namespace il2cpp */
|
||||
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
#if NET_4_0
|
||||
#include "il2cpp-object-internals.h"
|
||||
|
||||
namespace il2cpp
|
||||
{
|
||||
namespace icalls
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
class LIBIL2CPP_CODEGEN_API IOSelector
|
||||
{
|
||||
public:
|
||||
static void Add(intptr_t handle, Il2CppObject* job);
|
||||
static void Remove(intptr_t handle);
|
||||
};
|
||||
} // namespace System
|
||||
} // namespace System
|
||||
} // namespace icalls
|
||||
} // namespace il2cpp
|
||||
#endif
|
||||
Reference in New Issue
Block a user