#![allow(
non_camel_case_types,
non_snake_case,
dead_code,
non_upper_case_globals
)]
#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct __BindgenBitfieldUnit<Storage, Align> {
storage: Storage,
align: [Align; 0],
}
impl<Storage, Align> __BindgenBitfieldUnit<Storage, Align> {
#[inline]
pub const fn new(storage: Storage) -> Self {
Self { storage, align: [] }
}
}
impl<Storage, Align> __BindgenBitfieldUnit<Storage, Align>
where
Storage: AsRef<[u8]> + AsMut<[u8]>,
{
#[inline]
pub fn get_bit(&self, index: usize) -> bool {
debug_assert!(index / 8 < self.storage.as_ref().len());
let byte_index = index / 8;
let byte = self.storage.as_ref()[byte_index];
let bit_index = if cfg!(target_endian = "big") {
7 - (index % 8)
} else {
index % 8
};
let mask = 1 << bit_index;
byte & mask == mask
}
#[inline]
pub fn set_bit(&mut self, index: usize, val: bool) {
debug_assert!(index / 8 < self.storage.as_ref().len());
let byte_index = index / 8;
let byte = &mut self.storage.as_mut()[byte_index];
let bit_index = if cfg!(target_endian = "big") {
7 - (index % 8)
} else {
index % 8
};
let mask = 1 << bit_index;
if val {
*byte |= mask;
} else {
*byte &= !mask;
}
}
#[inline]
pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
debug_assert!(bit_width <= 64);
debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
let mut val = 0;
for i in 0..(bit_width as usize) {
if self.get_bit(i + bit_offset) {
let index = if cfg!(target_endian = "big") {
bit_width as usize - 1 - i
} else {
i
};
val |= 1 << index;
}
}
val
}
#[inline]
pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
debug_assert!(bit_width <= 64);
debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
for i in 0..(bit_width as usize) {
let mask = 1 << i;
let val_bit_is_set = val & mask == mask;
let index = if cfg!(target_endian = "big") {
bit_width as usize - 1 - i
} else {
i
};
self.set_bit(index + bit_offset, val_bit_is_set);
}
}
}
pub const DNS_TYPE_ZERO: u32 = 0;
pub const DNS_TYPE_A: u32 = 1;
pub const DNS_TYPE_NS: u32 = 2;
pub const DNS_TYPE_MD: u32 = 3;
pub const DNS_TYPE_MF: u32 = 4;
pub const DNS_TYPE_CNAME: u32 = 5;
pub const DNS_TYPE_SOA: u32 = 6;
pub const DNS_TYPE_MB: u32 = 7;
pub const DNS_TYPE_MG: u32 = 8;
pub const DNS_TYPE_MR: u32 = 9;
pub const DNS_TYPE_NULL: u32 = 10;
pub const DNS_TYPE_WKS: u32 = 11;
pub const DNS_TYPE_PTR: u32 = 12;
pub const DNS_TYPE_HINFO: u32 = 13;
pub const DNS_TYPE_MINFO: u32 = 14;
pub const DNS_TYPE_MX: u32 = 15;
pub const DNS_TYPE_TEXT: u32 = 16;
pub const DNS_TYPE_RP: u32 = 17;
pub const DNS_TYPE_AFSDB: u32 = 18;
pub const DNS_TYPE_X25: u32 = 19;
pub const DNS_TYPE_ISDN: u32 = 20;
pub const DNS_TYPE_RT: u32 = 21;
pub const DNS_TYPE_NSAP: u32 = 22;
pub const DNS_TYPE_NSAPPTR: u32 = 23;
pub const DNS_TYPE_SIG: u32 = 24;
pub const DNS_TYPE_KEY: u32 = 25;
pub const DNS_TYPE_PX: u32 = 26;
pub const DNS_TYPE_GPOS: u32 = 27;
pub const DNS_TYPE_AAAA: u32 = 28;
pub const DNS_TYPE_LOC: u32 = 29;
pub const DNS_TYPE_NXT: u32 = 30;
pub const DNS_TYPE_EID: u32 = 31;
pub const DNS_TYPE_NIMLOC: u32 = 32;
pub const DNS_TYPE_SRV: u32 = 33;
pub const DNS_TYPE_ATMA: u32 = 34;
pub const DNS_TYPE_NAPTR: u32 = 35;
pub const DNS_TYPE_KX: u32 = 36;
pub const DNS_TYPE_CERT: u32 = 37;
pub const DNS_TYPE_A6: u32 = 38;
pub const DNS_TYPE_DNAME: u32 = 39;
pub const DNS_TYPE_SINK: u32 = 40;
pub const DNS_TYPE_OPT: u32 = 41;
pub const DNS_TYPE_DS: u32 = 43;
pub const DNS_TYPE_RRSIG: u32 = 46;
pub const DNS_TYPE_NSEC: u32 = 47;
pub const DNS_TYPE_DNSKEY: u32 = 48;
pub const DNS_TYPE_DHCID: u32 = 49;
pub const DNS_TYPE_NSEC3: u32 = 50;
pub const DNS_TYPE_NSEC3PARAM: u32 = 51;
pub const DNS_TYPE_TLSA: u32 = 52;
pub const DNS_TYPE_UINFO: u32 = 100;
pub const DNS_TYPE_UID: u32 = 101;
pub const DNS_TYPE_GID: u32 = 102;
pub const DNS_TYPE_UNSPEC: u32 = 103;
pub const DNS_TYPE_ADDRS: u32 = 248;
pub const DNS_TYPE_TKEY: u32 = 249;
pub const DNS_TYPE_TSIG: u32 = 250;
pub const DNS_TYPE_IXFR: u32 = 251;
pub const DNS_TYPE_AXFR: u32 = 252;
pub const DNS_TYPE_MAILB: u32 = 253;
pub const DNS_TYPE_MAILA: u32 = 254;
pub const DNS_TYPE_ALL: u32 = 255;
pub const DNS_TYPE_ANY: u32 = 255;
pub const DNS_TYPE_WINS: u32 = 65281;
pub const DNS_TYPE_WINSR: u32 = 65282;
pub const DNS_TYPE_NBSTAT: u32 = 65282;
pub const DNS_QUERY_REQUEST_VERSION1: u32 = 1;
pub type wchar_t = ::std::os::raw::c_ushort;
pub type ULONG = ::std::os::raw::c_ulong;
pub type UCHAR = ::std::os::raw::c_uchar;
pub type DWORD = ::std::os::raw::c_ulong;
pub type BOOL = ::std::os::raw::c_int;
pub type BYTE = ::std::os::raw::c_uchar;
pub type WORD = ::std::os::raw::c_ushort;
pub type PBYTE = *mut BYTE;
pub type ULONG64 = ::std::os::raw::c_ulonglong;
pub type PVOID = *mut ::std::os::raw::c_void;
pub type LONG = ::std::os::raw::c_long;
pub type WCHAR = wchar_t;
pub type LPWSTR = *mut WCHAR;
pub type PWSTR = *mut WCHAR;
pub type PCWSTR = *const WCHAR;
pub type HANDLE = *mut ::std::os::raw::c_void;
pub type LONGLONG = ::std::os::raw::c_longlong;
pub type QWORD = ::std::os::raw::c_ulonglong;
pub type DNS_STATUS = LONG;
pub type IP4_ADDRESS = DWORD;
pub type PIP4_ADDRESS = *mut DWORD;
#[repr(C)]
#[derive(Copy, Clone)]
pub union IP6_ADDRESS {
pub IP6Qword: [QWORD; 2usize],
pub IP6Dword: [DWORD; 4usize],
pub IP6Word: [WORD; 8usize],
pub IP6Byte: [BYTE; 16usize],
_bindgen_union_align: [u64; 2usize],
}
#[test]
fn bindgen_test_layout_IP6_ADDRESS() {
assert_eq!(
::std::mem::size_of::<IP6_ADDRESS>(),
16usize,
concat!("Size of: ", stringify!(IP6_ADDRESS))
);
assert_eq!(
::std::mem::align_of::<IP6_ADDRESS>(),
8usize,
concat!("Alignment of ", stringify!(IP6_ADDRESS))
);
}
pub type PIP6_ADDRESS = *mut IP6_ADDRESS;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DNS_A_DATA {
pub IpAddress: IP4_ADDRESS,
}
#[test]
fn bindgen_test_layout_DNS_A_DATA() {
assert_eq!(
::std::mem::size_of::<DNS_A_DATA>(),
4usize,
concat!("Size of: ", stringify!(DNS_A_DATA))
);
assert_eq!(
::std::mem::align_of::<DNS_A_DATA>(),
4usize,
concat!("Alignment of ", stringify!(DNS_A_DATA))
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DNS_PTR_DATAW {
pub pNameHost: PWSTR,
}
#[test]
fn bindgen_test_layout_DNS_PTR_DATAW() {
assert_eq!(
::std::mem::size_of::<DNS_PTR_DATAW>(),
8usize,
concat!("Size of: ", stringify!(DNS_PTR_DATAW))
);
assert_eq!(
::std::mem::align_of::<DNS_PTR_DATAW>(),
8usize,
concat!("Alignment of ", stringify!(DNS_PTR_DATAW))
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DNS_SOA_DATAW {
pub pNamePrimaryServer: PWSTR,
pub pNameAdministrator: PWSTR,
pub dwSerialNo: DWORD,
pub dwRefresh: DWORD,
pub dwRetry: DWORD,
pub dwExpire: DWORD,
pub dwDefaultTtl: DWORD,
}
#[test]
fn bindgen_test_layout_DNS_SOA_DATAW() {
assert_eq!(
::std::mem::size_of::<DNS_SOA_DATAW>(),
40usize,
concat!("Size of: ", stringify!(DNS_SOA_DATAW))
);
assert_eq!(
::std::mem::align_of::<DNS_SOA_DATAW>(),
8usize,
concat!("Alignment of ", stringify!(DNS_SOA_DATAW))
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DNS_MINFO_DATAW {
pub pNameMailbox: PWSTR,
pub pNameErrorsMailbox: PWSTR,
}
#[test]
fn bindgen_test_layout_DNS_MINFO_DATAW() {
assert_eq!(
::std::mem::size_of::<DNS_MINFO_DATAW>(),
16usize,
concat!("Size of: ", stringify!(DNS_MINFO_DATAW))
);
assert_eq!(
::std::mem::align_of::<DNS_MINFO_DATAW>(),
8usize,
concat!("Alignment of ", stringify!(DNS_MINFO_DATAW))
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DNS_MX_DATAW {
pub pNameExchange: PWSTR,
pub wPreference: WORD,
pub Pad: WORD,
}
#[test]
fn bindgen_test_layout_DNS_MX_DATAW() {
assert_eq!(
::std::mem::size_of::<DNS_MX_DATAW>(),
16usize,
concat!("Size of: ", stringify!(DNS_MX_DATAW))
);
assert_eq!(
::std::mem::align_of::<DNS_MX_DATAW>(),
8usize,
concat!("Alignment of ", stringify!(DNS_MX_DATAW))
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DNS_TXT_DATAW {
pub dwStringCount: DWORD,
pub pStringArray: [PWSTR; 1usize],
}
#[test]
fn bindgen_test_layout_DNS_TXT_DATAW() {
assert_eq!(
::std::mem::size_of::<DNS_TXT_DATAW>(),
16usize,
concat!("Size of: ", stringify!(DNS_TXT_DATAW))
);
assert_eq!(
::std::mem::align_of::<DNS_TXT_DATAW>(),
8usize,
concat!("Alignment of ", stringify!(DNS_TXT_DATAW))
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DNS_NULL_DATA {
pub dwByteCount: DWORD,
pub Data: [BYTE; 1usize],
}
#[test]
fn bindgen_test_layout_DNS_NULL_DATA() {
assert_eq!(
::std::mem::size_of::<DNS_NULL_DATA>(),
8usize,
concat!("Size of: ", stringify!(DNS_NULL_DATA))
);
assert_eq!(
::std::mem::align_of::<DNS_NULL_DATA>(),
4usize,
concat!("Alignment of ", stringify!(DNS_NULL_DATA))
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DNS_WKS_DATA {
pub IpAddress: IP4_ADDRESS,
pub chProtocol: UCHAR,
pub BitMask: [BYTE; 1usize],
}
#[test]
fn bindgen_test_layout_DNS_WKS_DATA() {
assert_eq!(
::std::mem::size_of::<DNS_WKS_DATA>(),
8usize,
concat!("Size of: ", stringify!(DNS_WKS_DATA))
);
assert_eq!(
::std::mem::align_of::<DNS_WKS_DATA>(),
4usize,
concat!("Alignment of ", stringify!(DNS_WKS_DATA))
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct DNS_AAAA_DATA {
pub Ip6Address: IP6_ADDRESS,
}
#[test]
fn bindgen_test_layout_DNS_AAAA_DATA() {
assert_eq!(
::std::mem::size_of::<DNS_AAAA_DATA>(),
16usize,
concat!("Size of: ", stringify!(DNS_AAAA_DATA))
);
assert_eq!(
::std::mem::align_of::<DNS_AAAA_DATA>(),
8usize,
concat!("Alignment of ", stringify!(DNS_AAAA_DATA))
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DNS_SIG_DATAW {
pub wTypeCovered: WORD,
pub chAlgorithm: BYTE,
pub chLabelCount: BYTE,
pub dwOriginalTtl: DWORD,
pub dwExpiration: DWORD,
pub dwTimeSigned: DWORD,
pub wKeyTag: WORD,
pub wSignatureLength: WORD,
pub pNameSigner: PWSTR,
pub Signature: [BYTE; 1usize],
}
#[test]
fn bindgen_test_layout_DNS_SIG_DATAW() {
assert_eq!(
::std::mem::size_of::<DNS_SIG_DATAW>(),
40usize,
concat!("Size of: ", stringify!(DNS_SIG_DATAW))
);
assert_eq!(
::std::mem::align_of::<DNS_SIG_DATAW>(),
8usize,
concat!("Alignment of ", stringify!(DNS_SIG_DATAW))
);
}
pub type DNS_RRSIG_DATAW = DNS_SIG_DATAW;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DNS_KEY_DATA {
pub wFlags: WORD,
pub chProtocol: BYTE,
pub chAlgorithm: BYTE,
pub wKeyLength: WORD,
pub wPad: WORD,
pub Key: [BYTE; 1usize],
}
#[test]
fn bindgen_test_layout_DNS_KEY_DATA() {
assert_eq!(
::std::mem::size_of::<DNS_KEY_DATA>(),
10usize,
concat!("Size of: ", stringify!(DNS_KEY_DATA))
);
assert_eq!(
::std::mem::align_of::<DNS_KEY_DATA>(),
2usize,
concat!("Alignment of ", stringify!(DNS_KEY_DATA))
);
}
pub type DNS_DNSKEY_DATA = DNS_KEY_DATA;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DNS_DHCID_DATA {
pub dwByteCount: DWORD,
pub DHCID: [BYTE; 1usize],
}
#[test]
fn bindgen_test_layout_DNS_DHCID_DATA() {
assert_eq!(
::std::mem::size_of::<DNS_DHCID_DATA>(),
8usize,
concat!("Size of: ", stringify!(DNS_DHCID_DATA))
);
assert_eq!(
::std::mem::align_of::<DNS_DHCID_DATA>(),
4usize,
concat!("Alignment of ", stringify!(DNS_DHCID_DATA))
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DNS_NSEC_DATAW {
pub pNextDomainName: PWSTR,
pub wTypeBitMapsLength: WORD,
pub wPad: WORD,
pub TypeBitMaps: [BYTE; 1usize],
}
#[test]
fn bindgen_test_layout_DNS_NSEC_DATAW() {
assert_eq!(
::std::mem::size_of::<DNS_NSEC_DATAW>(),
16usize,
concat!("Size of: ", stringify!(DNS_NSEC_DATAW))
);
assert_eq!(
::std::mem::align_of::<DNS_NSEC_DATAW>(),
8usize,
concat!("Alignment of ", stringify!(DNS_NSEC_DATAW))
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DNS_NSEC3_DATA {
pub chAlgorithm: BYTE,
pub bFlags: BYTE,
pub wIterations: WORD,
pub bSaltLength: BYTE,
pub bHashLength: BYTE,
pub wTypeBitMapsLength: WORD,
pub chData: [BYTE; 1usize],
}
#[test]
fn bindgen_test_layout_DNS_NSEC3_DATA() {
assert_eq!(
::std::mem::size_of::<DNS_NSEC3_DATA>(),
10usize,
concat!("Size of: ", stringify!(DNS_NSEC3_DATA))
);
assert_eq!(
::std::mem::align_of::<DNS_NSEC3_DATA>(),
2usize,
concat!("Alignment of ", stringify!(DNS_NSEC3_DATA))
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DNS_NSEC3PARAM_DATA {
pub chAlgorithm: BYTE,
pub bFlags: BYTE,
pub wIterations: WORD,
pub bSaltLength: BYTE,
pub bPad: [BYTE; 3usize],
pub pbSalt: [BYTE; 1usize],
}
#[test]
fn bindgen_test_layout_DNS_NSEC3PARAM_DATA() {
assert_eq!(
::std::mem::size_of::<DNS_NSEC3PARAM_DATA>(),
10usize,
concat!("Size of: ", stringify!(DNS_NSEC3PARAM_DATA))
);
assert_eq!(
::std::mem::align_of::<DNS_NSEC3PARAM_DATA>(),
2usize,
concat!("Alignment of ", stringify!(DNS_NSEC3PARAM_DATA))
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DNS_TLSA_DATA {
pub bCertUsage: BYTE,
pub bSelector: BYTE,
pub bMatchingType: BYTE,
pub bCertificateAssociationDataLength: WORD,
pub bPad: [BYTE; 3usize],
pub bCertificateAssociationData: [BYTE; 1usize],
}
#[test]
fn bindgen_test_layout_DNS_TLSA_DATA() {
assert_eq!(
::std::mem::size_of::<DNS_TLSA_DATA>(),
10usize,
concat!("Size of: ", stringify!(DNS_TLSA_DATA))
);
assert_eq!(
::std::mem::align_of::<DNS_TLSA_DATA>(),
2usize,
concat!("Alignment of ", stringify!(DNS_TLSA_DATA))
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DNS_DS_DATA {
pub wKeyTag: WORD,
pub chAlgorithm: BYTE,
pub chDigestType: BYTE,
pub wDigestLength: WORD,
pub wPad: WORD,
pub Digest: [BYTE; 1usize],
}
#[test]
fn bindgen_test_layout_DNS_DS_DATA() {
assert_eq!(
::std::mem::size_of::<DNS_DS_DATA>(),
10usize,
concat!("Size of: ", stringify!(DNS_DS_DATA))
);
assert_eq!(
::std::mem::align_of::<DNS_DS_DATA>(),
2usize,
concat!("Alignment of ", stringify!(DNS_DS_DATA))
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DNS_OPT_DATA {
pub wDataLength: WORD,
pub wPad: WORD,
pub Data: [BYTE; 1usize],
}
#[test]
fn bindgen_test_layout_DNS_OPT_DATA() {
assert_eq!(
::std::mem::size_of::<DNS_OPT_DATA>(),
6usize,
concat!("Size of: ", stringify!(DNS_OPT_DATA))
);
assert_eq!(
::std::mem::align_of::<DNS_OPT_DATA>(),
2usize,
concat!("Alignment of ", stringify!(DNS_OPT_DATA))
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DNS_NXT_DATAW {
pub pNameNext: PWSTR,
pub wNumTypes: WORD,
pub wTypes: [WORD; 1usize],
}
#[test]
fn bindgen_test_layout_DNS_NXT_DATAW() {
assert_eq!(
::std::mem::size_of::<DNS_NXT_DATAW>(),
16usize,
concat!("Size of: ", stringify!(DNS_NXT_DATAW))
);
assert_eq!(
::std::mem::align_of::<DNS_NXT_DATAW>(),
8usize,
concat!("Alignment of ", stringify!(DNS_NXT_DATAW))
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DNS_SRV_DATAW {
pub pNameTarget: PWSTR,
pub wPriority: WORD,
pub wWeight: WORD,
pub wPort: WORD,
pub Pad: WORD,
}
#[test]
fn bindgen_test_layout_DNS_SRV_DATAW() {
assert_eq!(
::std::mem::size_of::<DNS_SRV_DATAW>(),
16usize,
concat!("Size of: ", stringify!(DNS_SRV_DATAW))
);
assert_eq!(
::std::mem::align_of::<DNS_SRV_DATAW>(),
8usize,
concat!("Alignment of ", stringify!(DNS_SRV_DATAW))
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DNS_NAPTR_DATAW {
pub wOrder: WORD,
pub wPreference: WORD,
pub pFlags: PWSTR,
pub pService: PWSTR,
pub pRegularExpression: PWSTR,
pub pReplacement: PWSTR,
}
#[test]
fn bindgen_test_layout_DNS_NAPTR_DATAW() {
assert_eq!(
::std::mem::size_of::<DNS_NAPTR_DATAW>(),
40usize,
concat!("Size of: ", stringify!(DNS_NAPTR_DATAW))
);
assert_eq!(
::std::mem::align_of::<DNS_NAPTR_DATAW>(),
8usize,
concat!("Alignment of ", stringify!(DNS_NAPTR_DATAW))
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DNS_ATMA_DATA {
pub AddressType: BYTE,
pub Address: [BYTE; 20usize],
}
#[test]
fn bindgen_test_layout_DNS_ATMA_DATA() {
assert_eq!(
::std::mem::size_of::<DNS_ATMA_DATA>(),
21usize,
concat!("Size of: ", stringify!(DNS_ATMA_DATA))
);
assert_eq!(
::std::mem::align_of::<DNS_ATMA_DATA>(),
1usize,
concat!("Alignment of ", stringify!(DNS_ATMA_DATA))
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DNS_TKEY_DATAW {
pub pNameAlgorithm: PWSTR,
pub pAlgorithmPacket: PBYTE,
pub pKey: PBYTE,
pub pOtherData: PBYTE,
pub dwCreateTime: DWORD,
pub dwExpireTime: DWORD,
pub wMode: WORD,
pub wError: WORD,
pub wKeyLength: WORD,
pub wOtherLength: WORD,
pub cAlgNameLength: UCHAR,
pub bPacketPointers: BOOL,
}
#[test]
fn bindgen_test_layout_DNS_TKEY_DATAW() {
assert_eq!(
::std::mem::size_of::<DNS_TKEY_DATAW>(),
56usize,
concat!("Size of: ", stringify!(DNS_TKEY_DATAW))
);
assert_eq!(
::std::mem::align_of::<DNS_TKEY_DATAW>(),
8usize,
concat!("Alignment of ", stringify!(DNS_TKEY_DATAW))
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DNS_TSIG_DATAW {
pub pNameAlgorithm: PWSTR,
pub pAlgorithmPacket: PBYTE,
pub pSignature: PBYTE,
pub pOtherData: PBYTE,
pub i64CreateTime: LONGLONG,
pub wFudgeTime: WORD,
pub wOriginalXid: WORD,
pub wError: WORD,
pub wSigLength: WORD,
pub wOtherLength: WORD,
pub cAlgNameLength: UCHAR,
pub bPacketPointers: BOOL,
}
#[test]
fn bindgen_test_layout_DNS_TSIG_DATAW() {
assert_eq!(
::std::mem::size_of::<DNS_TSIG_DATAW>(),
56usize,
concat!("Size of: ", stringify!(DNS_TSIG_DATAW))
);
assert_eq!(
::std::mem::align_of::<DNS_TSIG_DATAW>(),
8usize,
concat!("Alignment of ", stringify!(DNS_TSIG_DATAW))
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DNS_UNKNOWN_DATA {
pub dwByteCount: DWORD,
pub bData: [BYTE; 1usize],
}
#[test]
fn bindgen_test_layout_DNS_UNKNOWN_DATA() {
assert_eq!(
::std::mem::size_of::<DNS_UNKNOWN_DATA>(),
8usize,
concat!("Size of: ", stringify!(DNS_UNKNOWN_DATA))
);
assert_eq!(
::std::mem::align_of::<DNS_UNKNOWN_DATA>(),
4usize,
concat!("Alignment of ", stringify!(DNS_UNKNOWN_DATA))
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DNS_WINS_DATA {
pub dwMappingFlag: DWORD,
pub dwLookupTimeout: DWORD,
pub dwCacheTimeout: DWORD,
pub cWinsServerCount: DWORD,
pub WinsServers: [IP4_ADDRESS; 1usize],
}
#[test]
fn bindgen_test_layout_DNS_WINS_DATA() {
assert_eq!(
::std::mem::size_of::<DNS_WINS_DATA>(),
20usize,
concat!("Size of: ", stringify!(DNS_WINS_DATA))
);
assert_eq!(
::std::mem::align_of::<DNS_WINS_DATA>(),
4usize,
concat!("Alignment of ", stringify!(DNS_WINS_DATA))
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DNS_WINSR_DATAW {
pub dwMappingFlag: DWORD,
pub dwLookupTimeout: DWORD,
pub dwCacheTimeout: DWORD,
pub pNameResultDomain: PWSTR,
}
#[test]
fn bindgen_test_layout_DNS_WINSR_DATAW() {
assert_eq!(
::std::mem::size_of::<DNS_WINSR_DATAW>(),
24usize,
concat!("Size of: ", stringify!(DNS_WINSR_DATAW))
);
assert_eq!(
::std::mem::align_of::<DNS_WINSR_DATAW>(),
8usize,
concat!("Alignment of ", stringify!(DNS_WINSR_DATAW))
);
}
#[repr(C)]
#[repr(align(4))]
#[derive(Debug, Copy, Clone)]
pub struct _DnsRecordFlags {
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>,
}
#[test]
fn bindgen_test_layout__DnsRecordFlags() {
assert_eq!(
::std::mem::size_of::<_DnsRecordFlags>(),
4usize,
concat!("Size of: ", stringify!(_DnsRecordFlags))
);
assert_eq!(
::std::mem::align_of::<_DnsRecordFlags>(),
4usize,
concat!("Alignment of ", stringify!(_DnsRecordFlags))
);
}
impl _DnsRecordFlags {
#[inline]
pub fn Section(&self) -> DWORD {
unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) }
}
#[inline]
pub fn set_Section(&mut self, val: DWORD) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(0usize, 2u8, val as u64)
}
}
#[inline]
pub fn Delete(&self) -> DWORD {
unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) }
}
#[inline]
pub fn set_Delete(&mut self, val: DWORD) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(2usize, 1u8, val as u64)
}
}
#[inline]
pub fn CharSet(&self) -> DWORD {
unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 2u8) as u32) }
}
#[inline]
pub fn set_CharSet(&mut self, val: DWORD) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(3usize, 2u8, val as u64)
}
}
#[inline]
pub fn Unused(&self) -> DWORD {
unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 3u8) as u32) }
}
#[inline]
pub fn set_Unused(&mut self, val: DWORD) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(5usize, 3u8, val as u64)
}
}
#[inline]
pub fn Reserved(&self) -> DWORD {
unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 24u8) as u32) }
}
#[inline]
pub fn set_Reserved(&mut self, val: DWORD) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(8usize, 24u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
Section: DWORD,
Delete: DWORD,
CharSet: DWORD,
Unused: DWORD,
Reserved: DWORD,
) -> __BindgenBitfieldUnit<[u8; 4usize], u32> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u32> =
Default::default();
__bindgen_bitfield_unit.set(0usize, 2u8, {
let Section: u32 = unsafe { ::std::mem::transmute(Section) };
Section as u64
});
__bindgen_bitfield_unit.set(2usize, 1u8, {
let Delete: u32 = unsafe { ::std::mem::transmute(Delete) };
Delete as u64
});
__bindgen_bitfield_unit.set(3usize, 2u8, {
let CharSet: u32 = unsafe { ::std::mem::transmute(CharSet) };
CharSet as u64
});
__bindgen_bitfield_unit.set(5usize, 3u8, {
let Unused: u32 = unsafe { ::std::mem::transmute(Unused) };
Unused as u64
});
__bindgen_bitfield_unit.set(8usize, 24u8, {
let Reserved: u32 = unsafe { ::std::mem::transmute(Reserved) };
Reserved as u64
});
__bindgen_bitfield_unit
}
}
pub type DNS_RECORD_FLAGS = _DnsRecordFlags;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct _DnsRecordW {
pub pNext: *mut _DnsRecordW,
pub pName: PWSTR,
pub wType: WORD,
pub wDataLength: WORD,
pub Flags: _DnsRecordW__bindgen_ty_1,
pub dwTtl: DWORD,
pub dwReserved: DWORD,
pub Data: _DnsRecordW__bindgen_ty_2,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union _DnsRecordW__bindgen_ty_1 {
pub DW: DWORD,
pub S: DNS_RECORD_FLAGS,
_bindgen_union_align: u32,
}
#[test]
fn bindgen_test_layout__DnsRecordW__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<_DnsRecordW__bindgen_ty_1>(),
4usize,
concat!("Size of: ", stringify!(_DnsRecordW__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<_DnsRecordW__bindgen_ty_1>(),
4usize,
concat!("Alignment of ", stringify!(_DnsRecordW__bindgen_ty_1))
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union _DnsRecordW__bindgen_ty_2 {
pub A: DNS_A_DATA,
pub SOA: DNS_SOA_DATAW,
pub Soa: DNS_SOA_DATAW,
pub PTR: DNS_PTR_DATAW,
pub Ptr: DNS_PTR_DATAW,
pub NS: DNS_PTR_DATAW,
pub Ns: DNS_PTR_DATAW,
pub CNAME: DNS_PTR_DATAW,
pub Cname: DNS_PTR_DATAW,
pub DNAME: DNS_PTR_DATAW,
pub Dname: DNS_PTR_DATAW,
pub MB: DNS_PTR_DATAW,
pub Mb: DNS_PTR_DATAW,
pub MD: DNS_PTR_DATAW,
pub Md: DNS_PTR_DATAW,
pub MF: DNS_PTR_DATAW,
pub Mf: DNS_PTR_DATAW,
pub MG: DNS_PTR_DATAW,
pub Mg: DNS_PTR_DATAW,
pub MR: DNS_PTR_DATAW,
pub Mr: DNS_PTR_DATAW,
pub MINFO: DNS_MINFO_DATAW,
pub Minfo: DNS_MINFO_DATAW,
pub RP: DNS_MINFO_DATAW,
pub Rp: DNS_MINFO_DATAW,
pub MX: DNS_MX_DATAW,
pub Mx: DNS_MX_DATAW,
pub AFSDB: DNS_MX_DATAW,
pub Afsdb: DNS_MX_DATAW,
pub RT: DNS_MX_DATAW,
pub Rt: DNS_MX_DATAW,
pub HINFO: DNS_TXT_DATAW,
pub Hinfo: DNS_TXT_DATAW,
pub ISDN: DNS_TXT_DATAW,
pub Isdn: DNS_TXT_DATAW,
pub TXT: DNS_TXT_DATAW,
pub Txt: DNS_TXT_DATAW,
pub X25: DNS_TXT_DATAW,
pub Null: DNS_NULL_DATA,
pub WKS: DNS_WKS_DATA,
pub Wks: DNS_WKS_DATA,
pub AAAA: DNS_AAAA_DATA,
pub KEY: DNS_KEY_DATA,
pub Key: DNS_KEY_DATA,
pub SIG: DNS_SIG_DATAW,
pub Sig: DNS_SIG_DATAW,
pub ATMA: DNS_ATMA_DATA,
pub Atma: DNS_ATMA_DATA,
pub NXT: DNS_NXT_DATAW,
pub Nxt: DNS_NXT_DATAW,
pub SRV: DNS_SRV_DATAW,
pub Srv: DNS_SRV_DATAW,
pub NAPTR: DNS_NAPTR_DATAW,
pub Naptr: DNS_NAPTR_DATAW,
pub OPT: DNS_OPT_DATA,
pub Opt: DNS_OPT_DATA,
pub DS: DNS_DS_DATA,
pub Ds: DNS_DS_DATA,
pub RRSIG: DNS_RRSIG_DATAW,
pub Rrsig: DNS_RRSIG_DATAW,
pub NSEC: DNS_NSEC_DATAW,
pub Nsec: DNS_NSEC_DATAW,
pub DNSKEY: DNS_DNSKEY_DATA,
pub Dnskey: DNS_DNSKEY_DATA,
pub TKEY: DNS_TKEY_DATAW,
pub Tkey: DNS_TKEY_DATAW,
pub TSIG: DNS_TSIG_DATAW,
pub Tsig: DNS_TSIG_DATAW,
pub WINS: DNS_WINS_DATA,
pub Wins: DNS_WINS_DATA,
pub WINSR: DNS_WINSR_DATAW,
pub WinsR: DNS_WINSR_DATAW,
pub NBSTAT: DNS_WINSR_DATAW,
pub Nbstat: DNS_WINSR_DATAW,
pub DHCID: DNS_DHCID_DATA,
pub NSEC3: DNS_NSEC3_DATA,
pub Nsec3: DNS_NSEC3_DATA,
pub NSEC3PARAM: DNS_NSEC3PARAM_DATA,
pub Nsec3Param: DNS_NSEC3PARAM_DATA,
pub TLSA: DNS_TLSA_DATA,
pub Tlsa: DNS_TLSA_DATA,
pub UNKNOWN: DNS_UNKNOWN_DATA,
pub Unknown: DNS_UNKNOWN_DATA,
pub pDataPtr: PBYTE,
_bindgen_union_align: [u64; 7usize],
}
#[test]
fn bindgen_test_layout__DnsRecordW__bindgen_ty_2() {
assert_eq!(
::std::mem::size_of::<_DnsRecordW__bindgen_ty_2>(),
56usize,
concat!("Size of: ", stringify!(_DnsRecordW__bindgen_ty_2))
);
assert_eq!(
::std::mem::align_of::<_DnsRecordW__bindgen_ty_2>(),
8usize,
concat!("Alignment of ", stringify!(_DnsRecordW__bindgen_ty_2))
);
}
#[test]
fn bindgen_test_layout__DnsRecordW() {
assert_eq!(
::std::mem::size_of::<_DnsRecordW>(),
88usize,
concat!("Size of: ", stringify!(_DnsRecordW))
);
assert_eq!(
::std::mem::align_of::<_DnsRecordW>(),
8usize,
concat!("Alignment of ", stringify!(_DnsRecordW))
);
}
pub type DNS_RECORDW = _DnsRecordW;
pub type PDNS_RECORD = *mut DNS_RECORDW;
pub const DNS_FREE_TYPE_DnsFreeFlat: DNS_FREE_TYPE = 0;
pub const DNS_FREE_TYPE_DnsFreeRecordList: DNS_FREE_TYPE = 1;
pub const DNS_FREE_TYPE_DnsFreeParsedMessageFields: DNS_FREE_TYPE = 2;
pub type DNS_FREE_TYPE = i32;
extern "C" {
pub fn DnsFree(pData: PVOID, FreeType: DNS_FREE_TYPE);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _DNS_QUERY_RESULT {
pub Version: ULONG,
pub QueryStatus: DNS_STATUS,
pub QueryOptions: ULONG64,
pub pQueryRecords: PDNS_RECORD,
pub Reserved: PVOID,
}
#[test]
fn bindgen_test_layout__DNS_QUERY_RESULT() {
assert_eq!(
::std::mem::size_of::<_DNS_QUERY_RESULT>(),
32usize,
concat!("Size of: ", stringify!(_DNS_QUERY_RESULT))
);
assert_eq!(
::std::mem::align_of::<_DNS_QUERY_RESULT>(),
8usize,
concat!("Alignment of ", stringify!(_DNS_QUERY_RESULT))
);
}
pub type PDNS_QUERY_RESULT = *mut _DNS_QUERY_RESULT;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _DNS_SERVICE_INSTANCE {
pub pszInstanceName: LPWSTR,
pub pszHostName: LPWSTR,
pub ip4Address: *mut IP4_ADDRESS,
pub ip6Address: *mut IP6_ADDRESS,
pub wPort: WORD,
pub wPriority: WORD,
pub wWeight: WORD,
pub dwPropertyCount: DWORD,
pub keys: *mut PWSTR,
pub values: *mut PWSTR,
pub dwInterfaceIndex: DWORD,
}
#[test]
fn bindgen_test_layout__DNS_SERVICE_INSTANCE() {
assert_eq!(
::std::mem::size_of::<_DNS_SERVICE_INSTANCE>(),
72usize,
concat!("Size of: ", stringify!(_DNS_SERVICE_INSTANCE))
);
assert_eq!(
::std::mem::align_of::<_DNS_SERVICE_INSTANCE>(),
8usize,
concat!("Alignment of ", stringify!(_DNS_SERVICE_INSTANCE))
);
}
pub type PDNS_SERVICE_INSTANCE = *mut _DNS_SERVICE_INSTANCE;
extern "C" {
pub fn DnsServiceConstructInstance(
pServiceName: PCWSTR,
pHostName: PCWSTR,
pIp4: PIP4_ADDRESS,
pIp6: PIP6_ADDRESS,
wPort: WORD,
wPriority: WORD,
wWeight: WORD,
dwPropertiesCount: DWORD,
keys: *mut PCWSTR,
values: *mut PCWSTR,
) -> PDNS_SERVICE_INSTANCE;
}
extern "C" {
pub fn DnsServiceCopyInstance(pOrig: PDNS_SERVICE_INSTANCE) -> PDNS_SERVICE_INSTANCE;
}
extern "C" {
pub fn DnsServiceFreeInstance(pInstance: PDNS_SERVICE_INSTANCE);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _DNS_SERVICE_CANCEL {
pub reserved: PVOID,
}
#[test]
fn bindgen_test_layout__DNS_SERVICE_CANCEL() {
assert_eq!(
::std::mem::size_of::<_DNS_SERVICE_CANCEL>(),
8usize,
concat!("Size of: ", stringify!(_DNS_SERVICE_CANCEL))
);
assert_eq!(
::std::mem::align_of::<_DNS_SERVICE_CANCEL>(),
8usize,
concat!("Alignment of ", stringify!(_DNS_SERVICE_CANCEL))
);
}
pub type PDNS_SERVICE_CANCEL = *mut _DNS_SERVICE_CANCEL;
pub type PDNS_SERVICE_BROWSE_CALLBACK =
::std::option::Option<unsafe extern "C" fn(DWORD, PVOID, PDNS_RECORD)>;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct _DNS_SERVICE_BROWSE_REQUEST {
pub Version: ULONG,
pub InterfaceIndex: ULONG,
pub QueryName: PCWSTR,
pub __bindgen_anon_1: _DNS_SERVICE_BROWSE_REQUEST__bindgen_ty_1,
pub pQueryContext: PVOID,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union _DNS_SERVICE_BROWSE_REQUEST__bindgen_ty_1 {
pub pBrowseCallback: PDNS_SERVICE_BROWSE_CALLBACK,
pub pBrowseCallbackV2:
::std::option::Option<unsafe extern "C" fn(DWORD, PVOID, PDNS_QUERY_RESULT)>,
_bindgen_union_align: u64,
}
#[test]
fn bindgen_test_layout__DNS_SERVICE_BROWSE_REQUEST__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<_DNS_SERVICE_BROWSE_REQUEST__bindgen_ty_1>(),
8usize,
concat!(
"Size of: ",
stringify!(_DNS_SERVICE_BROWSE_REQUEST__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<_DNS_SERVICE_BROWSE_REQUEST__bindgen_ty_1>(),
8usize,
concat!(
"Alignment of ",
stringify!(_DNS_SERVICE_BROWSE_REQUEST__bindgen_ty_1)
)
);
}
#[test]
fn bindgen_test_layout__DNS_SERVICE_BROWSE_REQUEST() {
assert_eq!(
::std::mem::size_of::<_DNS_SERVICE_BROWSE_REQUEST>(),
32usize,
concat!("Size of: ", stringify!(_DNS_SERVICE_BROWSE_REQUEST))
);
assert_eq!(
::std::mem::align_of::<_DNS_SERVICE_BROWSE_REQUEST>(),
8usize,
concat!("Alignment of ", stringify!(_DNS_SERVICE_BROWSE_REQUEST))
);
}
pub type PDNS_SERVICE_BROWSE_REQUEST = *mut _DNS_SERVICE_BROWSE_REQUEST;
extern "C" {
pub fn DnsServiceBrowse(
pRequest: PDNS_SERVICE_BROWSE_REQUEST,
pCancel: PDNS_SERVICE_CANCEL,
) -> DNS_STATUS;
}
extern "C" {
pub fn DnsServiceBrowseCancel(pCancelHandle: PDNS_SERVICE_CANCEL) -> DNS_STATUS;
}
pub type PDNS_SERVICE_RESOLVE_COMPLETE =
::std::option::Option<unsafe extern "C" fn(DWORD, PVOID, PDNS_SERVICE_INSTANCE)>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _DNS_SERVICE_RESOLVE_REQUEST {
pub Version: ULONG,
pub InterfaceIndex: ULONG,
pub QueryName: PWSTR,
pub pResolveCompletionCallback: PDNS_SERVICE_RESOLVE_COMPLETE,
pub pQueryContext: PVOID,
}
#[test]
fn bindgen_test_layout__DNS_SERVICE_RESOLVE_REQUEST() {
assert_eq!(
::std::mem::size_of::<_DNS_SERVICE_RESOLVE_REQUEST>(),
32usize,
concat!("Size of: ", stringify!(_DNS_SERVICE_RESOLVE_REQUEST))
);
assert_eq!(
::std::mem::align_of::<_DNS_SERVICE_RESOLVE_REQUEST>(),
8usize,
concat!("Alignment of ", stringify!(_DNS_SERVICE_RESOLVE_REQUEST))
);
}
pub type PDNS_SERVICE_RESOLVE_REQUEST = *mut _DNS_SERVICE_RESOLVE_REQUEST;
extern "C" {
pub fn DnsServiceResolve(
pRequest: PDNS_SERVICE_RESOLVE_REQUEST,
pCancel: PDNS_SERVICE_CANCEL,
) -> DNS_STATUS;
}
extern "C" {
pub fn DnsServiceResolveCancel(pCancelHandle: PDNS_SERVICE_CANCEL) -> DNS_STATUS;
}
pub type PDNS_SERVICE_REGISTER_COMPLETE =
::std::option::Option<unsafe extern "C" fn(DWORD, PVOID, PDNS_SERVICE_INSTANCE)>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _DNS_SERVICE_REGISTER_REQUEST {
pub Version: ULONG,
pub InterfaceIndex: ULONG,
pub pServiceInstance: PDNS_SERVICE_INSTANCE,
pub pRegisterCompletionCallback: PDNS_SERVICE_REGISTER_COMPLETE,
pub pQueryContext: PVOID,
pub hCredentials: HANDLE,
pub unicastEnabled: BOOL,
}
#[test]
fn bindgen_test_layout__DNS_SERVICE_REGISTER_REQUEST() {
assert_eq!(
::std::mem::size_of::<_DNS_SERVICE_REGISTER_REQUEST>(),
48usize,
concat!("Size of: ", stringify!(_DNS_SERVICE_REGISTER_REQUEST))
);
assert_eq!(
::std::mem::align_of::<_DNS_SERVICE_REGISTER_REQUEST>(),
8usize,
concat!("Alignment of ", stringify!(_DNS_SERVICE_REGISTER_REQUEST))
);
}
pub type PDNS_SERVICE_REGISTER_REQUEST = *mut _DNS_SERVICE_REGISTER_REQUEST;
extern "C" {
pub fn DnsServiceRegister(
pRequest: PDNS_SERVICE_REGISTER_REQUEST,
pCancel: PDNS_SERVICE_CANCEL,
) -> DWORD;
}
extern "C" {
pub fn DnsServiceDeRegister(
pRequest: PDNS_SERVICE_REGISTER_REQUEST,
pCancel: PDNS_SERVICE_CANCEL,
) -> DWORD;
}
extern "C" {
pub fn DnsServiceRegisterCancel(pCancelHandle: PDNS_SERVICE_CANCEL) -> DWORD;
}