diff --git a/android/app/src/main/kotlin/com/hiddify/hiddify/MethodHandler.kt b/android/app/src/main/kotlin/com/hiddify/hiddify/MethodHandler.kt index 0608b012..33677dc7 100644 --- a/android/app/src/main/kotlin/com/hiddify/hiddify/MethodHandler.kt +++ b/android/app/src/main/kotlin/com/hiddify/hiddify/MethodHandler.kt @@ -25,7 +25,7 @@ class MethodHandler(private val scope: CoroutineScope) : FlutterPlugin, enum class Trigger(val method: String) { Setup("setup"), ParseConfig("parse_config"), - ChangeConfigOptions("change_config_options"), + changeHiddifyOptions("change_hiddify_options"), GenerateConfig("generate_config"), Start("start"), Stop("stop"), @@ -73,7 +73,7 @@ class MethodHandler(private val scope: CoroutineScope) : FlutterPlugin, } } - Trigger.ChangeConfigOptions.method -> { + Trigger.ChangeHiddifyOptions.method -> { scope.launch { result.runCatching { val args = call.arguments as String diff --git a/lib/gen/singbox_generated_bindings.dart b/lib/gen/singbox_generated_bindings.dart index 0be05855..f006cedd 100644 --- a/lib/gen/singbox_generated_bindings.dart +++ b/lib/gen/singbox_generated_bindings.dart @@ -20,20 +20,2325 @@ class SingboxNativeLibrary { lookup) : _lookup = lookup; - ffi.Pointer AdminServiceStart( - ffi.Pointer arg, + ffi.Pointer> signal( + int arg0, + ffi.Pointer> arg1, ) { - return _AdminServiceStart( - arg, + return _signal( + arg0, + arg1, ); } - late final _AdminServiceStartPtr = _lookup< + late final _signalPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer> Function( + ffi.Int, + ffi.Pointer< + ffi.NativeFunction>)>>('signal'); + late final _signal = _signalPtr.asFunction< + ffi.Pointer> Function( + int, ffi.Pointer>)>(); + + int getpriority( + int arg0, + int arg1, + ) { + return _getpriority( + arg0, + arg1, + ); + } + + late final _getpriorityPtr = + _lookup>( + 'getpriority'); + late final _getpriority = + _getpriorityPtr.asFunction(); + + int getiopolicy_np( + int arg0, + int arg1, + ) { + return _getiopolicy_np( + arg0, + arg1, + ); + } + + late final _getiopolicy_npPtr = + _lookup>( + 'getiopolicy_np'); + late final _getiopolicy_np = + _getiopolicy_npPtr.asFunction(); + + int getrlimit( + int arg0, + ffi.Pointer arg1, + ) { + return _getrlimit( + arg0, + arg1, + ); + } + + late final _getrlimitPtr = _lookup< + ffi.NativeFunction)>>( + 'getrlimit'); + late final _getrlimit = + _getrlimitPtr.asFunction)>(); + + int getrusage( + int arg0, + ffi.Pointer arg1, + ) { + return _getrusage( + arg0, + arg1, + ); + } + + late final _getrusagePtr = _lookup< + ffi.NativeFunction)>>( + 'getrusage'); + late final _getrusage = + _getrusagePtr.asFunction)>(); + + int setpriority( + int arg0, + int arg1, + int arg2, + ) { + return _setpriority( + arg0, + arg1, + arg2, + ); + } + + late final _setpriorityPtr = + _lookup>( + 'setpriority'); + late final _setpriority = + _setpriorityPtr.asFunction(); + + int setiopolicy_np( + int arg0, + int arg1, + int arg2, + ) { + return _setiopolicy_np( + arg0, + arg1, + arg2, + ); + } + + late final _setiopolicy_npPtr = + _lookup>( + 'setiopolicy_np'); + late final _setiopolicy_np = + _setiopolicy_npPtr.asFunction(); + + int setrlimit( + int arg0, + ffi.Pointer arg1, + ) { + return _setrlimit( + arg0, + arg1, + ); + } + + late final _setrlimitPtr = _lookup< + ffi.NativeFunction)>>( + 'setrlimit'); + late final _setrlimit = + _setrlimitPtr.asFunction)>(); + + int wait1( + ffi.Pointer arg0, + ) { + return _wait1( + arg0, + ); + } + + late final _wait1Ptr = + _lookup)>>('wait'); + late final _wait1 = + _wait1Ptr.asFunction)>(); + + int waitpid( + int arg0, + ffi.Pointer arg1, + int arg2, + ) { + return _waitpid( + arg0, + arg1, + arg2, + ); + } + + late final _waitpidPtr = _lookup< + ffi.NativeFunction< + pid_t Function(pid_t, ffi.Pointer, ffi.Int)>>('waitpid'); + late final _waitpid = + _waitpidPtr.asFunction, int)>(); + + int waitid( + int arg0, + int arg1, + ffi.Pointer arg2, + int arg3, + ) { + return _waitid( + arg0, + arg1, + arg2, + arg3, + ); + } + + late final _waitidPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int32, id_t, ffi.Pointer, ffi.Int)>>('waitid'); + late final _waitid = _waitidPtr + .asFunction, int)>(); + + int wait3( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, + ) { + return _wait3( + arg0, + arg1, + arg2, + ); + } + + late final _wait3Ptr = _lookup< + ffi.NativeFunction< + pid_t Function( + ffi.Pointer, ffi.Int, ffi.Pointer)>>('wait3'); + late final _wait3 = _wait3Ptr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer)>(); + + int wait4( + int arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer arg3, + ) { + return _wait4( + arg0, + arg1, + arg2, + arg3, + ); + } + + late final _wait4Ptr = _lookup< + ffi.NativeFunction< + pid_t Function(pid_t, ffi.Pointer, ffi.Int, + ffi.Pointer)>>('wait4'); + late final _wait4 = _wait4Ptr.asFunction< + int Function(int, ffi.Pointer, int, ffi.Pointer)>(); + + ffi.Pointer alloca( + int arg0, + ) { + return _alloca( + arg0, + ); + } + + late final _allocaPtr = + _lookup Function(ffi.Size)>>( + 'alloca'); + late final _alloca = + _allocaPtr.asFunction Function(int)>(); + + late final ffi.Pointer ___mb_cur_max = + _lookup('__mb_cur_max'); + + int get __mb_cur_max => ___mb_cur_max.value; + + set __mb_cur_max(int value) => ___mb_cur_max.value = value; + + ffi.Pointer malloc_type_malloc( + int size, + int type_id, + ) { + return _malloc_type_malloc( + size, + type_id, + ); + } + + late final _malloc_type_mallocPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Size, malloc_type_id_t)>>('malloc_type_malloc'); + late final _malloc_type_malloc = _malloc_type_mallocPtr + .asFunction Function(int, int)>(); + + ffi.Pointer malloc_type_calloc( + int count, + int size, + int type_id, + ) { + return _malloc_type_calloc( + count, + size, + type_id, + ); + } + + late final _malloc_type_callocPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Size, ffi.Size, malloc_type_id_t)>>('malloc_type_calloc'); + late final _malloc_type_calloc = _malloc_type_callocPtr + .asFunction Function(int, int, int)>(); + + void malloc_type_free( + ffi.Pointer ptr, + int type_id, + ) { + return _malloc_type_free( + ptr, + type_id, + ); + } + + late final _malloc_type_freePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, malloc_type_id_t)>>('malloc_type_free'); + late final _malloc_type_free = _malloc_type_freePtr + .asFunction, int)>(); + + ffi.Pointer malloc_type_realloc( + ffi.Pointer ptr, + int size, + int type_id, + ) { + return _malloc_type_realloc( + ptr, + size, + type_id, + ); + } + + late final _malloc_type_reallocPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Size, + malloc_type_id_t)>>('malloc_type_realloc'); + late final _malloc_type_realloc = _malloc_type_reallocPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, int, int)>(); + + ffi.Pointer malloc_type_valloc( + int size, + int type_id, + ) { + return _malloc_type_valloc( + size, + type_id, + ); + } + + late final _malloc_type_vallocPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Size, malloc_type_id_t)>>('malloc_type_valloc'); + late final _malloc_type_valloc = _malloc_type_vallocPtr + .asFunction Function(int, int)>(); + + ffi.Pointer malloc_type_aligned_alloc( + int alignment, + int size, + int type_id, + ) { + return _malloc_type_aligned_alloc( + alignment, + size, + type_id, + ); + } + + late final _malloc_type_aligned_allocPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Size, ffi.Size, + malloc_type_id_t)>>('malloc_type_aligned_alloc'); + late final _malloc_type_aligned_alloc = _malloc_type_aligned_allocPtr + .asFunction Function(int, int, int)>(); + + int malloc_type_posix_memalign( + ffi.Pointer> memptr, + int alignment, + int size, + int type_id, + ) { + return _malloc_type_posix_memalign( + memptr, + alignment, + size, + type_id, + ); + } + + late final _malloc_type_posix_memalignPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer>, ffi.Size, + ffi.Size, malloc_type_id_t)>>('malloc_type_posix_memalign'); + late final _malloc_type_posix_memalign = + _malloc_type_posix_memalignPtr.asFunction< + int Function(ffi.Pointer>, int, int, int)>(); + + ffi.Pointer malloc_type_zone_malloc( + ffi.Pointer zone, + int size, + int type_id, + ) { + return _malloc_type_zone_malloc( + zone, + size, + type_id, + ); + } + + late final _malloc_type_zone_mallocPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Size, + malloc_type_id_t)>>('malloc_type_zone_malloc'); + late final _malloc_type_zone_malloc = _malloc_type_zone_mallocPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, int, int)>(); + + ffi.Pointer malloc_type_zone_calloc( + ffi.Pointer zone, + int count, + int size, + int type_id, + ) { + return _malloc_type_zone_calloc( + zone, + count, + size, + type_id, + ); + } + + late final _malloc_type_zone_callocPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Size, + ffi.Size, malloc_type_id_t)>>('malloc_type_zone_calloc'); + late final _malloc_type_zone_calloc = _malloc_type_zone_callocPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, int, int, int)>(); + + void malloc_type_zone_free( + ffi.Pointer zone, + ffi.Pointer ptr, + int type_id, + ) { + return _malloc_type_zone_free( + zone, + ptr, + type_id, + ); + } + + late final _malloc_type_zone_freePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + malloc_type_id_t)>>('malloc_type_zone_free'); + late final _malloc_type_zone_free = _malloc_type_zone_freePtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + ffi.Pointer malloc_type_zone_realloc( + ffi.Pointer zone, + ffi.Pointer ptr, + int size, + int type_id, + ) { + return _malloc_type_zone_realloc( + zone, + ptr, + size, + type_id, + ); + } + + late final _malloc_type_zone_reallocPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Size, + malloc_type_id_t)>>('malloc_type_zone_realloc'); + late final _malloc_type_zone_realloc = + _malloc_type_zone_reallocPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int, int)>(); + + ffi.Pointer malloc_type_zone_valloc( + ffi.Pointer zone, + int size, + int type_id, + ) { + return _malloc_type_zone_valloc( + zone, + size, + type_id, + ); + } + + late final _malloc_type_zone_vallocPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Size, + malloc_type_id_t)>>('malloc_type_zone_valloc'); + late final _malloc_type_zone_valloc = _malloc_type_zone_vallocPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, int, int)>(); + + ffi.Pointer malloc_type_zone_memalign( + ffi.Pointer zone, + int alignment, + int size, + int type_id, + ) { + return _malloc_type_zone_memalign( + zone, + alignment, + size, + type_id, + ); + } + + late final _malloc_type_zone_memalignPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Size, + ffi.Size, malloc_type_id_t)>>('malloc_type_zone_memalign'); + late final _malloc_type_zone_memalign = + _malloc_type_zone_memalignPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, int, int, int)>(); + + ffi.Pointer malloc( + int __size, + ) { + return _malloc( + __size, + ); + } + + late final _mallocPtr = + _lookup Function(ffi.Size)>>( + 'malloc'); + late final _malloc = + _mallocPtr.asFunction Function(int)>(); + + ffi.Pointer calloc( + int __count, + int __size, + ) { + return _calloc( + __count, + __size, + ); + } + + late final _callocPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Size, ffi.Size)>>('calloc'); + late final _calloc = + _callocPtr.asFunction Function(int, int)>(); + + void free( + ffi.Pointer arg0, + ) { + return _free( + arg0, + ); + } + + late final _freePtr = + _lookup)>>( + 'free'); + late final _free = + _freePtr.asFunction)>(); + + ffi.Pointer realloc( + ffi.Pointer __ptr, + int __size, + ) { + return _realloc( + __ptr, + __size, + ); + } + + late final _reallocPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Size)>>('realloc'); + late final _realloc = _reallocPtr + .asFunction Function(ffi.Pointer, int)>(); + + ffi.Pointer reallocf( + ffi.Pointer __ptr, + int __size, + ) { + return _reallocf( + __ptr, + __size, + ); + } + + late final _reallocfPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Size)>>('reallocf'); + late final _reallocf = _reallocfPtr + .asFunction Function(ffi.Pointer, int)>(); + + ffi.Pointer valloc( + int arg0, + ) { + return _valloc( + arg0, + ); + } + + late final _vallocPtr = + _lookup Function(ffi.Size)>>( + 'valloc'); + late final _valloc = + _vallocPtr.asFunction Function(int)>(); + + ffi.Pointer aligned_alloc( + int __alignment, + int __size, + ) { + return _aligned_alloc( + __alignment, + __size, + ); + } + + late final _aligned_allocPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Size, ffi.Size)>>('aligned_alloc'); + late final _aligned_alloc = + _aligned_allocPtr.asFunction Function(int, int)>(); + + int posix_memalign( + ffi.Pointer> __memptr, + int __alignment, + int __size, + ) { + return _posix_memalign( + __memptr, + __alignment, + __size, + ); + } + + late final _posix_memalignPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer>, ffi.Size, + ffi.Size)>>('posix_memalign'); + late final _posix_memalign = _posix_memalignPtr + .asFunction>, int, int)>(); + + void abort() { + return _abort(); + } + + late final _abortPtr = + _lookup>('abort'); + late final _abort = _abortPtr.asFunction(); + + int abs( + int arg0, + ) { + return _abs( + arg0, + ); + } + + late final _absPtr = + _lookup>('abs'); + late final _abs = _absPtr.asFunction(); + + int atexit( + ffi.Pointer> arg0, + ) { + return _atexit( + arg0, + ); + } + + late final _atexitPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer>)>>('atexit'); + late final _atexit = _atexitPtr.asFunction< + int Function(ffi.Pointer>)>(); + + double atof( + ffi.Pointer arg0, + ) { + return _atof( + arg0, + ); + } + + late final _atofPtr = + _lookup)>>( + 'atof'); + late final _atof = + _atofPtr.asFunction)>(); + + int atoi( + ffi.Pointer arg0, + ) { + return _atoi( + arg0, + ); + } + + late final _atoiPtr = + _lookup)>>( + 'atoi'); + late final _atoi = _atoiPtr.asFunction)>(); + + int atol( + ffi.Pointer arg0, + ) { + return _atol( + arg0, + ); + } + + late final _atolPtr = + _lookup)>>( + 'atol'); + late final _atol = _atolPtr.asFunction)>(); + + int atoll( + ffi.Pointer arg0, + ) { + return _atoll( + arg0, + ); + } + + late final _atollPtr = + _lookup)>>( + 'atoll'); + late final _atoll = + _atollPtr.asFunction)>(); + + ffi.Pointer bsearch( + ffi.Pointer __key, + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>> + __compar, + ) { + return _bsearch( + __key, + __base, + __nel, + __width, + __compar, + ); + } + + late final _bsearchPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>)>>('bsearch'); + late final _bsearch = _bsearchPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>)>(); + + div_t div( + int arg0, + int arg1, + ) { + return _div( + arg0, + arg1, + ); + } + + late final _divPtr = + _lookup>('div'); + late final _div = _divPtr.asFunction(); + + void exit( + int arg0, + ) { + return _exit( + arg0, + ); + } + + late final _exitPtr = + _lookup>('exit'); + late final _exit = _exitPtr.asFunction(); + + ffi.Pointer getenv( + ffi.Pointer arg0, + ) { + return _getenv( + arg0, + ); + } + + late final _getenvPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('getenv'); + late final _getenv = _getenvPtr + .asFunction Function(ffi.Pointer)>(); + + int labs( + int arg0, + ) { + return _labs( + arg0, + ); + } + + late final _labsPtr = + _lookup>('labs'); + late final _labs = _labsPtr.asFunction(); + + ldiv_t ldiv( + int arg0, + int arg1, + ) { + return _ldiv( + arg0, + arg1, + ); + } + + late final _ldivPtr = + _lookup>('ldiv'); + late final _ldiv = _ldivPtr.asFunction(); + + int llabs( + int arg0, + ) { + return _llabs( + arg0, + ); + } + + late final _llabsPtr = + _lookup>('llabs'); + late final _llabs = _llabsPtr.asFunction(); + + lldiv_t lldiv( + int arg0, + int arg1, + ) { + return _lldiv( + arg0, + arg1, + ); + } + + late final _lldivPtr = + _lookup>( + 'lldiv'); + late final _lldiv = _lldivPtr.asFunction(); + + int mblen( + ffi.Pointer __s, + int __n, + ) { + return _mblen( + __s, + __n, + ); + } + + late final _mblenPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Size)>>('mblen'); + late final _mblen = + _mblenPtr.asFunction, int)>(); + + int mbstowcs( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ) { + return _mbstowcs( + arg0, + arg1, + arg2, + ); + } + + late final _mbstowcsPtr = _lookup< + ffi.NativeFunction< + ffi.Size Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('mbstowcs'); + late final _mbstowcs = _mbstowcsPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); + + int mbtowc( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ) { + return _mbtowc( + arg0, + arg1, + arg2, + ); + } + + late final _mbtowcPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('mbtowc'); + late final _mbtowc = _mbtowcPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); + + void qsort( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>> + __compar, + ) { + return _qsort( + __base, + __nel, + __width, + __compar, + ); + } + + late final _qsortPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>)>>('qsort'); + late final _qsort = _qsortPtr.asFunction< + void Function( + ffi.Pointer, + int, + int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>)>(); + + int rand() { + return _rand(); + } + + late final _randPtr = _lookup>('rand'); + late final _rand = _randPtr.asFunction(); + + void srand( + int arg0, + ) { + return _srand( + arg0, + ); + } + + late final _srandPtr = + _lookup>('srand'); + late final _srand = _srandPtr.asFunction(); + + double strtod( + ffi.Pointer arg0, + ffi.Pointer> arg1, + ) { + return _strtod( + arg0, + arg1, + ); + } + + late final _strtodPtr = _lookup< + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer, + ffi.Pointer>)>>('strtod'); + late final _strtod = _strtodPtr.asFunction< + double Function( + ffi.Pointer, ffi.Pointer>)>(); + + double strtof( + ffi.Pointer arg0, + ffi.Pointer> arg1, + ) { + return _strtof( + arg0, + arg1, + ); + } + + late final _strtofPtr = _lookup< + ffi.NativeFunction< + ffi.Float Function(ffi.Pointer, + ffi.Pointer>)>>('strtof'); + late final _strtof = _strtofPtr.asFunction< + double Function( + ffi.Pointer, ffi.Pointer>)>(); + + int strtol( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, + ) { + return _strtol( + __str, + __endptr, + __base, + ); + } + + late final _strtolPtr = _lookup< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtol'); + late final _strtol = _strtolPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); + + int strtoll( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, + ) { + return _strtoll( + __str, + __endptr, + __base, + ); + } + + late final _strtollPtr = _lookup< + ffi.NativeFunction< + ffi.LongLong Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtoll'); + late final _strtoll = _strtollPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); + + int strtoul( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, + ) { + return _strtoul( + __str, + __endptr, + __base, + ); + } + + late final _strtoulPtr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtoul'); + late final _strtoul = _strtoulPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); + + int strtoull( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, + ) { + return _strtoull( + __str, + __endptr, + __base, + ); + } + + late final _strtoullPtr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLongLong Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtoull'); + late final _strtoull = _strtoullPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); + + int system( + ffi.Pointer arg0, + ) { + return _system( + arg0, + ); + } + + late final _systemPtr = + _lookup)>>( + 'system'); + late final _system = + _systemPtr.asFunction)>(); + + int wcstombs( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ) { + return _wcstombs( + arg0, + arg1, + arg2, + ); + } + + late final _wcstombsPtr = _lookup< + ffi.NativeFunction< + ffi.Size Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('wcstombs'); + late final _wcstombs = _wcstombsPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); + + int wctomb( + ffi.Pointer arg0, + int arg1, + ) { + return _wctomb( + arg0, + arg1, + ); + } + + late final _wctombPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.WChar)>>('wctomb'); + late final _wctomb = + _wctombPtr.asFunction, int)>(); + + void _Exit( + int arg0, + ) { + return __Exit( + arg0, + ); + } + + late final __ExitPtr = + _lookup>('_Exit'); + late final __Exit = __ExitPtr.asFunction(); + + int a64l( + ffi.Pointer arg0, + ) { + return _a64l( + arg0, + ); + } + + late final _a64lPtr = + _lookup)>>( + 'a64l'); + late final _a64l = _a64lPtr.asFunction)>(); + + double drand48() { + return _drand48(); + } + + late final _drand48Ptr = + _lookup>('drand48'); + late final _drand48 = _drand48Ptr.asFunction(); + + ffi.Pointer ecvt( + double arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) { + return _ecvt( + arg0, + arg1, + arg2, + arg3, + ); + } + + late final _ecvtPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Double, ffi.Int, + ffi.Pointer, ffi.Pointer)>>('ecvt'); + late final _ecvt = _ecvtPtr.asFunction< + ffi.Pointer Function( + double, int, ffi.Pointer, ffi.Pointer)>(); + + double erand48( + ffi.Pointer arg0, + ) { + return _erand48( + arg0, + ); + } + + late final _erand48Ptr = _lookup< + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer)>>('erand48'); + late final _erand48 = + _erand48Ptr.asFunction)>(); + + ffi.Pointer fcvt( + double arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) { + return _fcvt( + arg0, + arg1, + arg2, + arg3, + ); + } + + late final _fcvtPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Double, ffi.Int, + ffi.Pointer, ffi.Pointer)>>('fcvt'); + late final _fcvt = _fcvtPtr.asFunction< + ffi.Pointer Function( + double, int, ffi.Pointer, ffi.Pointer)>(); + + ffi.Pointer gcvt( + double arg0, + int arg1, + ffi.Pointer arg2, + ) { + return _gcvt( + arg0, + arg1, + arg2, + ); + } + + late final _gcvtPtr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer)>>('AdminServiceStart'); - late final _AdminServiceStart = _AdminServiceStartPtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); + ffi.Double, ffi.Int, ffi.Pointer)>>('gcvt'); + late final _gcvt = _gcvtPtr.asFunction< + ffi.Pointer Function(double, int, ffi.Pointer)>(); + + int getsubopt( + ffi.Pointer> arg0, + ffi.Pointer> arg1, + ffi.Pointer> arg2, + ) { + return _getsubopt( + arg0, + arg1, + arg2, + ); + } + + late final _getsuboptPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer>, + ffi.Pointer>, + ffi.Pointer>)>>('getsubopt'); + late final _getsubopt = _getsuboptPtr.asFunction< + int Function( + ffi.Pointer>, + ffi.Pointer>, + ffi.Pointer>)>(); + + int grantpt( + int arg0, + ) { + return _grantpt( + arg0, + ); + } + + late final _grantptPtr = + _lookup>('grantpt'); + late final _grantpt = _grantptPtr.asFunction(); + + ffi.Pointer initstate( + int arg0, + ffi.Pointer arg1, + int arg2, + ) { + return _initstate( + arg0, + arg1, + arg2, + ); + } + + late final _initstatePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.UnsignedInt, ffi.Pointer, ffi.Size)>>('initstate'); + late final _initstate = _initstatePtr.asFunction< + ffi.Pointer Function(int, ffi.Pointer, int)>(); + + int jrand48( + ffi.Pointer arg0, + ) { + return _jrand48( + arg0, + ); + } + + late final _jrand48Ptr = _lookup< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer)>>('jrand48'); + late final _jrand48 = + _jrand48Ptr.asFunction)>(); + + ffi.Pointer l64a( + int arg0, + ) { + return _l64a( + arg0, + ); + } + + late final _l64aPtr = + _lookup Function(ffi.Long)>>( + 'l64a'); + late final _l64a = _l64aPtr.asFunction Function(int)>(); + + void lcong48( + ffi.Pointer arg0, + ) { + return _lcong48( + arg0, + ); + } + + late final _lcong48Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer)>>('lcong48'); + late final _lcong48 = + _lcong48Ptr.asFunction)>(); + + int lrand48() { + return _lrand48(); + } + + late final _lrand48Ptr = + _lookup>('lrand48'); + late final _lrand48 = _lrand48Ptr.asFunction(); + + ffi.Pointer mktemp( + ffi.Pointer arg0, + ) { + return _mktemp( + arg0, + ); + } + + late final _mktempPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('mktemp'); + late final _mktemp = _mktempPtr + .asFunction Function(ffi.Pointer)>(); + + int mkstemp( + ffi.Pointer arg0, + ) { + return _mkstemp( + arg0, + ); + } + + late final _mkstempPtr = + _lookup)>>( + 'mkstemp'); + late final _mkstemp = + _mkstempPtr.asFunction)>(); + + int mrand48() { + return _mrand48(); + } + + late final _mrand48Ptr = + _lookup>('mrand48'); + late final _mrand48 = _mrand48Ptr.asFunction(); + + int nrand48( + ffi.Pointer arg0, + ) { + return _nrand48( + arg0, + ); + } + + late final _nrand48Ptr = _lookup< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer)>>('nrand48'); + late final _nrand48 = + _nrand48Ptr.asFunction)>(); + + int posix_openpt( + int arg0, + ) { + return _posix_openpt( + arg0, + ); + } + + late final _posix_openptPtr = + _lookup>('posix_openpt'); + late final _posix_openpt = _posix_openptPtr.asFunction(); + + ffi.Pointer ptsname( + int arg0, + ) { + return _ptsname( + arg0, + ); + } + + late final _ptsnamePtr = + _lookup Function(ffi.Int)>>( + 'ptsname'); + late final _ptsname = + _ptsnamePtr.asFunction Function(int)>(); + + int ptsname_r( + int fildes, + ffi.Pointer buffer, + int buflen, + ) { + return _ptsname_r( + fildes, + buffer, + buflen, + ); + } + + late final _ptsname_rPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Size)>>('ptsname_r'); + late final _ptsname_r = + _ptsname_rPtr.asFunction, int)>(); + + int putenv( + ffi.Pointer arg0, + ) { + return _putenv( + arg0, + ); + } + + late final _putenvPtr = + _lookup)>>( + 'putenv'); + late final _putenv = + _putenvPtr.asFunction)>(); + + int random() { + return _random(); + } + + late final _randomPtr = + _lookup>('random'); + late final _random = _randomPtr.asFunction(); + + int rand_r( + ffi.Pointer arg0, + ) { + return _rand_r( + arg0, + ); + } + + late final _rand_rPtr = _lookup< + ffi.NativeFunction)>>( + 'rand_r'); + late final _rand_r = + _rand_rPtr.asFunction)>(); + + ffi.Pointer realpath( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _realpath( + arg0, + arg1, + ); + } + + late final _realpathPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('realpath'); + late final _realpath = _realpathPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + ffi.Pointer seed48( + ffi.Pointer arg0, + ) { + return _seed48( + arg0, + ); + } + + late final _seed48Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>>('seed48'); + late final _seed48 = _seed48Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer)>(); + + int setenv( + ffi.Pointer __name, + ffi.Pointer __value, + int __overwrite, + ) { + return _setenv( + __name, + __value, + __overwrite, + ); + } + + late final _setenvPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Int)>>('setenv'); + late final _setenv = _setenvPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); + + void setkey( + ffi.Pointer arg0, + ) { + return _setkey( + arg0, + ); + } + + late final _setkeyPtr = + _lookup)>>( + 'setkey'); + late final _setkey = + _setkeyPtr.asFunction)>(); + + ffi.Pointer setstate( + ffi.Pointer arg0, + ) { + return _setstate( + arg0, + ); + } + + late final _setstatePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('setstate'); + late final _setstate = _setstatePtr + .asFunction Function(ffi.Pointer)>(); + + void srand48( + int arg0, + ) { + return _srand48( + arg0, + ); + } + + late final _srand48Ptr = + _lookup>('srand48'); + late final _srand48 = _srand48Ptr.asFunction(); + + void srandom( + int arg0, + ) { + return _srandom( + arg0, + ); + } + + late final _srandomPtr = + _lookup>( + 'srandom'); + late final _srandom = _srandomPtr.asFunction(); + + int unlockpt( + int arg0, + ) { + return _unlockpt( + arg0, + ); + } + + late final _unlockptPtr = + _lookup>('unlockpt'); + late final _unlockpt = _unlockptPtr.asFunction(); + + int unsetenv( + ffi.Pointer arg0, + ) { + return _unsetenv( + arg0, + ); + } + + late final _unsetenvPtr = + _lookup)>>( + 'unsetenv'); + late final _unsetenv = + _unsetenvPtr.asFunction)>(); + + int arc4random() { + return _arc4random(); + } + + late final _arc4randomPtr = + _lookup>('arc4random'); + late final _arc4random = _arc4randomPtr.asFunction(); + + void arc4random_addrandom( + ffi.Pointer arg0, + int arg1, + ) { + return _arc4random_addrandom( + arg0, + arg1, + ); + } + + late final _arc4random_addrandomPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, ffi.Int)>>('arc4random_addrandom'); + late final _arc4random_addrandom = _arc4random_addrandomPtr + .asFunction, int)>(); + + void arc4random_buf( + ffi.Pointer __buf, + int __nbytes, + ) { + return _arc4random_buf( + __buf, + __nbytes, + ); + } + + late final _arc4random_bufPtr = _lookup< + ffi + .NativeFunction, ffi.Size)>>( + 'arc4random_buf'); + late final _arc4random_buf = _arc4random_bufPtr + .asFunction, int)>(); + + void arc4random_stir() { + return _arc4random_stir(); + } + + late final _arc4random_stirPtr = + _lookup>('arc4random_stir'); + late final _arc4random_stir = + _arc4random_stirPtr.asFunction(); + + int arc4random_uniform( + int __upper_bound, + ) { + return _arc4random_uniform( + __upper_bound, + ); + } + + late final _arc4random_uniformPtr = + _lookup>( + 'arc4random_uniform'); + late final _arc4random_uniform = + _arc4random_uniformPtr.asFunction(); + + ffi.Pointer cgetcap( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ) { + return _cgetcap( + arg0, + arg1, + arg2, + ); + } + + late final _cgetcapPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int)>>('cgetcap'); + late final _cgetcap = _cgetcapPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + int cgetclose() { + return _cgetclose(); + } + + late final _cgetclosePtr = + _lookup>('cgetclose'); + late final _cgetclose = _cgetclosePtr.asFunction(); + + int cgetent( + ffi.Pointer> arg0, + ffi.Pointer> arg1, + ffi.Pointer arg2, + ) { + return _cgetent( + arg0, + arg1, + arg2, + ); + } + + late final _cgetentPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer>, + ffi.Pointer>, + ffi.Pointer)>>('cgetent'); + late final _cgetent = _cgetentPtr.asFunction< + int Function(ffi.Pointer>, + ffi.Pointer>, ffi.Pointer)>(); + + int cgetfirst( + ffi.Pointer> arg0, + ffi.Pointer> arg1, + ) { + return _cgetfirst( + arg0, + arg1, + ); + } + + late final _cgetfirstPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer>, + ffi.Pointer>)>>('cgetfirst'); + late final _cgetfirst = _cgetfirstPtr.asFunction< + int Function(ffi.Pointer>, + ffi.Pointer>)>(); + + int cgetmatch( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _cgetmatch( + arg0, + arg1, + ); + } + + late final _cgetmatchPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('cgetmatch'); + late final _cgetmatch = _cgetmatchPtr + .asFunction, ffi.Pointer)>(); + + int cgetnext( + ffi.Pointer> arg0, + ffi.Pointer> arg1, + ) { + return _cgetnext( + arg0, + arg1, + ); + } + + late final _cgetnextPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer>, + ffi.Pointer>)>>('cgetnext'); + late final _cgetnext = _cgetnextPtr.asFunction< + int Function(ffi.Pointer>, + ffi.Pointer>)>(); + + int cgetnum( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) { + return _cgetnum( + arg0, + arg1, + arg2, + ); + } + + late final _cgetnumPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('cgetnum'); + late final _cgetnum = _cgetnumPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + int cgetset( + ffi.Pointer arg0, + ) { + return _cgetset( + arg0, + ); + } + + late final _cgetsetPtr = + _lookup)>>( + 'cgetset'); + late final _cgetset = + _cgetsetPtr.asFunction)>(); + + int cgetstr( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, + ) { + return _cgetstr( + arg0, + arg1, + arg2, + ); + } + + late final _cgetstrPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>>('cgetstr'); + late final _cgetstr = _cgetstrPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>(); + + int cgetustr( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, + ) { + return _cgetustr( + arg0, + arg1, + arg2, + ); + } + + late final _cgetustrPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>>('cgetustr'); + late final _cgetustr = _cgetustrPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>(); + + int daemon( + int arg0, + int arg1, + ) { + return _daemon( + arg0, + arg1, + ); + } + + late final _daemonPtr = + _lookup>('daemon'); + late final _daemon = _daemonPtr.asFunction(); + + ffi.Pointer devname( + int arg0, + int arg1, + ) { + return _devname( + arg0, + arg1, + ); + } + + late final _devnamePtr = _lookup< + ffi.NativeFunction Function(dev_t, mode_t)>>( + 'devname'); + late final _devname = + _devnamePtr.asFunction Function(int, int)>(); + + ffi.Pointer devname_r( + int arg0, + int arg1, + ffi.Pointer buf, + int len, + ) { + return _devname_r( + arg0, + arg1, + buf, + len, + ); + } + + late final _devname_rPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + dev_t, mode_t, ffi.Pointer, ffi.Int)>>('devname_r'); + late final _devname_r = _devname_rPtr.asFunction< + ffi.Pointer Function(int, int, ffi.Pointer, int)>(); + + ffi.Pointer getbsize( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _getbsize( + arg0, + arg1, + ); + } + + late final _getbsizePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('getbsize'); + late final _getbsize = _getbsizePtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + int getloadavg( + ffi.Pointer arg0, + int arg1, + ) { + return _getloadavg( + arg0, + arg1, + ); + } + + late final _getloadavgPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Int)>>('getloadavg'); + late final _getloadavg = + _getloadavgPtr.asFunction, int)>(); + + ffi.Pointer getprogname() { + return _getprogname(); + } + + late final _getprognamePtr = + _lookup Function()>>( + 'getprogname'); + late final _getprogname = + _getprognamePtr.asFunction Function()>(); + + void setprogname( + ffi.Pointer arg0, + ) { + return _setprogname( + arg0, + ); + } + + late final _setprognamePtr = + _lookup)>>( + 'setprogname'); + late final _setprogname = + _setprognamePtr.asFunction)>(); + + int heapsort( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>> + __compar, + ) { + return _heapsort( + __base, + __nel, + __width, + __compar, + ); + } + + late final _heapsortPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>)>>('heapsort'); + late final _heapsort = _heapsortPtr.asFunction< + int Function( + ffi.Pointer, + int, + int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>)>(); + + int mergesort( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>> + __compar, + ) { + return _mergesort( + __base, + __nel, + __width, + __compar, + ); + } + + late final _mergesortPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>)>>('mergesort'); + late final _mergesort = _mergesortPtr.asFunction< + int Function( + ffi.Pointer, + int, + int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>)>(); + + void psort( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>> + __compar, + ) { + return _psort( + __base, + __nel, + __width, + __compar, + ); + } + + late final _psortPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>)>>('psort'); + late final _psort = _psortPtr.asFunction< + void Function( + ffi.Pointer, + int, + int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>)>(); + + void psort_r( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer arg3, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>> + __compar, + ) { + return _psort_r( + __base, + __nel, + __width, + arg3, + __compar, + ); + } + + late final _psort_rPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>)>>('psort_r'); + late final _psort_r = _psort_rPtr.asFunction< + void Function( + ffi.Pointer, + int, + int, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>)>(); + + void qsort_r( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer arg3, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>> + __compar, + ) { + return _qsort_r( + __base, + __nel, + __width, + arg3, + __compar, + ); + } + + late final _qsort_rPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>)>>('qsort_r'); + late final _qsort_r = _qsort_rPtr.asFunction< + void Function( + ffi.Pointer, + int, + int, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>)>(); + + int radixsort( + ffi.Pointer> __base, + int __nel, + ffi.Pointer __table, + int __endbyte, + ) { + return _radixsort( + __base, + __nel, + __table, + __endbyte, + ); + } + + late final _radixsortPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer>, ffi.Int, + ffi.Pointer, ffi.UnsignedInt)>>('radixsort'); + late final _radixsort = _radixsortPtr.asFunction< + int Function(ffi.Pointer>, int, + ffi.Pointer, int)>(); + + int rpmatch( + ffi.Pointer arg0, + ) { + return _rpmatch( + arg0, + ); + } + + late final _rpmatchPtr = + _lookup)>>( + 'rpmatch'); + late final _rpmatch = + _rpmatchPtr.asFunction)>(); + + int sradixsort( + ffi.Pointer> __base, + int __nel, + ffi.Pointer __table, + int __endbyte, + ) { + return _sradixsort( + __base, + __nel, + __table, + __endbyte, + ); + } + + late final _sradixsortPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer>, ffi.Int, + ffi.Pointer, ffi.UnsignedInt)>>('sradixsort'); + late final _sradixsort = _sradixsortPtr.asFunction< + int Function(ffi.Pointer>, int, + ffi.Pointer, int)>(); + + void sranddev() { + return _sranddev(); + } + + late final _sranddevPtr = + _lookup>('sranddev'); + late final _sranddev = _sranddevPtr.asFunction(); + + void srandomdev() { + return _srandomdev(); + } + + late final _srandomdevPtr = + _lookup>('srandomdev'); + late final _srandomdev = _srandomdevPtr.asFunction(); + + int strtonum( + ffi.Pointer __numstr, + int __minval, + int __maxval, + ffi.Pointer> __errstrp, + ) { + return _strtonum( + __numstr, + __minval, + __maxval, + __errstrp, + ); + } + + late final _strtonumPtr = _lookup< + ffi.NativeFunction< + ffi.LongLong Function(ffi.Pointer, ffi.LongLong, + ffi.LongLong, ffi.Pointer>)>>('strtonum'); + late final _strtonum = _strtonumPtr.asFunction< + int Function(ffi.Pointer, int, int, + ffi.Pointer>)>(); + + int strtoq( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, + ) { + return _strtoq( + __str, + __endptr, + __base, + ); + } + + late final _strtoqPtr = _lookup< + ffi.NativeFunction< + ffi.LongLong Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtoq'); + late final _strtoq = _strtoqPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); + + int strtouq( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, + ) { + return _strtouq( + __str, + __endptr, + __base, + ); + } + + late final _strtouqPtr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLongLong Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtouq'); + late final _strtouq = _strtouqPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); + + late final ffi.Pointer> _suboptarg = + _lookup>('suboptarg'); + + ffi.Pointer get suboptarg => _suboptarg.value; + + set suboptarg(ffi.Pointer value) => _suboptarg.value = value; + + ffi.Pointer parseCli( + int argc, + ffi.Pointer> argv, + ) { + return _parseCli( + argc, + argv, + ); + } + + late final _parseCliPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Int, ffi.Pointer>)>>('parseCli'); + late final _parseCli = _parseCliPtr.asFunction< + ffi.Pointer Function( + int, ffi.Pointer>)>(); void setupOnce( ffi.Pointer api, @@ -97,19 +2402,19 @@ class SingboxNativeLibrary { ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); - ffi.Pointer changeConfigOptions( - ffi.Pointer configOptionsJson, + ffi.Pointer changeHiddifyOptions( + ffi.Pointer HiddifyOptionsJson, ) { - return _changeConfigOptions( - configOptionsJson, + return _changeHiddifyOptions( + HiddifyOptionsJson, ); } - late final _changeConfigOptionsPtr = _lookup< + late final _changeHiddifyOptionsPtr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer)>>('changeConfigOptions'); - late final _changeConfigOptions = _changeConfigOptionsPtr + ffi.Pointer)>>('changeHiddifyOptions'); + late final _changeHiddifyOptions = _changeHiddifyOptionsPtr .asFunction Function(ffi.Pointer)>(); ffi.Pointer generateConfig( @@ -253,6 +2558,21 @@ class SingboxNativeLibrary { late final _generateWarpConfig = _generateWarpConfigPtr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); + + ffi.Pointer StartCoreGrpcServer( + ffi.Pointer listenAddress, + ) { + return _StartCoreGrpcServer( + listenAddress, + ); + } + + late final _StartCoreGrpcServerPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>>('StartCoreGrpcServer'); + late final _StartCoreGrpcServer = _StartCoreGrpcServerPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); } final class __mbstate_t extends ffi.Union { @@ -357,6 +2677,1038 @@ final class _GoString_ extends ffi.Struct { typedef ptrdiff_t = __darwin_ptrdiff_t; typedef __darwin_ptrdiff_t = ffi.Long; +abstract class idtype_t { + static const int P_ALL = 0; + static const int P_PID = 1; + static const int P_PGID = 2; +} + +final class __darwin_arm_exception_state extends ffi.Struct { + @__uint32_t() + external int __exception; + + @__uint32_t() + external int __fsr; + + @__uint32_t() + external int __far; +} + +typedef __uint32_t = ffi.UnsignedInt; + +final class __darwin_arm_exception_state64 extends ffi.Struct { + @__uint64_t() + external int __far; + + @__uint32_t() + external int __esr; + + @__uint32_t() + external int __exception; +} + +typedef __uint64_t = ffi.UnsignedLongLong; + +final class __darwin_arm_thread_state extends ffi.Struct { + @ffi.Array.multi([13]) + external ffi.Array<__uint32_t> __r; + + @__uint32_t() + external int __sp; + + @__uint32_t() + external int __lr; + + @__uint32_t() + external int __pc; + + @__uint32_t() + external int __cpsr; +} + +final class __darwin_arm_thread_state64 extends ffi.Struct { + @ffi.Array.multi([29]) + external ffi.Array<__uint64_t> __x; + + @__uint64_t() + external int __fp; + + @__uint64_t() + external int __lr; + + @__uint64_t() + external int __sp; + + @__uint64_t() + external int __pc; + + @__uint32_t() + external int __cpsr; + + @__uint32_t() + external int __pad; +} + +final class __darwin_arm_vfp_state extends ffi.Struct { + @ffi.Array.multi([64]) + external ffi.Array<__uint32_t> __r; + + @__uint32_t() + external int __fpscr; +} + +final class __darwin_arm_neon_state64 extends ffi.Opaque {} + +final class __darwin_arm_neon_state extends ffi.Opaque {} + +final class __arm_pagein_state extends ffi.Struct { + @ffi.Int() + external int __pagein_error; +} + +final class __arm_legacy_debug_state extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __bvr; + + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __bcr; + + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __wvr; + + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __wcr; +} + +final class __darwin_arm_debug_state32 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __bvr; + + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __bcr; + + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __wvr; + + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __wcr; + + @__uint64_t() + external int __mdscr_el1; +} + +final class __darwin_arm_debug_state64 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __bvr; + + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __bcr; + + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __wvr; + + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __wcr; + + @__uint64_t() + external int __mdscr_el1; +} + +final class __darwin_arm_cpmu_state64 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __ctrs; +} + +final class __darwin_mcontext32 extends ffi.Struct { + external __darwin_arm_exception_state __es; + + external __darwin_arm_thread_state __ss; + + external __darwin_arm_vfp_state __fs; +} + +final class __darwin_mcontext64 extends ffi.Opaque {} + +final class __darwin_sigaltstack extends ffi.Struct { + external ffi.Pointer ss_sp; + + @__darwin_size_t() + external int ss_size; + + @ffi.Int() + external int ss_flags; +} + +typedef __darwin_size_t = ffi.UnsignedLong; + +final class __darwin_ucontext extends ffi.Struct { + @ffi.Int() + external int uc_onstack; + + @__darwin_sigset_t() + external int uc_sigmask; + + external __darwin_sigaltstack uc_stack; + + external ffi.Pointer<__darwin_ucontext> uc_link; + + @__darwin_size_t() + external int uc_mcsize; + + external ffi.Pointer<__darwin_mcontext64> uc_mcontext; +} + +typedef __darwin_sigset_t = __uint32_t; + +final class sigval extends ffi.Union { + @ffi.Int() + external int sival_int; + + external ffi.Pointer sival_ptr; +} + +final class sigevent extends ffi.Struct { + @ffi.Int() + external int sigev_notify; + + @ffi.Int() + external int sigev_signo; + + external sigval sigev_value; + + external ffi.Pointer> + sigev_notify_function; + + external ffi.Pointer sigev_notify_attributes; +} + +typedef pthread_attr_t = __darwin_pthread_attr_t; +typedef __darwin_pthread_attr_t = _opaque_pthread_attr_t; + +final class __siginfo extends ffi.Struct { + @ffi.Int() + external int si_signo; + + @ffi.Int() + external int si_errno; + + @ffi.Int() + external int si_code; + + @pid_t() + external int si_pid; + + @uid_t() + external int si_uid; + + @ffi.Int() + external int si_status; + + external ffi.Pointer si_addr; + + external sigval si_value; + + @ffi.Long() + external int si_band; + + @ffi.Array.multi([7]) + external ffi.Array __pad; +} + +typedef pid_t = __darwin_pid_t; +typedef __darwin_pid_t = __int32_t; +typedef __int32_t = ffi.Int; +typedef uid_t = __darwin_uid_t; +typedef __darwin_uid_t = __uint32_t; + +final class __sigaction_u extends ffi.Union { + external ffi.Pointer> + __sa_handler; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int, ffi.Pointer<__siginfo>, ffi.Pointer)>> + __sa_sigaction; +} + +final class __sigaction extends ffi.Struct { + external __sigaction_u __sigaction_u1; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Int, ffi.Int, + ffi.Pointer, ffi.Pointer)>> sa_tramp; + + @sigset_t() + external int sa_mask; + + @ffi.Int() + external int sa_flags; +} + +typedef siginfo_t = __siginfo; +typedef sigset_t = __darwin_sigset_t; + +final class sigaction extends ffi.Struct { + external __sigaction_u __sigaction_u1; + + @sigset_t() + external int sa_mask; + + @ffi.Int() + external int sa_flags; +} + +final class sigvec extends ffi.Struct { + external ffi.Pointer> + sv_handler; + + @ffi.Int() + external int sv_mask; + + @ffi.Int() + external int sv_flags; +} + +final class sigstack extends ffi.Struct { + external ffi.Pointer ss_sp; + + @ffi.Int() + external int ss_onstack; +} + +final class timeval extends ffi.Struct { + @__darwin_time_t() + external int tv_sec; + + @__darwin_suseconds_t() + external int tv_usec; +} + +typedef __darwin_time_t = ffi.Long; +typedef __darwin_suseconds_t = __int32_t; + +final class rusage extends ffi.Struct { + external timeval ru_utime; + + external timeval ru_stime; + + @ffi.Long() + external int ru_maxrss; + + @ffi.Long() + external int ru_ixrss; + + @ffi.Long() + external int ru_idrss; + + @ffi.Long() + external int ru_isrss; + + @ffi.Long() + external int ru_minflt; + + @ffi.Long() + external int ru_majflt; + + @ffi.Long() + external int ru_nswap; + + @ffi.Long() + external int ru_inblock; + + @ffi.Long() + external int ru_oublock; + + @ffi.Long() + external int ru_msgsnd; + + @ffi.Long() + external int ru_msgrcv; + + @ffi.Long() + external int ru_nsignals; + + @ffi.Long() + external int ru_nvcsw; + + @ffi.Long() + external int ru_nivcsw; +} + +final class rusage_info_v0 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; + + @ffi.Uint64() + external int ri_user_time; + + @ffi.Uint64() + external int ri_system_time; + + @ffi.Uint64() + external int ri_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_interrupt_wkups; + + @ffi.Uint64() + external int ri_pageins; + + @ffi.Uint64() + external int ri_wired_size; + + @ffi.Uint64() + external int ri_resident_size; + + @ffi.Uint64() + external int ri_phys_footprint; + + @ffi.Uint64() + external int ri_proc_start_abstime; + + @ffi.Uint64() + external int ri_proc_exit_abstime; +} + +final class rusage_info_v1 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; + + @ffi.Uint64() + external int ri_user_time; + + @ffi.Uint64() + external int ri_system_time; + + @ffi.Uint64() + external int ri_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_interrupt_wkups; + + @ffi.Uint64() + external int ri_pageins; + + @ffi.Uint64() + external int ri_wired_size; + + @ffi.Uint64() + external int ri_resident_size; + + @ffi.Uint64() + external int ri_phys_footprint; + + @ffi.Uint64() + external int ri_proc_start_abstime; + + @ffi.Uint64() + external int ri_proc_exit_abstime; + + @ffi.Uint64() + external int ri_child_user_time; + + @ffi.Uint64() + external int ri_child_system_time; + + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_child_interrupt_wkups; + + @ffi.Uint64() + external int ri_child_pageins; + + @ffi.Uint64() + external int ri_child_elapsed_abstime; +} + +final class rusage_info_v2 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; + + @ffi.Uint64() + external int ri_user_time; + + @ffi.Uint64() + external int ri_system_time; + + @ffi.Uint64() + external int ri_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_interrupt_wkups; + + @ffi.Uint64() + external int ri_pageins; + + @ffi.Uint64() + external int ri_wired_size; + + @ffi.Uint64() + external int ri_resident_size; + + @ffi.Uint64() + external int ri_phys_footprint; + + @ffi.Uint64() + external int ri_proc_start_abstime; + + @ffi.Uint64() + external int ri_proc_exit_abstime; + + @ffi.Uint64() + external int ri_child_user_time; + + @ffi.Uint64() + external int ri_child_system_time; + + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_child_interrupt_wkups; + + @ffi.Uint64() + external int ri_child_pageins; + + @ffi.Uint64() + external int ri_child_elapsed_abstime; + + @ffi.Uint64() + external int ri_diskio_bytesread; + + @ffi.Uint64() + external int ri_diskio_byteswritten; +} + +final class rusage_info_v3 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; + + @ffi.Uint64() + external int ri_user_time; + + @ffi.Uint64() + external int ri_system_time; + + @ffi.Uint64() + external int ri_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_interrupt_wkups; + + @ffi.Uint64() + external int ri_pageins; + + @ffi.Uint64() + external int ri_wired_size; + + @ffi.Uint64() + external int ri_resident_size; + + @ffi.Uint64() + external int ri_phys_footprint; + + @ffi.Uint64() + external int ri_proc_start_abstime; + + @ffi.Uint64() + external int ri_proc_exit_abstime; + + @ffi.Uint64() + external int ri_child_user_time; + + @ffi.Uint64() + external int ri_child_system_time; + + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_child_interrupt_wkups; + + @ffi.Uint64() + external int ri_child_pageins; + + @ffi.Uint64() + external int ri_child_elapsed_abstime; + + @ffi.Uint64() + external int ri_diskio_bytesread; + + @ffi.Uint64() + external int ri_diskio_byteswritten; + + @ffi.Uint64() + external int ri_cpu_time_qos_default; + + @ffi.Uint64() + external int ri_cpu_time_qos_maintenance; + + @ffi.Uint64() + external int ri_cpu_time_qos_background; + + @ffi.Uint64() + external int ri_cpu_time_qos_utility; + + @ffi.Uint64() + external int ri_cpu_time_qos_legacy; + + @ffi.Uint64() + external int ri_cpu_time_qos_user_initiated; + + @ffi.Uint64() + external int ri_cpu_time_qos_user_interactive; + + @ffi.Uint64() + external int ri_billed_system_time; + + @ffi.Uint64() + external int ri_serviced_system_time; +} + +final class rusage_info_v4 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; + + @ffi.Uint64() + external int ri_user_time; + + @ffi.Uint64() + external int ri_system_time; + + @ffi.Uint64() + external int ri_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_interrupt_wkups; + + @ffi.Uint64() + external int ri_pageins; + + @ffi.Uint64() + external int ri_wired_size; + + @ffi.Uint64() + external int ri_resident_size; + + @ffi.Uint64() + external int ri_phys_footprint; + + @ffi.Uint64() + external int ri_proc_start_abstime; + + @ffi.Uint64() + external int ri_proc_exit_abstime; + + @ffi.Uint64() + external int ri_child_user_time; + + @ffi.Uint64() + external int ri_child_system_time; + + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_child_interrupt_wkups; + + @ffi.Uint64() + external int ri_child_pageins; + + @ffi.Uint64() + external int ri_child_elapsed_abstime; + + @ffi.Uint64() + external int ri_diskio_bytesread; + + @ffi.Uint64() + external int ri_diskio_byteswritten; + + @ffi.Uint64() + external int ri_cpu_time_qos_default; + + @ffi.Uint64() + external int ri_cpu_time_qos_maintenance; + + @ffi.Uint64() + external int ri_cpu_time_qos_background; + + @ffi.Uint64() + external int ri_cpu_time_qos_utility; + + @ffi.Uint64() + external int ri_cpu_time_qos_legacy; + + @ffi.Uint64() + external int ri_cpu_time_qos_user_initiated; + + @ffi.Uint64() + external int ri_cpu_time_qos_user_interactive; + + @ffi.Uint64() + external int ri_billed_system_time; + + @ffi.Uint64() + external int ri_serviced_system_time; + + @ffi.Uint64() + external int ri_logical_writes; + + @ffi.Uint64() + external int ri_lifetime_max_phys_footprint; + + @ffi.Uint64() + external int ri_instructions; + + @ffi.Uint64() + external int ri_cycles; + + @ffi.Uint64() + external int ri_billed_energy; + + @ffi.Uint64() + external int ri_serviced_energy; + + @ffi.Uint64() + external int ri_interval_max_phys_footprint; + + @ffi.Uint64() + external int ri_runnable_time; +} + +final class rusage_info_v5 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; + + @ffi.Uint64() + external int ri_user_time; + + @ffi.Uint64() + external int ri_system_time; + + @ffi.Uint64() + external int ri_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_interrupt_wkups; + + @ffi.Uint64() + external int ri_pageins; + + @ffi.Uint64() + external int ri_wired_size; + + @ffi.Uint64() + external int ri_resident_size; + + @ffi.Uint64() + external int ri_phys_footprint; + + @ffi.Uint64() + external int ri_proc_start_abstime; + + @ffi.Uint64() + external int ri_proc_exit_abstime; + + @ffi.Uint64() + external int ri_child_user_time; + + @ffi.Uint64() + external int ri_child_system_time; + + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_child_interrupt_wkups; + + @ffi.Uint64() + external int ri_child_pageins; + + @ffi.Uint64() + external int ri_child_elapsed_abstime; + + @ffi.Uint64() + external int ri_diskio_bytesread; + + @ffi.Uint64() + external int ri_diskio_byteswritten; + + @ffi.Uint64() + external int ri_cpu_time_qos_default; + + @ffi.Uint64() + external int ri_cpu_time_qos_maintenance; + + @ffi.Uint64() + external int ri_cpu_time_qos_background; + + @ffi.Uint64() + external int ri_cpu_time_qos_utility; + + @ffi.Uint64() + external int ri_cpu_time_qos_legacy; + + @ffi.Uint64() + external int ri_cpu_time_qos_user_initiated; + + @ffi.Uint64() + external int ri_cpu_time_qos_user_interactive; + + @ffi.Uint64() + external int ri_billed_system_time; + + @ffi.Uint64() + external int ri_serviced_system_time; + + @ffi.Uint64() + external int ri_logical_writes; + + @ffi.Uint64() + external int ri_lifetime_max_phys_footprint; + + @ffi.Uint64() + external int ri_instructions; + + @ffi.Uint64() + external int ri_cycles; + + @ffi.Uint64() + external int ri_billed_energy; + + @ffi.Uint64() + external int ri_serviced_energy; + + @ffi.Uint64() + external int ri_interval_max_phys_footprint; + + @ffi.Uint64() + external int ri_runnable_time; + + @ffi.Uint64() + external int ri_flags; +} + +final class rusage_info_v6 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; + + @ffi.Uint64() + external int ri_user_time; + + @ffi.Uint64() + external int ri_system_time; + + @ffi.Uint64() + external int ri_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_interrupt_wkups; + + @ffi.Uint64() + external int ri_pageins; + + @ffi.Uint64() + external int ri_wired_size; + + @ffi.Uint64() + external int ri_resident_size; + + @ffi.Uint64() + external int ri_phys_footprint; + + @ffi.Uint64() + external int ri_proc_start_abstime; + + @ffi.Uint64() + external int ri_proc_exit_abstime; + + @ffi.Uint64() + external int ri_child_user_time; + + @ffi.Uint64() + external int ri_child_system_time; + + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_child_interrupt_wkups; + + @ffi.Uint64() + external int ri_child_pageins; + + @ffi.Uint64() + external int ri_child_elapsed_abstime; + + @ffi.Uint64() + external int ri_diskio_bytesread; + + @ffi.Uint64() + external int ri_diskio_byteswritten; + + @ffi.Uint64() + external int ri_cpu_time_qos_default; + + @ffi.Uint64() + external int ri_cpu_time_qos_maintenance; + + @ffi.Uint64() + external int ri_cpu_time_qos_background; + + @ffi.Uint64() + external int ri_cpu_time_qos_utility; + + @ffi.Uint64() + external int ri_cpu_time_qos_legacy; + + @ffi.Uint64() + external int ri_cpu_time_qos_user_initiated; + + @ffi.Uint64() + external int ri_cpu_time_qos_user_interactive; + + @ffi.Uint64() + external int ri_billed_system_time; + + @ffi.Uint64() + external int ri_serviced_system_time; + + @ffi.Uint64() + external int ri_logical_writes; + + @ffi.Uint64() + external int ri_lifetime_max_phys_footprint; + + @ffi.Uint64() + external int ri_instructions; + + @ffi.Uint64() + external int ri_cycles; + + @ffi.Uint64() + external int ri_billed_energy; + + @ffi.Uint64() + external int ri_serviced_energy; + + @ffi.Uint64() + external int ri_interval_max_phys_footprint; + + @ffi.Uint64() + external int ri_runnable_time; + + @ffi.Uint64() + external int ri_flags; + + @ffi.Uint64() + external int ri_user_ptime; + + @ffi.Uint64() + external int ri_system_ptime; + + @ffi.Uint64() + external int ri_pinstructions; + + @ffi.Uint64() + external int ri_pcycles; + + @ffi.Uint64() + external int ri_energy_nj; + + @ffi.Uint64() + external int ri_penergy_nj; + + @ffi.Uint64() + external int ri_secure_time_in_system; + + @ffi.Uint64() + external int ri_secure_ptime_in_system; + + @ffi.Array.multi([12]) + external ffi.Array ri_reserved; +} + +final class rlimit extends ffi.Struct { + @rlim_t() + external int rlim_cur; + + @rlim_t() + external int rlim_max; +} + +typedef rlim_t = __uint64_t; + +final class proc_rlimit_control_wakeupmon extends ffi.Struct { + @ffi.Uint32() + external int wm_flags; + + @ffi.Int32() + external int wm_rate; +} + +typedef id_t = __darwin_id_t; +typedef __darwin_id_t = __uint32_t; + +@ffi.Packed(1) +final class _OSUnalignedU16 extends ffi.Struct { + @ffi.Uint16() + external int __val; +} + +@ffi.Packed(1) +final class _OSUnalignedU32 extends ffi.Struct { + @ffi.Uint32() + external int __val; +} + +@ffi.Packed(1) +final class _OSUnalignedU64 extends ffi.Struct { + @ffi.Uint64() + external int __val; +} + +final class wait extends ffi.Opaque {} + +final class div_t extends ffi.Struct { + @ffi.Int() + external int quot; + + @ffi.Int() + external int rem; +} + +final class ldiv_t extends ffi.Struct { + @ffi.Long() + external int quot; + + @ffi.Long() + external int rem; +} + +final class lldiv_t extends ffi.Struct { + @ffi.LongLong() + external int quot; + + @ffi.LongLong() + external int rem; +} + +typedef malloc_type_id_t = ffi.UnsignedLongLong; + +final class _malloc_zone_t extends ffi.Opaque {} + +typedef malloc_zone_t = _malloc_zone_t; +typedef dev_t = __darwin_dev_t; +typedef __darwin_dev_t = __int32_t; +typedef mode_t = __darwin_mode_t; +typedef __darwin_mode_t = __uint16_t; +typedef __uint16_t = ffi.UnsignedShort; + final class GoInterface extends ffi.Struct { external ffi.Pointer t; @@ -377,6 +3729,8 @@ typedef GoInt = GoInt64; typedef GoInt64 = ffi.LongLong; typedef GoUint8 = ffi.UnsignedChar; +const int __has_safe_buffers = 1; + const int __DARWIN_ONLY_64_BIT_INO_T = 1; const int __DARWIN_ONLY_UNIX_CONFORMANCE = 1; @@ -447,6 +3801,918 @@ const int NULL = 0; const int USER_ADDR_NULL = 0; +const int __API_TO_BE_DEPRECATED = 100000; + +const int __API_TO_BE_DEPRECATED_MACOS = 100000; + +const int __API_TO_BE_DEPRECATED_IOS = 100000; + +const int __API_TO_BE_DEPRECATED_MACCATALYST = 100000; + +const int __API_TO_BE_DEPRECATED_WATCHOS = 100000; + +const int __API_TO_BE_DEPRECATED_TVOS = 100000; + +const int __API_TO_BE_DEPRECATED_DRIVERKIT = 100000; + +const int __API_TO_BE_DEPRECATED_VISIONOS = 100000; + +const int __MAC_10_0 = 1000; + +const int __MAC_10_1 = 1010; + +const int __MAC_10_2 = 1020; + +const int __MAC_10_3 = 1030; + +const int __MAC_10_4 = 1040; + +const int __MAC_10_5 = 1050; + +const int __MAC_10_6 = 1060; + +const int __MAC_10_7 = 1070; + +const int __MAC_10_8 = 1080; + +const int __MAC_10_9 = 1090; + +const int __MAC_10_10 = 101000; + +const int __MAC_10_10_2 = 101002; + +const int __MAC_10_10_3 = 101003; + +const int __MAC_10_11 = 101100; + +const int __MAC_10_11_2 = 101102; + +const int __MAC_10_11_3 = 101103; + +const int __MAC_10_11_4 = 101104; + +const int __MAC_10_12 = 101200; + +const int __MAC_10_12_1 = 101201; + +const int __MAC_10_12_2 = 101202; + +const int __MAC_10_12_4 = 101204; + +const int __MAC_10_13 = 101300; + +const int __MAC_10_13_1 = 101301; + +const int __MAC_10_13_2 = 101302; + +const int __MAC_10_13_4 = 101304; + +const int __MAC_10_14 = 101400; + +const int __MAC_10_14_1 = 101401; + +const int __MAC_10_14_4 = 101404; + +const int __MAC_10_14_5 = 101405; + +const int __MAC_10_14_6 = 101406; + +const int __MAC_10_15 = 101500; + +const int __MAC_10_15_1 = 101501; + +const int __MAC_10_15_4 = 101504; + +const int __MAC_10_16 = 101600; + +const int __MAC_11_0 = 110000; + +const int __MAC_11_1 = 110100; + +const int __MAC_11_3 = 110300; + +const int __MAC_11_4 = 110400; + +const int __MAC_11_5 = 110500; + +const int __MAC_11_6 = 110600; + +const int __MAC_12_0 = 120000; + +const int __MAC_12_1 = 120100; + +const int __MAC_12_2 = 120200; + +const int __MAC_12_3 = 120300; + +const int __MAC_12_4 = 120400; + +const int __MAC_12_5 = 120500; + +const int __MAC_12_6 = 120600; + +const int __MAC_12_7 = 120700; + +const int __MAC_13_0 = 130000; + +const int __MAC_13_1 = 130100; + +const int __MAC_13_2 = 130200; + +const int __MAC_13_3 = 130300; + +const int __MAC_13_4 = 130400; + +const int __MAC_13_5 = 130500; + +const int __MAC_13_6 = 130600; + +const int __MAC_14_0 = 140000; + +const int __MAC_14_1 = 140100; + +const int __MAC_14_2 = 140200; + +const int __MAC_14_3 = 140300; + +const int __MAC_14_4 = 140400; + +const int __MAC_14_5 = 140500; + +const int __IPHONE_2_0 = 20000; + +const int __IPHONE_2_1 = 20100; + +const int __IPHONE_2_2 = 20200; + +const int __IPHONE_3_0 = 30000; + +const int __IPHONE_3_1 = 30100; + +const int __IPHONE_3_2 = 30200; + +const int __IPHONE_4_0 = 40000; + +const int __IPHONE_4_1 = 40100; + +const int __IPHONE_4_2 = 40200; + +const int __IPHONE_4_3 = 40300; + +const int __IPHONE_5_0 = 50000; + +const int __IPHONE_5_1 = 50100; + +const int __IPHONE_6_0 = 60000; + +const int __IPHONE_6_1 = 60100; + +const int __IPHONE_7_0 = 70000; + +const int __IPHONE_7_1 = 70100; + +const int __IPHONE_8_0 = 80000; + +const int __IPHONE_8_1 = 80100; + +const int __IPHONE_8_2 = 80200; + +const int __IPHONE_8_3 = 80300; + +const int __IPHONE_8_4 = 80400; + +const int __IPHONE_9_0 = 90000; + +const int __IPHONE_9_1 = 90100; + +const int __IPHONE_9_2 = 90200; + +const int __IPHONE_9_3 = 90300; + +const int __IPHONE_10_0 = 100000; + +const int __IPHONE_10_1 = 100100; + +const int __IPHONE_10_2 = 100200; + +const int __IPHONE_10_3 = 100300; + +const int __IPHONE_11_0 = 110000; + +const int __IPHONE_11_1 = 110100; + +const int __IPHONE_11_2 = 110200; + +const int __IPHONE_11_3 = 110300; + +const int __IPHONE_11_4 = 110400; + +const int __IPHONE_12_0 = 120000; + +const int __IPHONE_12_1 = 120100; + +const int __IPHONE_12_2 = 120200; + +const int __IPHONE_12_3 = 120300; + +const int __IPHONE_12_4 = 120400; + +const int __IPHONE_13_0 = 130000; + +const int __IPHONE_13_1 = 130100; + +const int __IPHONE_13_2 = 130200; + +const int __IPHONE_13_3 = 130300; + +const int __IPHONE_13_4 = 130400; + +const int __IPHONE_13_5 = 130500; + +const int __IPHONE_13_6 = 130600; + +const int __IPHONE_13_7 = 130700; + +const int __IPHONE_14_0 = 140000; + +const int __IPHONE_14_1 = 140100; + +const int __IPHONE_14_2 = 140200; + +const int __IPHONE_14_3 = 140300; + +const int __IPHONE_14_5 = 140500; + +const int __IPHONE_14_4 = 140400; + +const int __IPHONE_14_6 = 140600; + +const int __IPHONE_14_7 = 140700; + +const int __IPHONE_14_8 = 140800; + +const int __IPHONE_15_0 = 150000; + +const int __IPHONE_15_1 = 150100; + +const int __IPHONE_15_2 = 150200; + +const int __IPHONE_15_3 = 150300; + +const int __IPHONE_15_4 = 150400; + +const int __IPHONE_15_5 = 150500; + +const int __IPHONE_15_6 = 150600; + +const int __IPHONE_15_7 = 150700; + +const int __IPHONE_15_8 = 150800; + +const int __IPHONE_16_0 = 160000; + +const int __IPHONE_16_1 = 160100; + +const int __IPHONE_16_2 = 160200; + +const int __IPHONE_16_3 = 160300; + +const int __IPHONE_16_4 = 160400; + +const int __IPHONE_16_5 = 160500; + +const int __IPHONE_16_6 = 160600; + +const int __IPHONE_16_7 = 160700; + +const int __IPHONE_17_0 = 170000; + +const int __IPHONE_17_1 = 170100; + +const int __IPHONE_17_2 = 170200; + +const int __IPHONE_17_3 = 170300; + +const int __IPHONE_17_4 = 170400; + +const int __IPHONE_17_5 = 170500; + +const int __WATCHOS_1_0 = 10000; + +const int __WATCHOS_2_0 = 20000; + +const int __WATCHOS_2_1 = 20100; + +const int __WATCHOS_2_2 = 20200; + +const int __WATCHOS_3_0 = 30000; + +const int __WATCHOS_3_1 = 30100; + +const int __WATCHOS_3_1_1 = 30101; + +const int __WATCHOS_3_2 = 30200; + +const int __WATCHOS_4_0 = 40000; + +const int __WATCHOS_4_1 = 40100; + +const int __WATCHOS_4_2 = 40200; + +const int __WATCHOS_4_3 = 40300; + +const int __WATCHOS_5_0 = 50000; + +const int __WATCHOS_5_1 = 50100; + +const int __WATCHOS_5_2 = 50200; + +const int __WATCHOS_5_3 = 50300; + +const int __WATCHOS_6_0 = 60000; + +const int __WATCHOS_6_1 = 60100; + +const int __WATCHOS_6_2 = 60200; + +const int __WATCHOS_7_0 = 70000; + +const int __WATCHOS_7_1 = 70100; + +const int __WATCHOS_7_2 = 70200; + +const int __WATCHOS_7_3 = 70300; + +const int __WATCHOS_7_4 = 70400; + +const int __WATCHOS_7_5 = 70500; + +const int __WATCHOS_7_6 = 70600; + +const int __WATCHOS_8_0 = 80000; + +const int __WATCHOS_8_1 = 80100; + +const int __WATCHOS_8_3 = 80300; + +const int __WATCHOS_8_4 = 80400; + +const int __WATCHOS_8_5 = 80500; + +const int __WATCHOS_8_6 = 80600; + +const int __WATCHOS_8_7 = 80700; + +const int __WATCHOS_8_8 = 80800; + +const int __WATCHOS_9_0 = 90000; + +const int __WATCHOS_9_1 = 90100; + +const int __WATCHOS_9_2 = 90200; + +const int __WATCHOS_9_3 = 90300; + +const int __WATCHOS_9_4 = 90400; + +const int __WATCHOS_9_5 = 90500; + +const int __WATCHOS_9_6 = 90600; + +const int __WATCHOS_10_0 = 100000; + +const int __WATCHOS_10_1 = 100100; + +const int __WATCHOS_10_2 = 100200; + +const int __WATCHOS_10_3 = 100300; + +const int __WATCHOS_10_4 = 100400; + +const int __WATCHOS_10_5 = 100500; + +const int __TVOS_9_0 = 90000; + +const int __TVOS_9_1 = 90100; + +const int __TVOS_9_2 = 90200; + +const int __TVOS_10_0 = 100000; + +const int __TVOS_10_0_1 = 100001; + +const int __TVOS_10_1 = 100100; + +const int __TVOS_10_2 = 100200; + +const int __TVOS_11_0 = 110000; + +const int __TVOS_11_1 = 110100; + +const int __TVOS_11_2 = 110200; + +const int __TVOS_11_3 = 110300; + +const int __TVOS_11_4 = 110400; + +const int __TVOS_12_0 = 120000; + +const int __TVOS_12_1 = 120100; + +const int __TVOS_12_2 = 120200; + +const int __TVOS_12_3 = 120300; + +const int __TVOS_12_4 = 120400; + +const int __TVOS_13_0 = 130000; + +const int __TVOS_13_2 = 130200; + +const int __TVOS_13_3 = 130300; + +const int __TVOS_13_4 = 130400; + +const int __TVOS_14_0 = 140000; + +const int __TVOS_14_1 = 140100; + +const int __TVOS_14_2 = 140200; + +const int __TVOS_14_3 = 140300; + +const int __TVOS_14_5 = 140500; + +const int __TVOS_14_6 = 140600; + +const int __TVOS_14_7 = 140700; + +const int __TVOS_15_0 = 150000; + +const int __TVOS_15_1 = 150100; + +const int __TVOS_15_2 = 150200; + +const int __TVOS_15_3 = 150300; + +const int __TVOS_15_4 = 150400; + +const int __TVOS_15_5 = 150500; + +const int __TVOS_15_6 = 150600; + +const int __TVOS_16_0 = 160000; + +const int __TVOS_16_1 = 160100; + +const int __TVOS_16_2 = 160200; + +const int __TVOS_16_3 = 160300; + +const int __TVOS_16_4 = 160400; + +const int __TVOS_16_5 = 160500; + +const int __TVOS_16_6 = 160600; + +const int __TVOS_17_0 = 170000; + +const int __TVOS_17_1 = 170100; + +const int __TVOS_17_2 = 170200; + +const int __TVOS_17_3 = 170300; + +const int __TVOS_17_4 = 170400; + +const int __TVOS_17_5 = 170500; + +const int __BRIDGEOS_2_0 = 20000; + +const int __BRIDGEOS_3_0 = 30000; + +const int __BRIDGEOS_3_1 = 30100; + +const int __BRIDGEOS_3_4 = 30400; + +const int __BRIDGEOS_4_0 = 40000; + +const int __BRIDGEOS_4_1 = 40100; + +const int __BRIDGEOS_5_0 = 50000; + +const int __BRIDGEOS_5_1 = 50100; + +const int __BRIDGEOS_5_3 = 50300; + +const int __BRIDGEOS_6_0 = 60000; + +const int __BRIDGEOS_6_2 = 60200; + +const int __BRIDGEOS_6_4 = 60400; + +const int __BRIDGEOS_6_5 = 60500; + +const int __BRIDGEOS_6_6 = 60600; + +const int __BRIDGEOS_7_0 = 70000; + +const int __BRIDGEOS_7_1 = 70100; + +const int __BRIDGEOS_7_2 = 70200; + +const int __BRIDGEOS_7_3 = 70300; + +const int __BRIDGEOS_7_4 = 70400; + +const int __BRIDGEOS_7_6 = 70600; + +const int __BRIDGEOS_8_0 = 80000; + +const int __BRIDGEOS_8_1 = 80100; + +const int __BRIDGEOS_8_2 = 80200; + +const int __BRIDGEOS_8_3 = 80300; + +const int __BRIDGEOS_8_4 = 80400; + +const int __BRIDGEOS_8_5 = 80500; + +const int __DRIVERKIT_19_0 = 190000; + +const int __DRIVERKIT_20_0 = 200000; + +const int __DRIVERKIT_21_0 = 210000; + +const int __DRIVERKIT_22_0 = 220000; + +const int __DRIVERKIT_22_4 = 220400; + +const int __DRIVERKIT_22_5 = 220500; + +const int __DRIVERKIT_22_6 = 220600; + +const int __DRIVERKIT_23_0 = 230000; + +const int __DRIVERKIT_23_1 = 230100; + +const int __DRIVERKIT_23_2 = 230200; + +const int __DRIVERKIT_23_3 = 230300; + +const int __DRIVERKIT_23_4 = 230400; + +const int __DRIVERKIT_23_5 = 230500; + +const int __VISIONOS_1_0 = 10000; + +const int __VISIONOS_1_1 = 10100; + +const int __VISIONOS_1_2 = 10200; + +const int MAC_OS_X_VERSION_10_0 = 1000; + +const int MAC_OS_X_VERSION_10_1 = 1010; + +const int MAC_OS_X_VERSION_10_2 = 1020; + +const int MAC_OS_X_VERSION_10_3 = 1030; + +const int MAC_OS_X_VERSION_10_4 = 1040; + +const int MAC_OS_X_VERSION_10_5 = 1050; + +const int MAC_OS_X_VERSION_10_6 = 1060; + +const int MAC_OS_X_VERSION_10_7 = 1070; + +const int MAC_OS_X_VERSION_10_8 = 1080; + +const int MAC_OS_X_VERSION_10_9 = 1090; + +const int MAC_OS_X_VERSION_10_10 = 101000; + +const int MAC_OS_X_VERSION_10_10_2 = 101002; + +const int MAC_OS_X_VERSION_10_10_3 = 101003; + +const int MAC_OS_X_VERSION_10_11 = 101100; + +const int MAC_OS_X_VERSION_10_11_2 = 101102; + +const int MAC_OS_X_VERSION_10_11_3 = 101103; + +const int MAC_OS_X_VERSION_10_11_4 = 101104; + +const int MAC_OS_X_VERSION_10_12 = 101200; + +const int MAC_OS_X_VERSION_10_12_1 = 101201; + +const int MAC_OS_X_VERSION_10_12_2 = 101202; + +const int MAC_OS_X_VERSION_10_12_4 = 101204; + +const int MAC_OS_X_VERSION_10_13 = 101300; + +const int MAC_OS_X_VERSION_10_13_1 = 101301; + +const int MAC_OS_X_VERSION_10_13_2 = 101302; + +const int MAC_OS_X_VERSION_10_13_4 = 101304; + +const int MAC_OS_X_VERSION_10_14 = 101400; + +const int MAC_OS_X_VERSION_10_14_1 = 101401; + +const int MAC_OS_X_VERSION_10_14_4 = 101404; + +const int MAC_OS_X_VERSION_10_14_5 = 101405; + +const int MAC_OS_X_VERSION_10_14_6 = 101406; + +const int MAC_OS_X_VERSION_10_15 = 101500; + +const int MAC_OS_X_VERSION_10_15_1 = 101501; + +const int MAC_OS_X_VERSION_10_15_4 = 101504; + +const int MAC_OS_X_VERSION_10_16 = 101600; + +const int MAC_OS_VERSION_11_0 = 110000; + +const int MAC_OS_VERSION_11_1 = 110100; + +const int MAC_OS_VERSION_11_3 = 110300; + +const int MAC_OS_VERSION_11_4 = 110400; + +const int MAC_OS_VERSION_11_5 = 110500; + +const int MAC_OS_VERSION_11_6 = 110600; + +const int MAC_OS_VERSION_12_0 = 120000; + +const int MAC_OS_VERSION_12_1 = 120100; + +const int MAC_OS_VERSION_12_2 = 120200; + +const int MAC_OS_VERSION_12_3 = 120300; + +const int MAC_OS_VERSION_12_4 = 120400; + +const int MAC_OS_VERSION_12_5 = 120500; + +const int MAC_OS_VERSION_12_6 = 120600; + +const int MAC_OS_VERSION_12_7 = 120700; + +const int MAC_OS_VERSION_13_0 = 130000; + +const int MAC_OS_VERSION_13_1 = 130100; + +const int MAC_OS_VERSION_13_2 = 130200; + +const int MAC_OS_VERSION_13_3 = 130300; + +const int MAC_OS_VERSION_13_4 = 130400; + +const int MAC_OS_VERSION_13_5 = 130500; + +const int MAC_OS_VERSION_13_6 = 130600; + +const int MAC_OS_VERSION_14_0 = 140000; + +const int MAC_OS_VERSION_14_1 = 140100; + +const int MAC_OS_VERSION_14_2 = 140200; + +const int MAC_OS_VERSION_14_3 = 140300; + +const int MAC_OS_VERSION_14_4 = 140400; + +const int MAC_OS_VERSION_14_5 = 140500; + +const int __MAC_OS_X_VERSION_MIN_REQUIRED = 140000; + +const int __MAC_OS_X_VERSION_MAX_ALLOWED = 140500; + +const int __ENABLE_LEGACY_MAC_AVAILABILITY = 1; + +const int __DARWIN_NSIG = 32; + +const int NSIG = 32; + +const int _ARM_SIGNAL_ = 1; + +const int SIGHUP = 1; + +const int SIGINT = 2; + +const int SIGQUIT = 3; + +const int SIGILL = 4; + +const int SIGTRAP = 5; + +const int SIGABRT = 6; + +const int SIGIOT = 6; + +const int SIGEMT = 7; + +const int SIGFPE = 8; + +const int SIGKILL = 9; + +const int SIGBUS = 10; + +const int SIGSEGV = 11; + +const int SIGSYS = 12; + +const int SIGPIPE = 13; + +const int SIGALRM = 14; + +const int SIGTERM = 15; + +const int SIGURG = 16; + +const int SIGSTOP = 17; + +const int SIGTSTP = 18; + +const int SIGCONT = 19; + +const int SIGCHLD = 20; + +const int SIGTTIN = 21; + +const int SIGTTOU = 22; + +const int SIGIO = 23; + +const int SIGXCPU = 24; + +const int SIGXFSZ = 25; + +const int SIGVTALRM = 26; + +const int SIGPROF = 27; + +const int SIGWINCH = 28; + +const int SIGINFO = 29; + +const int SIGUSR1 = 30; + +const int SIGUSR2 = 31; + +const int __DARWIN_OPAQUE_ARM_THREAD_STATE64 = 0; + +const int SIGEV_NONE = 0; + +const int SIGEV_SIGNAL = 1; + +const int SIGEV_THREAD = 3; + +const int ILL_NOOP = 0; + +const int ILL_ILLOPC = 1; + +const int ILL_ILLTRP = 2; + +const int ILL_PRVOPC = 3; + +const int ILL_ILLOPN = 4; + +const int ILL_ILLADR = 5; + +const int ILL_PRVREG = 6; + +const int ILL_COPROC = 7; + +const int ILL_BADSTK = 8; + +const int FPE_NOOP = 0; + +const int FPE_FLTDIV = 1; + +const int FPE_FLTOVF = 2; + +const int FPE_FLTUND = 3; + +const int FPE_FLTRES = 4; + +const int FPE_FLTINV = 5; + +const int FPE_FLTSUB = 6; + +const int FPE_INTDIV = 7; + +const int FPE_INTOVF = 8; + +const int SEGV_NOOP = 0; + +const int SEGV_MAPERR = 1; + +const int SEGV_ACCERR = 2; + +const int BUS_NOOP = 0; + +const int BUS_ADRALN = 1; + +const int BUS_ADRERR = 2; + +const int BUS_OBJERR = 3; + +const int TRAP_BRKPT = 1; + +const int TRAP_TRACE = 2; + +const int CLD_NOOP = 0; + +const int CLD_EXITED = 1; + +const int CLD_KILLED = 2; + +const int CLD_DUMPED = 3; + +const int CLD_TRAPPED = 4; + +const int CLD_STOPPED = 5; + +const int CLD_CONTINUED = 6; + +const int POLL_IN = 1; + +const int POLL_OUT = 2; + +const int POLL_MSG = 3; + +const int POLL_ERR = 4; + +const int POLL_PRI = 5; + +const int POLL_HUP = 6; + +const int SA_ONSTACK = 1; + +const int SA_RESTART = 2; + +const int SA_RESETHAND = 4; + +const int SA_NOCLDSTOP = 8; + +const int SA_NODEFER = 16; + +const int SA_NOCLDWAIT = 32; + +const int SA_SIGINFO = 64; + +const int SA_USERTRAMP = 256; + +const int SA_64REGSET = 512; + +const int SA_USERSPACE_MASK = 127; + +const int SIG_BLOCK = 1; + +const int SIG_UNBLOCK = 2; + +const int SIG_SETMASK = 3; + +const int SI_USER = 65537; + +const int SI_QUEUE = 65538; + +const int SI_TIMER = 65539; + +const int SI_ASYNCIO = 65540; + +const int SI_MESGQ = 65541; + +const int SS_ONSTACK = 1; + +const int SS_DISABLE = 4; + +const int MINSIGSTKSZ = 32768; + +const int SIGSTKSZ = 131072; + +const int SV_ONSTACK = 1; + +const int SV_INTERRUPT = 2; + +const int SV_RESETHAND = 4; + +const int SV_NODEFER = 16; + +const int SV_NOCLDSTOP = 8; + +const int SV_SIGINFO = 64; + const int __WORDSIZE = 64; const int INT8_MAX = 127; @@ -552,3 +4818,225 @@ const int WINT_MAX = 2147483647; const int SIG_ATOMIC_MIN = -2147483648; const int SIG_ATOMIC_MAX = 2147483647; + +const int PRIO_PROCESS = 0; + +const int PRIO_PGRP = 1; + +const int PRIO_USER = 2; + +const int PRIO_DARWIN_THREAD = 3; + +const int PRIO_DARWIN_PROCESS = 4; + +const int PRIO_MIN = -20; + +const int PRIO_MAX = 20; + +const int PRIO_DARWIN_BG = 4096; + +const int PRIO_DARWIN_NONUI = 4097; + +const int RUSAGE_SELF = 0; + +const int RUSAGE_CHILDREN = -1; + +const int RUSAGE_INFO_V0 = 0; + +const int RUSAGE_INFO_V1 = 1; + +const int RUSAGE_INFO_V2 = 2; + +const int RUSAGE_INFO_V3 = 3; + +const int RUSAGE_INFO_V4 = 4; + +const int RUSAGE_INFO_V5 = 5; + +const int RUSAGE_INFO_V6 = 6; + +const int RUSAGE_INFO_CURRENT = 6; + +const int RU_PROC_RUNS_RESLIDE = 1; + +const int RLIM_INFINITY = 9223372036854775807; + +const int RLIM_SAVED_MAX = 9223372036854775807; + +const int RLIM_SAVED_CUR = 9223372036854775807; + +const int RLIMIT_CPU = 0; + +const int RLIMIT_FSIZE = 1; + +const int RLIMIT_DATA = 2; + +const int RLIMIT_STACK = 3; + +const int RLIMIT_CORE = 4; + +const int RLIMIT_AS = 5; + +const int RLIMIT_RSS = 5; + +const int RLIMIT_MEMLOCK = 6; + +const int RLIMIT_NPROC = 7; + +const int RLIMIT_NOFILE = 8; + +const int RLIM_NLIMITS = 9; + +const int _RLIMIT_POSIX_FLAG = 4096; + +const int RLIMIT_WAKEUPS_MONITOR = 1; + +const int RLIMIT_CPU_USAGE_MONITOR = 2; + +const int RLIMIT_THREAD_CPULIMITS = 3; + +const int RLIMIT_FOOTPRINT_INTERVAL = 4; + +const int WAKEMON_ENABLE = 1; + +const int WAKEMON_DISABLE = 2; + +const int WAKEMON_GET_PARAMS = 4; + +const int WAKEMON_SET_DEFAULTS = 8; + +const int WAKEMON_MAKE_FATAL = 16; + +const int CPUMON_MAKE_FATAL = 4096; + +const int FOOTPRINT_INTERVAL_RESET = 1; + +const int IOPOL_TYPE_DISK = 0; + +const int IOPOL_TYPE_VFS_ATIME_UPDATES = 2; + +const int IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES = 3; + +const int IOPOL_TYPE_VFS_STATFS_NO_DATA_VOLUME = 4; + +const int IOPOL_TYPE_VFS_TRIGGER_RESOLVE = 5; + +const int IOPOL_TYPE_VFS_IGNORE_CONTENT_PROTECTION = 6; + +const int IOPOL_TYPE_VFS_IGNORE_PERMISSIONS = 7; + +const int IOPOL_TYPE_VFS_SKIP_MTIME_UPDATE = 8; + +const int IOPOL_TYPE_VFS_ALLOW_LOW_SPACE_WRITES = 9; + +const int IOPOL_TYPE_VFS_DISALLOW_RW_FOR_O_EVTONLY = 10; + +const int IOPOL_SCOPE_PROCESS = 0; + +const int IOPOL_SCOPE_THREAD = 1; + +const int IOPOL_SCOPE_DARWIN_BG = 2; + +const int IOPOL_DEFAULT = 0; + +const int IOPOL_IMPORTANT = 1; + +const int IOPOL_PASSIVE = 2; + +const int IOPOL_THROTTLE = 3; + +const int IOPOL_UTILITY = 4; + +const int IOPOL_STANDARD = 5; + +const int IOPOL_APPLICATION = 5; + +const int IOPOL_NORMAL = 1; + +const int IOPOL_ATIME_UPDATES_DEFAULT = 0; + +const int IOPOL_ATIME_UPDATES_OFF = 1; + +const int IOPOL_MATERIALIZE_DATALESS_FILES_DEFAULT = 0; + +const int IOPOL_MATERIALIZE_DATALESS_FILES_OFF = 1; + +const int IOPOL_MATERIALIZE_DATALESS_FILES_ON = 2; + +const int IOPOL_VFS_STATFS_NO_DATA_VOLUME_DEFAULT = 0; + +const int IOPOL_VFS_STATFS_FORCE_NO_DATA_VOLUME = 1; + +const int IOPOL_VFS_TRIGGER_RESOLVE_DEFAULT = 0; + +const int IOPOL_VFS_TRIGGER_RESOLVE_OFF = 1; + +const int IOPOL_VFS_CONTENT_PROTECTION_DEFAULT = 0; + +const int IOPOL_VFS_CONTENT_PROTECTION_IGNORE = 1; + +const int IOPOL_VFS_IGNORE_PERMISSIONS_OFF = 0; + +const int IOPOL_VFS_IGNORE_PERMISSIONS_ON = 1; + +const int IOPOL_VFS_SKIP_MTIME_UPDATE_OFF = 0; + +const int IOPOL_VFS_SKIP_MTIME_UPDATE_ON = 1; + +const int IOPOL_VFS_ALLOW_LOW_SPACE_WRITES_OFF = 0; + +const int IOPOL_VFS_ALLOW_LOW_SPACE_WRITES_ON = 1; + +const int IOPOL_VFS_DISALLOW_RW_FOR_O_EVTONLY_DEFAULT = 0; + +const int IOPOL_VFS_DISALLOW_RW_FOR_O_EVTONLY_ON = 1; + +const int IOPOL_VFS_NOCACHE_WRITE_FS_BLKSIZE_DEFAULT = 0; + +const int IOPOL_VFS_NOCACHE_WRITE_FS_BLKSIZE_ON = 1; + +const int WNOHANG = 1; + +const int WUNTRACED = 2; + +const int WCOREFLAG = 128; + +const int _WSTOPPED = 127; + +const int WEXITED = 4; + +const int WSTOPPED = 8; + +const int WCONTINUED = 16; + +const int WNOWAIT = 32; + +const int WAIT_ANY = -1; + +const int WAIT_MYPGRP = 0; + +const int _QUAD_HIGHWORD = 1; + +const int _QUAD_LOWWORD = 0; + +const int __DARWIN_LITTLE_ENDIAN = 1234; + +const int __DARWIN_BIG_ENDIAN = 4321; + +const int __DARWIN_PDP_ENDIAN = 3412; + +const int __DARWIN_BYTE_ORDER = 1234; + +const int LITTLE_ENDIAN = 1234; + +const int BIG_ENDIAN = 4321; + +const int PDP_ENDIAN = 3412; + +const int BYTE_ORDER = 1234; + +const int EXIT_FAILURE = 1; + +const int EXIT_SUCCESS = 0; + +const int RAND_MAX = 2147483647; diff --git a/lib/singbox/service/ffi_singbox_service.dart b/lib/singbox/service/ffi_singbox_service.dart index 9899725b..a52020b8 100644 --- a/lib/singbox/service/ffi_singbox_service.dart +++ b/lib/singbox/service/ffi_singbox_service.dart @@ -119,7 +119,7 @@ class FFISingboxService with InfraLogger implements SingboxService { () => CombineWorker().execute( () { final json = jsonEncode(options.toJson()); - final err = _box.changeConfigOptions(json.toNativeUtf8().cast()).cast().toDartString(); + final err = _box.changeHiddifyOptions(json.toNativeUtf8().cast()).cast().toDartString(); if (err.isNotEmpty) { return left(err); }