/usr/src/ndiswrapper-1.59/lin2win.h is in ndiswrapper-dkms 1.59-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | /*
* Copyright (C) 2006 Giridhar Pemmasani
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#ifdef CONFIG_X86_64
u64 lin2win0(void *func);
u64 lin2win1(void *func, u64 arg1);
u64 lin2win2(void *func, u64 arg1, u64 arg2);
u64 lin2win3(void *func, u64 arg1, u64 arg2, u64 arg3);
u64 lin2win4(void *func, u64 arg1, u64 arg2, u64 arg3, u64 arg4);
u64 lin2win5(void *func, u64 arg1, u64 arg2, u64 arg3, u64 arg4, u64 arg5);
u64 lin2win6(void *func, u64 arg1, u64 arg2, u64 arg3, u64 arg4, u64 arg5,
u64 arg6);
#define LIN2WIN0(func) \
({ \
if (0) \
func(); \
lin2win0(func); \
})
#define LIN2WIN1(func, arg1) \
({ \
if (0) \
func(arg1); \
lin2win1(func, (u64)arg1); \
})
#define LIN2WIN2(func, arg1, arg2) \
({ \
if (0) \
func(arg1, arg2); \
lin2win2(func, (u64)arg1, (u64)arg2); \
})
#define LIN2WIN3(func, arg1, arg2, arg3) \
({ \
if (0) \
func(arg1, arg2, arg3); \
lin2win3(func, (u64)arg1, (u64)arg2, (u64)arg3); \
})
#define LIN2WIN4(func, arg1, arg2, arg3, arg4) \
({ \
if (0) \
func(arg1, arg2, arg3, arg4); \
lin2win4(func, (u64)arg1, (u64)arg2, (u64)arg3, (u64)arg4); \
})
#define LIN2WIN5(func, arg1, arg2, arg3, arg4, arg5) \
({ \
if (0) \
func(arg1, arg2, arg3, arg4, arg5); \
lin2win5(func, (u64)arg1, (u64)arg2, (u64)arg3, (u64)arg4, \
(u64)arg5); \
})
#define LIN2WIN6(func, arg1, arg2, arg3, arg4, arg5, arg6) \
({ \
if (0) \
func(arg1, arg2, arg3, arg4, arg5, arg6); \
lin2win6(func, (u64)arg1, (u64)arg2, (u64)arg3, (u64)arg4, \
(u64)arg5, (u64)arg6); \
})
#else // CONFIG_X86_64
#define LIN2WIN1(func, arg1) \
({ \
TRACE6("calling %p", func); \
func(arg1); \
})
#define LIN2WIN2(func, arg1, arg2) \
({ \
TRACE6("calling %p", func); \
func(arg1, arg2); \
})
#define LIN2WIN3(func, arg1, arg2, arg3) \
({ \
TRACE6("calling %p", func); \
func(arg1, arg2, arg3); \
})
#define LIN2WIN4(func, arg1, arg2, arg3, arg4) \
({ \
TRACE6("calling %p", func); \
func(arg1, arg2, arg3, arg4); \
})
#define LIN2WIN5(func, arg1, arg2, arg3, arg4, arg5) \
({ \
TRACE6("calling %p", func); \
func(arg1, arg2, arg3, arg4, arg5); \
})
#define LIN2WIN6(func, arg1, arg2, arg3, arg4, arg5, arg6) \
({ \
TRACE6("calling %p", func); \
func(arg1, arg2, arg3, arg4, arg5, arg6); \
})
#endif // CONFIG_X86_64
|