- Make the package compile for i386

- Make the pAddr arg for DivertRecv() optional
- Make the i386 user binaries compatible with an amd64 driver.
  (useful for projects not yet ported to amd64)
This commit is contained in:
basil00
2011-08-23 22:18:02 +08:00
parent 378df755bc
commit 0ff63cda99
13 changed files with 78 additions and 35 deletions
+1 -1
View File
@@ -40,7 +40,7 @@
/*
* Entry.
*/
int main(int argc, char **argv)
int __cdecl main(int argc, char **argv)
{
HANDLE handle, console;
size_t slen, flen;
+7 -1
View File
@@ -14,6 +14,12 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
!IF "$(_BUILDARCH)" == "x86"
CPU=i386
!ELSE
CPU=$(_BUILDARCH)
!ENDIF
TARGETNAME=netdump
TARGETTYPE=PROGRAM
TARGETPATH=..\..\install
@@ -21,7 +27,7 @@ TARGETLIBS=\
$(SDK_LIB_PATH)\setupapi.lib \
$(SDK_LIB_PATH)\user32.lib \
$(SDK_LIB_PATH)\ws2_32.lib \
$(TARGETPATH)\$(_BUILDARCH)\divert.lib
$(TARGETPATH)\$(CPU)\divert.lib
UMTYPE=console
UMENTRY=main
USE_MSVCRT=1
+1 -1
View File
@@ -83,7 +83,7 @@ static void PacketIpv6Icmpv6Init(PICMPV6PACKET packet);
/*
* Entry.
*/
int main(int argc, char **argv)
int __cdecl main(int argc, char **argv)
{
HANDLE handle, console;
size_t slen, flen;
+7 -1
View File
@@ -14,6 +14,12 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
!IF "$(_BUILDARCH)" == "x86"
CPU=i386
!ELSE
CPU=$(_BUILDARCH)
!ENDIF
TARGETNAME=netfilter
TARGETTYPE=PROGRAM
TARGETPATH=..\..\install
@@ -21,7 +27,7 @@ TARGETLIBS=\
$(SDK_LIB_PATH)\setupapi.lib \
$(SDK_LIB_PATH)\user32.lib \
$(SDK_LIB_PATH)\ws2_32.lib \
$(TARGETPATH)\$(_BUILDARCH)\divert.lib
$(TARGETPATH)\$(CPU)\divert.lib
UMTYPE=console
UMENTRY=main
USE_MSVCRT=1
+7 -1
View File
@@ -14,6 +14,12 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
!IF "$(_BUILDARCH)" == "x86"
CPU=i386
!ELSE
CPU=$(_BUILDARCH)
!ENDIF
TARGETNAME=webfilter
TARGETTYPE=PROGRAM
TARGETPATH=..\..\install
@@ -21,7 +27,7 @@ TARGETLIBS=\
$(SDK_LIB_PATH)\setupapi.lib \
$(SDK_LIB_PATH)\user32.lib \
$(SDK_LIB_PATH)\ws2_32.lib \
$(TARGETPATH)\$(_BUILDARCH)\divert.lib
$(TARGETPATH)\$(CPU)\divert.lib
UMTYPE=console
UMENTRY=main
USE_MSVCRT=1
+3 -3
View File
@@ -88,7 +88,7 @@ const char block_data[] =
* Prototypes
*/
static void PacketInit(PPACKET packet);
static int UrlCompare(const void *a, const void *b);
static int __cdecl UrlCompare(const void *a, const void *b);
static int UrlMatch(PURL urla, PURL urlb);
static PBLACKLIST BlackListInit(void);
static void BlackListInsert(PBLACKLIST blacklist, PURL url);
@@ -101,7 +101,7 @@ static BOOL BlackListPayloadMatch(PBLACKLIST blacklist, char *data,
/*
* Entry.
*/
int main(int argc, char **argv)
int __cdecl main(int argc, char **argv)
{
HANDLE handle;
DIVERT_ADDRESS addr;
@@ -536,7 +536,7 @@ static BOOL BlackListPayloadMatch(PBLACKLIST blacklist, char *data, UINT16 len)
/*
* URL comparison.
*/
static int UrlCompare(const void *a, const void *b)
static int __cdecl UrlCompare(const void *a, const void *b)
{
PURL urla = *(PURL *)a;
PURL urlb = *(PURL *)b;