1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(dead_code)]

use crate::bitfield::__BindgenBitfieldUnit;
use crate::jni::*;

pub const JDWPTRANSPORT_VERSION_1_0: ::std::os::raw::c_uint = 65536;
pub const JDWPTRANSPORT_VERSION_1_1: ::std::os::raw::c_uint = 65537;
pub type jdwpTransportEnv = *const jdwpTransportNativeInterface_;
pub const jdwpTransportError_JDWPTRANSPORT_ERROR_NONE: jdwpTransportError = 0;
pub const jdwpTransportError_JDWPTRANSPORT_ERROR_ILLEGAL_ARGUMENT: jdwpTransportError = 103;
pub const jdwpTransportError_JDWPTRANSPORT_ERROR_OUT_OF_MEMORY: jdwpTransportError = 110;
pub const jdwpTransportError_JDWPTRANSPORT_ERROR_INTERNAL: jdwpTransportError = 113;
pub const jdwpTransportError_JDWPTRANSPORT_ERROR_ILLEGAL_STATE: jdwpTransportError = 201;
pub const jdwpTransportError_JDWPTRANSPORT_ERROR_IO_ERROR: jdwpTransportError = 202;
pub const jdwpTransportError_JDWPTRANSPORT_ERROR_TIMEOUT: jdwpTransportError = 203;
pub const jdwpTransportError_JDWPTRANSPORT_ERROR_MSG_NOT_AVAILABLE: jdwpTransportError = 204;
pub type jdwpTransportError = ::std::os::raw::c_uint;
#[repr(C)]
#[repr(align(4))]
#[derive(Debug, Copy, Clone)]
pub struct JDWPTransportCapabilities {
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize], u8>,
    pub __bindgen_padding_0: u16,
}
impl JDWPTransportCapabilities {
    #[inline]
    pub fn can_timeout_attach(&self) -> ::std::os::raw::c_uint {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
    }
    #[inline]
    pub fn set_can_timeout_attach(&mut self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            self._bitfield_1.set(0usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn can_timeout_accept(&self) -> ::std::os::raw::c_uint {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) }
    }
    #[inline]
    pub fn set_can_timeout_accept(&mut self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            self._bitfield_1.set(1usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn can_timeout_handshake(&self) -> ::std::os::raw::c_uint {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) }
    }
    #[inline]
    pub fn set_can_timeout_handshake(&mut self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            self._bitfield_1.set(2usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn reserved3(&self) -> ::std::os::raw::c_uint {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) }
    }
    #[inline]
    pub fn set_reserved3(&mut self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            self._bitfield_1.set(3usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn reserved4(&self) -> ::std::os::raw::c_uint {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) }
    }
    #[inline]
    pub fn set_reserved4(&mut self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            self._bitfield_1.set(4usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn reserved5(&self) -> ::std::os::raw::c_uint {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) }
    }
    #[inline]
    pub fn set_reserved5(&mut self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            self._bitfield_1.set(5usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn reserved6(&self) -> ::std::os::raw::c_uint {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) }
    }
    #[inline]
    pub fn set_reserved6(&mut self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            self._bitfield_1.set(6usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn reserved7(&self) -> ::std::os::raw::c_uint {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) }
    }
    #[inline]
    pub fn set_reserved7(&mut self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            self._bitfield_1.set(7usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn reserved8(&self) -> ::std::os::raw::c_uint {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) }
    }
    #[inline]
    pub fn set_reserved8(&mut self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            self._bitfield_1.set(8usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn reserved9(&self) -> ::std::os::raw::c_uint {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) }
    }
    #[inline]
    pub fn set_reserved9(&mut self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            self._bitfield_1.set(9usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn reserved10(&self) -> ::std::os::raw::c_uint {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) }
    }
    #[inline]
    pub fn set_reserved10(&mut self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            self._bitfield_1.set(10usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn reserved11(&self) -> ::std::os::raw::c_uint {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) }
    }
    #[inline]
    pub fn set_reserved11(&mut self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            self._bitfield_1.set(11usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn reserved12(&self) -> ::std::os::raw::c_uint {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) }
    }
    #[inline]
    pub fn set_reserved12(&mut self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            self._bitfield_1.set(12usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn reserved13(&self) -> ::std::os::raw::c_uint {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) }
    }
    #[inline]
    pub fn set_reserved13(&mut self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            self._bitfield_1.set(13usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn reserved14(&self) -> ::std::os::raw::c_uint {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) }
    }
    #[inline]
    pub fn set_reserved14(&mut self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            self._bitfield_1.set(14usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn reserved15(&self) -> ::std::os::raw::c_uint {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) }
    }
    #[inline]
    pub fn set_reserved15(&mut self, val: ::std::os::raw::c_uint) {
        unsafe {
            let val: u32 = ::std::mem::transmute(val);
            self._bitfield_1.set(15usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(
        can_timeout_attach: ::std::os::raw::c_uint,
        can_timeout_accept: ::std::os::raw::c_uint,
        can_timeout_handshake: ::std::os::raw::c_uint,
        reserved3: ::std::os::raw::c_uint,
        reserved4: ::std::os::raw::c_uint,
        reserved5: ::std::os::raw::c_uint,
        reserved6: ::std::os::raw::c_uint,
        reserved7: ::std::os::raw::c_uint,
        reserved8: ::std::os::raw::c_uint,
        reserved9: ::std::os::raw::c_uint,
        reserved10: ::std::os::raw::c_uint,
        reserved11: ::std::os::raw::c_uint,
        reserved12: ::std::os::raw::c_uint,
        reserved13: ::std::os::raw::c_uint,
        reserved14: ::std::os::raw::c_uint,
        reserved15: ::std::os::raw::c_uint,
    ) -> __BindgenBitfieldUnit<[u8; 2usize], u8> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize], u8> =
            Default::default();
        __bindgen_bitfield_unit.set(0usize, 1u8, {
            let can_timeout_attach: u32 = unsafe { ::std::mem::transmute(can_timeout_attach) };
            can_timeout_attach as u64
        });
        __bindgen_bitfield_unit.set(1usize, 1u8, {
            let can_timeout_accept: u32 = unsafe { ::std::mem::transmute(can_timeout_accept) };
            can_timeout_accept as u64
        });
        __bindgen_bitfield_unit.set(2usize, 1u8, {
            let can_timeout_handshake: u32 =
                unsafe { ::std::mem::transmute(can_timeout_handshake) };
            can_timeout_handshake as u64
        });
        __bindgen_bitfield_unit.set(3usize, 1u8, {
            let reserved3: u32 = unsafe { ::std::mem::transmute(reserved3) };
            reserved3 as u64
        });
        __bindgen_bitfield_unit.set(4usize, 1u8, {
            let reserved4: u32 = unsafe { ::std::mem::transmute(reserved4) };
            reserved4 as u64
        });
        __bindgen_bitfield_unit.set(5usize, 1u8, {
            let reserved5: u32 = unsafe { ::std::mem::transmute(reserved5) };
            reserved5 as u64
        });
        __bindgen_bitfield_unit.set(6usize, 1u8, {
            let reserved6: u32 = unsafe { ::std::mem::transmute(reserved6) };
            reserved6 as u64
        });
        __bindgen_bitfield_unit.set(7usize, 1u8, {
            let reserved7: u32 = unsafe { ::std::mem::transmute(reserved7) };
            reserved7 as u64
        });
        __bindgen_bitfield_unit.set(8usize, 1u8, {
            let reserved8: u32 = unsafe { ::std::mem::transmute(reserved8) };
            reserved8 as u64
        });
        __bindgen_bitfield_unit.set(9usize, 1u8, {
            let reserved9: u32 = unsafe { ::std::mem::transmute(reserved9) };
            reserved9 as u64
        });
        __bindgen_bitfield_unit.set(10usize, 1u8, {
            let reserved10: u32 = unsafe { ::std::mem::transmute(reserved10) };
            reserved10 as u64
        });
        __bindgen_bitfield_unit.set(11usize, 1u8, {
            let reserved11: u32 = unsafe { ::std::mem::transmute(reserved11) };
            reserved11 as u64
        });
        __bindgen_bitfield_unit.set(12usize, 1u8, {
            let reserved12: u32 = unsafe { ::std::mem::transmute(reserved12) };
            reserved12 as u64
        });
        __bindgen_bitfield_unit.set(13usize, 1u8, {
            let reserved13: u32 = unsafe { ::std::mem::transmute(reserved13) };
            reserved13 as u64
        });
        __bindgen_bitfield_unit.set(14usize, 1u8, {
            let reserved14: u32 = unsafe { ::std::mem::transmute(reserved14) };
            reserved14 as u64
        });
        __bindgen_bitfield_unit.set(15usize, 1u8, {
            let reserved15: u32 = unsafe { ::std::mem::transmute(reserved15) };
            reserved15 as u64
        });
        __bindgen_bitfield_unit
    }
}
pub const JDWPTRANSPORT_FLAGS_NONE: ::std::os::raw::c_uint = 0;
pub const JDWPTRANSPORT_FLAGS_REPLY: ::std::os::raw::c_uint = 128;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct jdwpCmdPacket {
    pub len: jint,
    pub id: jint,
    pub flags: jbyte,
    pub cmdSet: jbyte,
    pub cmd: jbyte,
    pub data: *mut jbyte,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct jdwpReplyPacket {
    pub len: jint,
    pub id: jint,
    pub flags: jbyte,
    pub errorCode: jshort,
    pub data: *mut jbyte,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct jdwpPacket {
    pub type_: jdwpPacket__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union jdwpPacket__bindgen_ty_1 {
    pub cmd: jdwpCmdPacket,
    pub reply: jdwpReplyPacket,
    _bindgen_union_align: [u64; 3usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct jdwpTransportCallback {
    pub alloc:
        ::std::option::Option<unsafe extern "C" fn(numBytes: jint) -> *mut ::std::os::raw::c_void>,
    pub free: ::std::option::Option<unsafe extern "C" fn(buffer: *mut ::std::os::raw::c_void)>,
}
pub type jdwpTransport_OnLoad_t = ::std::option::Option<
    unsafe extern "C" fn(
        jvm: *mut JavaVM,
        callback: *mut jdwpTransportCallback,
        version: jint,
        env: *mut *mut jdwpTransportEnv,
    ) -> jint,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct jdwpTransportConfiguration {
    pub allowed_peers: *const ::std::os::raw::c_char,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct jdwpTransportNativeInterface_ {
    pub reserved1: *mut ::std::os::raw::c_void,
    pub GetCapabilities: ::std::option::Option<
        unsafe extern "C" fn(
            env: *mut jdwpTransportEnv,
            capabilities_ptr: *mut JDWPTransportCapabilities,
        ) -> jdwpTransportError,
    >,
    pub Attach: ::std::option::Option<
        unsafe extern "C" fn(
            env: *mut jdwpTransportEnv,
            address: *const ::std::os::raw::c_char,
            attach_timeout: jlong,
            handshake_timeout: jlong,
        ) -> jdwpTransportError,
    >,
    pub StartListening: ::std::option::Option<
        unsafe extern "C" fn(
            env: *mut jdwpTransportEnv,
            address: *const ::std::os::raw::c_char,
            actual_address: *mut *mut ::std::os::raw::c_char,
        ) -> jdwpTransportError,
    >,
    pub StopListening: ::std::option::Option<
        unsafe extern "C" fn(env: *mut jdwpTransportEnv) -> jdwpTransportError,
    >,
    pub Accept: ::std::option::Option<
        unsafe extern "C" fn(
            env: *mut jdwpTransportEnv,
            accept_timeout: jlong,
            handshake_timeout: jlong,
        ) -> jdwpTransportError,
    >,
    pub IsOpen: ::std::option::Option<unsafe extern "C" fn(env: *mut jdwpTransportEnv) -> jboolean>,
    pub Close: ::std::option::Option<
        unsafe extern "C" fn(env: *mut jdwpTransportEnv) -> jdwpTransportError,
    >,
    pub ReadPacket: ::std::option::Option<
        unsafe extern "C" fn(
            env: *mut jdwpTransportEnv,
            pkt: *mut jdwpPacket,
        ) -> jdwpTransportError,
    >,
    pub WritePacket: ::std::option::Option<
        unsafe extern "C" fn(
            env: *mut jdwpTransportEnv,
            pkt: *const jdwpPacket,
        ) -> jdwpTransportError,
    >,
    pub GetLastError: ::std::option::Option<
        unsafe extern "C" fn(
            env: *mut jdwpTransportEnv,
            error: *mut *mut ::std::os::raw::c_char,
        ) -> jdwpTransportError,
    >,
    pub SetTransportConfiguration: ::std::option::Option<
        unsafe extern "C" fn(
            env: *mut jdwpTransportEnv,
            config: *mut jdwpTransportConfiguration,
        ) -> jdwpTransportError,
    >,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _jdwpTransportEnv {
    pub functions: *const jdwpTransportNativeInterface_,
}