d3d9/tests: Test the presentation parameters after creating a device.
[wine.git] / include / netiodef.h
blob0d0d316b8ebae9635219e7600dfb19015df2282e
1 /*
2 * Copyright 2021 Huw Davies
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __WINE_NETIODEF_H
20 #define __WINE_NETIODEF_H
22 typedef enum _NPI_MODULEID_TYPE
24 MIT_GUID = 1,
25 MIT_IF_LUID
26 } NPI_MODULEID_TYPE;
28 typedef struct _NPI_MODULEID
30 USHORT Length;
31 NPI_MODULEID_TYPE Type;
32 union
34 GUID Guid;
35 LUID IfLuid;
37 } NPI_MODULEID;
39 typedef const NPI_MODULEID *PNPI_MODULEID;
41 static inline BOOLEAN NmrIsEqualNpiModuleId( const NPI_MODULEID *mod1, const NPI_MODULEID *mod2 )
43 if (mod1->Type == mod2->Type)
45 if (mod1->Type == MIT_GUID)
47 #ifdef __cplusplus
48 return IsEqualGUID( mod1->Guid, mod2->Guid );
49 #else
50 return IsEqualGUID( &mod1->Guid, &mod2->Guid );
51 #endif
53 else if (mod1->Type == MIT_IF_LUID)
54 return mod1->IfLuid.HighPart == mod2->IfLuid.HighPart &&
55 mod1->IfLuid.LowPart == mod2->IfLuid.LowPart;
57 return FALSE;
60 #ifdef __WINE_INIT_NPI_MODULEID
61 #ifdef __cplusplus
62 #define DEFINE_NPI_GUID_MODULEID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
63 EXTERN_C const NPI_MODULEID name = \
64 { sizeof(NPI_MODULEID), MIT_GUID, { { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } } }
65 #else
66 #define DEFINE_NPI_GUID_MODULEID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
67 const NPI_MODULEID name = \
68 { sizeof(NPI_MODULEID), MIT_GUID, { { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } } }
69 #endif
70 #else /* __WINE_INIT_MODULEID */
71 #define DEFINE_NPI_GUID_MODULEID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
72 EXTERN_C const NPI_MODULEID name
73 #endif /* __WINE_INIT_MODULEID */
75 #define DEFINE_NPI_MS_MODULEID(name, n) DEFINE_NPI_GUID_MODULEID(name, 0xeb004a00 + (n), 0x9b1a, 0x11d4, \
76 0x91, 0x23, 0x00, 0x50, 0x04, 0x77, 0x59, 0xbc)
78 DEFINE_NPI_MS_MODULEID( NPI_MS_IPV4_MODULEID, 0x00 );
79 DEFINE_NPI_MS_MODULEID( NPI_MS_IPV6_MODULEID, 0x01 );
80 DEFINE_NPI_MS_MODULEID( NPI_MS_UDP_MODULEID, 0x02 );
81 DEFINE_NPI_MS_MODULEID( NPI_MS_TCP_MODULEID, 0x03 );
82 DEFINE_NPI_MS_MODULEID( NPI_MS_NDIS_MODULEID, 0x11 );
84 #undef DEFINE_NPI_MS_MODULEID
85 #undef DEFINE_NPI_GUID_MODULEID
87 #endif /* __WINE_NETIODEF_H */