Code Monkey home page Code Monkey logo

mingw-w64-ksocket's Introduction

Mingw64 Kernel Sockets

Requires mingw-w64-dpp and Windows 10. Windows 11 may or may not work, not tested yet.

Did you ever ask yourself the question: how-the-hell can I open a socket in kernel mode with a Mingw-w64 compiled driver? Well, this is the solution. mingw-w64-ksocket simplifies the use of stream/datagram client/server sockets. The API is similiar to the BSD socket API. Greetings to KSOCKET for this sweet approach.

Compatible with C and C++ drivers.

HowTo

Build it:

make DPP_ROOT="[path-to-mingw-w64-dpp-template-dir]" all

To install & (self-)sign the driver:

make DPP_ROOT="[path-to-mingw-w64-dpp-template-dir]" DESTDIR="[path-to-install-dir]" install

The directory [path-to-install-dir] should now contain three new files:

  • driver.bat / driver-protobuf-c.bat / driver-protobuf-c-tcp.bat: setup the driver service, start it, stop it when it's done and delete it
  • driver.sys: example driver that uses kernel sockets (used together with userspace_client.exe)
  • userspace_client.exe: example userspace application which communicates with the driver via TCP
  • driver-protobuf-c.sys: example driver that make use of protobuf-c (local, no TCP/IP)
  • driver-protobuf-c-tcp.sys: example driver that make use of protobuf-c via TCP/IP (used together with userspace_client_protobuf.exe)
  • userspace_client_protobuf.exe: example userspace application which leverages protocol buffers to communicate with the driver via TCP

Start *.bat as Administrator.

If everything works fine, there should be a text displayed in userspace_client.exe / userspace_client_protobuf.exe console window, received from the driver.

For more debug output, it is recommended to use a debugger or log viewer like dbgview.

mingw-w64-ksocket's People

Contributors

utoni avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.