Skip to content

Commit

Permalink
Refactoring and removing old code
Browse files Browse the repository at this point in the history
  • Loading branch information
vlabo committed Aug 24, 2022
1 parent e994755 commit bf9000d
Show file tree
Hide file tree
Showing 11 changed files with 43 additions and 527 deletions.
19 changes: 6 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,27 +47,20 @@ This is how packets are handled:
The Windows Portmaster Kernel Extension is currently only developed and tested for the amd64 (64-bit) architecture.

Prerequesites:

- Visual Studio >= 2017
- Driver (`.sys`)
- [WDK 7.1](https://www.microsoft.com/en-us/download/details.aspx?id=11800)
- Library (`.dll`)
- MINGW (x64)

Build driver:

:: open a _x64 Free Build Environment_ console
wddk-build.bat
Build driver and library:

:: open a Visual Studio 2022 Developer Command Prompt (usualy located in C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat)
release.bat
:: built driver lands in install\WDDK\amd64

:: shortcut to build, sign and copy the driver to install\MINGW\amd64:
:: shortcut to build, sign and copy the driver to portmaster install directory:
deploy.bat

Build library:

# open a mingw x64 console
./mingw-build.sh
# built library lands in install\MINGW\amd64

Test Signing:
In order to test the driver on your machine, you will have to test sign it (starting with Windows 10). Here is how you can do this:

Expand Down
5 changes: 3 additions & 2 deletions include/pm_debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#define PM_DEBUG_H

/****************************************************************************/
#define DEBUG_ON // Undefine if Debug Functions should not be compiled
// #define DEBUG_ON // Undefine if Debug Functions should not be compiled
/****************************************************************************/

#define DEBUG_BUFSIZE 256
Expand All @@ -26,8 +26,9 @@
#define LEVEL_ERROR 3

#ifndef LOGGER_NAME
#define LOGGER_NAME "pm_default"
#define LOGGER_NAME __FILE__
#endif

/*
* These Logger Variables should be set (REDEFINED) in the including file
*/
Expand Down
178 changes: 0 additions & 178 deletions pm_kext/col/example.c

This file was deleted.

9 changes: 8 additions & 1 deletion pm_kext/col/packet_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,17 @@
* Scope: Kernelmode
* (Userland for development)
*/

#define BUILD_ENV_DRIVER

#include <stdlib.h>
#include <limits.h>

#include "../include/packet_cache.h"
#include "pm_kernel.h"
#include "pm_common.h"
#include "packet_cache.h"
#include "pm_utils.h"
#include "pm_debug.h"

/**
* @brief Initializes the packet cache
Expand Down
Loading

0 comments on commit bf9000d

Please sign in to comment.