Click here to Skip to main content
15,893,588 members
Everything / Kernel

Kernel

kernel

Great Reads

by Maxim Kartavenkov
This is a guide on how to configure your application, service or driver to handle appearing the new devices or device removal avoiding reboot request.
by Alexander Eremeev
The Windows kernel-hacking library and development framework written on C++17
by Apriorit Inc, gamapat
Take a look at how to intercept HTTP traffic in order to inject custom code into Windows HTML markup
by Roger Doss
The OX kernel features its own custom boot loader designed to boot a 32 bit protected mode kernel.

Latest Articles

by Maxim Kartavenkov
This is a guide on how to configure your application, service or driver to handle appearing the new devices or device removal avoiding reboot request.
by Rahul Dev Tripathi
The fully working sample code explains everything necessary to create a Minifilter driver to block devices connected through an interface.
by Greg Utas
Analogous functions, subtle differences, multiple compilers...
by Apriorit Inc, Sergii Kusii
And its modules during runtime

All Articles

Sort by Updated

Kernel 

25 May 2012 by aboutjayesh
hi,While i use DbgPrint in kernel driver program DebugView does not print or log nothing...plz help me to solve this..thank u...
29 May 2012 by aboutjayesh
Hi,Can you Suggest a software like Debug View to capture kernel messages using DbgPrint()....Thank you
12 Jun 2012 by aboutjayesh
hi,i use RtlCopyMemory( userBuffer, Devicebuffer, Length);to set the user buffer from kernel and use the buffer char inBuffer[100];in console to retrieve that content.While the length of data from the kernel greater than the size 100,then the system hang up.Plz help me to find the...
10 Apr 2016 by Albert Holguin
In order for you to test against a specific kernel version, you need to have that kernel version installed and running. You can do this within a virtual machine. Here are a few options from Ubuntu.[^]
1 Nov 2018 by Alexander Eremeev
The Windows kernel-hacking library and development framework written on C++17
21 Nov 2013 by ali64iust
hello dearsour team want to implement an application control.i have some question.we have some white list that if an application was in thatlist can run in a system and other application should not run anywhere.our goal is to prevent application to create process. for example...
30 Oct 2019 by Alireza Sadeghpour
i was reading a page that told: "My microbenchmark begins by allocating one memory page, then creates two virtual address aliases pointing to it" First Question. i want to know how can i create two virtual address that pointing to same memory page in linux with c? again on that page he told...
11 Oct 2021 by alsecc
Hi, I'm developing a kernel driver for Windows and recently MS deprecated the procedure to sign drivers, see...
8 Dec 2012 by AminMhmdi
Based on MSDN article All code that runs in kernel mode shares a single virtual address space. This means that a kernel-mode driver is not isolated from other drivers and the operating system itself. If a kernel-mode driver accidentally writes to the wrong virtual address, data that belongs to...
14 Jun 2013 by Amit KD
Hello,I'm debugging KmdfSmall driver installed on target VM by using VS2012 which is on Host.But, 'Debugger Immediate Window' in VS 2012 on host not printing any msg. Here I'm using KdPrintEx((DPFLTR_IHVDRIVER_ID, DPFLTR_INFO_LEVEL, "\n KmdfSmallEvtDeviceAdd has been called\n")) as it is...
14 Jun 2013 by Amit KD
Hello,Host Win7_x64, target VM Win7_x64 both on same physical machine.Driver debugging using VS 2012 (Visual Studio Integrated Windows Debugger.)Able to provisioning between Host and target using VS 2012 and WDK 8.0.KmdfSmall driver given on msdn is properly able to install on...
15 Jun 2013 by Amit KD
Hey Solved!,changed the value of Component Filter Mask on target machine where driver has been installed to debug.HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Debug Print Filter. Under this key, created a value with the name "IHVDRIVER" and Set the value of this...
15 Jun 2013 by Amit KD
Hey Solved! changed the value of Component Filter Mask on target machine where driver has been installed to debug.HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Debug Print Filter. Under this key, created a value with the name "IHVDRIVER" and Set the value of this...
1 Sep 2015 by Android on Intel
In this article, we can see how to debug and check the exception error in Android Linux Kernel in Intel ® Architecture-based system with Intel ® JTAG Debugger which is a part of tool Intel System Studio ® Ultimate Edition
7 Nov 2018 by Apriorit Inc, gamapat
Take a look at how to intercept HTTP traffic in order to inject custom code into Windows HTML markup
9 Jan 2019 by Apriorit Inc
Two theoretical ways to protect a Linux kernel module from hooks.
17 Jan 2019 by Apriorit Inc
In this article, we focus on the main ftrace pros and cons and describe some unexpected surprises we’ve faced when hooking Linux kernel functions with this utility.
22 Jan 2019 by Apriorit Inc, Sergey Stepanchuk
Learn how you can use ftrace to hook critical function calls in the Linux kernel
1 Mar 2019 by Apriorit Inc, Sergii Kusii
18 Jul 2013 by ayush Joshi
i had installed a kernel on Beagle-board to update image of kernel on to it.i have used commandsudo apt-get install linux-image-3.2.0.49-omapit installed the kernel on Beagle-board it also generate initrd image for this version but it didn't generate a uImage and zImage. actually i want to...
14 Jul 2013 by Balaji N BI
need brief Information about the kernelhello sir I am Balaji.N from india. i am Bachelor of computer science and engineering graduates. my passion is to become a developer in field. I am more interested in Operating system my lifetime ambition is to create my own Operating system. I could...
10 May 2013 by BaldevS
Hello to ALL,I am writing a proc file through which i want to write something into another proc file.Is it possible to do this. If yes, then how and if no then why.NOTE : Both the proc files having read and write(read and write methods) permissions.Thanks in Advance
4 Apr 2016 by bling
It looks like you are mixing access flags with other types of flags. Also, you omit FILE_SHARE_WRITE in the second ZwCreateFile.Try this:ntstatus =...
10 Mar 2012 by C++Kernel
Hello, I want to know the TDI driver, how to control the network of a single process to upload and download, I never developed overdrive, I always think that driver development is useless, I do not want to lose this salary, I hope you help me,If you know the the TDI traffic monitoring open...
29 Apr 2012 by C++Kernel
hello,everyone...
24 Nov 2020 by Cabronista
Hello everybody, I would like to program a driver that creates a fbdev device but internally use the drm driver (something like a fbdev to drm bridge). The target is to use mplayer -vo fbdev, but present custom fbdev that use the drm functions,...
10 Apr 2016 by columbos14927
Hello,I have a PC with Ubuntu 14.04.I'm writing some device drivers for Linux Kernel 2.6.x, i would like to test the modules using the insmod and rmmod utilities on my PC.Is there some way to do it although the runing kernel on my PC is not 2.6.x?Thanks.
8 Dec 2012 by CPallini
Because Windows kernel (like, for instance, Linux one) is monolithic. There are alternatives, however, like Minix (see Microkernel at Wikipedia[^], "Does Windows have a Microkernel or Monolithic kernel?"[^]).The latter page gives you also a reason: performance.
29 Jan 2015 by CPallini
What about looking up the Kernel Wikipedia page[^] ?
2 Mar 2016 by CPallini
If you inntend to master C++ and Java then don't read Linux kernel sources. You know, Linux kernel is written using just bare C (as far as I know, even the standard C library is not allowed in kernel code). Moreover the Linux kernel code has to be very efficient, not elegant. Finally you have to...
27 Jan 2019 by CPallini
It depends on very nature of the HashBuckets variable. What is it, exactly? You didn't provide any insight about. I suggest you to NOT obfuscate C code behind macros. Wtite clean C code instead of trying to mimic the C++ counterpart.
30 Jan 2019 by CPallini
It should be typedef struct _OBJECT_DIRECTORY_ENTRY { struct _OBJECT_DIRECTORY_ENTRY* ChainLink; } OBJECT_DIRECTORY_ENTRY;
26 Aug 2014 by Curtdawg99
Hello, I have wanted to do this project for a while and that is to make a boot able kernel from ground up and i mean from literally nothing. I was thinking that maybe 16 bit x86 real mode assembly language would be a good choice for this. This would be for educational purposes and it...
30 May 2022 by Dale Seeley
I have a driver written in pure C and a application in .NET framework which is capable of sending and receiving IOCTL commands. Currently the driver is able to send Process Creation, Image Load Notify and Thread Notify callbacks to the .NET...
19 Jul 2022 by Dale Seeley
Hello: I am trying to set up an event to notify my user mode application from my mini filter driver whenever a callback is used. Currently I have successfully set up a shared event that both can connect to like so: VB.NET ...
27 Oct 2013 by Dave Kreskowiak
The time that you want this app to run is referred to as a Windows Service application. The problem is what you describe cannot be done in a Windows Service app.On Windows Vista and above, you would be writing a custom Credential Provider.You're going to have a REALLY hard time with...
18 Nov 2015 by Dave Kreskowiak
This little project is nowhere near as easy as you think it is.First, you're going to be limited to ASM code. You're not going to have ANY libraries at all, so you have to write everything from scratch, including any encryption algorithms and key storage and management. If you think you need...
24 Dec 2015 by Dave Kreskowiak
OK, so when do you start writing it? If you came here looking for someone to just hand over completed code to you you've come to the wrong site.
5 Dec 2018 by Dave Kreskowiak
CAST a string? You can't. To be a valid pointer that would be one nasty looking string. You have to PARSE the string into a value. But then, one has to wonder why you're passing handle values around in/to/from the kernel as strings instead of the actual values.
19 Sep 2022 by Dave Kreskowiak
It sounds like what you're looking for is "Detours"[^]
23 Nov 2012 by Dharmateja Challa
I did it differently, but you can give it a try,KbFilter_IsrHook( PDEVICE_OBJECT DeviceObject, PKEYBOARD_INPUT_DATA CurrentInput, POUTPUT_PACKET CurrentOutput, UCHAR StatusByte, PUCHAR DataByte, ...
11 Jul 2012 by dvsha
Open DebugView Editor, goto "Capture" tab and enable "Capture Kernel" and "Enable Verbose Kernel Output". Then you will be able to see kernel level output.---Dhirendra
16 Sep 2015 by Ed Nutting
In this article I discuss the innovative approach, taken by FlingOS, to teaching OS and low-level development to high-level developers using C#.
7 Jul 2022 by Greg Utas
Analogous functions, subtle differences, multiple compilers...
29 Jan 2013 by gssajith87
My Application is compiled in VS2010 [c++]. Starting the application in Windows2000 Server Sp4 throws error popup saying - "Decodepointer could not be located in kernel32.dll". Google did not help. Have any one seen such problem before. All suggestions are welcome and...
29 Jan 2013 by H.Brydon
If you are building an app that needs to run on a down-rev version of windows (or an old version of Internet Explorer) you need to pay attention to the settings of _WIN32_WINNT and _WIN32_IE. These specify to the compiler what minimum OS and IE will be supported on target systems.Here is...
27 Oct 2013 by Hadi Ayash
Hi everyone,I want to develop an application that launches on the windows startup, before the user logs on, because I want to log on not using the password, but using a pattern :)Thanks in advance.
25 Sep 2014 by hassan_sayfi69
Hello to all you hackersOn windows, can I add a new system call to the SSDT, like zwOpenfile2, for special purposes. If it can or you know how it's possible, give me some help. Thank you for your help.
18 Jul 2015 by hassan_sayfi69
HiHow can I get Thread Id from its handle in NtCreateThread(&ThreadHandle) system call or NtCreateThreadEx(&ThreadHandle, ...)?I try to load thread's information by calling NtQueryInformationThread but this system call fails with ambiguous error code. Now I need a solution to get an ID of...
19 Sep 2013 by iDebD
I want to trace a specific thread from another thread.(Both are created from same parent)1) Is it possible?I wrote following code here; But from "thread_func_tracer" I got error no : 1, that is insufficient permission; i.e ptrace(PTRACE_ATTACH...) is failing with error code 1.Can any...
12 Jul 2013 by Ivan Ivanov 83
Hi All :)I'm well aware that accessing normal files in kernel space is a bad idea, but is it that bad idea to access a device file associated with some device driver?I have to communicate with a device driver through another kernel module (which could well be a user space module but I'm...
28 Sep 2017 by Ivan Ivanov 83
Hi All I'm currently working on a touchscreen keyboard project where the BBB displays images on a screen, receives the touch events form the touch panel and has to send them to the main PC as key events. So the BBB has to present it self as a HID (keyboard) device to the PC. What I have to do...
18 Mar 2014 by Ivan Shcherbakov
This article describes how to create and debug a simple device driver on a modern Linux kernel
3 Apr 2013 by jan.mach71
I'm developing network sniffer, bacically to to monitor complete network traffic - no blocking, no modification, interested in data volume, failing connections. I have it on TDI level now. For Windows 8 I need WFP. I've spent couple of days on several WFP examples. Instead of answers I'm having...
7 May 2017 by Jochen Arndt
Quote: to know all of the listening ports If you don't know the ports you can't use a function that queries information for a specific port number defined by a handle. Even if you would have a handle calling that undocumented function would give you no useful information because no information...
1 Aug 2017 by Jochen Arndt
How is PEPROCESS defined? If you have the full structure just access the member: PVOID UniqueProcessId = Process->UniqueProcessId; If you know the offset and the type, cast Process to a byte or char pointer, add the offset, cast the result as pointer to the field type, and get the value:...
22 Aug 2017 by Jochen Arndt
You are copying to bimPtr (allocated memory) but print out bim.biSize (bim is allocated but never changed). Instead of trying to convert VBA code that calls an API function to copy memory (which calls the standard C library function memcpy in the background), you should understand what the code...
28 Sep 2017 by Jochen Arndt
I have not done such so far. So this might not help. As far as I understand, /sys/class/udc/ is created / filled by the preceding script commands (does not exist before or is empty). So I would wait some time (sleep) before accessing that directory (not busy anymore). You can also do the last...
8 Nov 2022 by k5054
Quote: I am using gcc as a compiler I hope that means you're using g++, and not gcc. You've not shown your main() class, but the given code compiles cleanly to a .o file g++ -Wall -Wextra -c -o port.o port.cpp so the problem must be when...
6 Sep 2018 by KarstenK
It is not clear where you stuck, but I found some good looking example code for SignerSignEx which also demonstrates the workflow. Maybe you should start with that code, for proofing your data. PS: We are using some command line tool for signing.
5 Dec 2018 by KarstenK
You are misusing the API. Read the example code from Microsoft and the documentation. I cant find details about your struct on the fly, so search and read it carefully. My best guess is that Address is the pointer to the data (your string) and Value is some type information and the Output is...
7 Mar 2019 by KarstenK
The question is a bit unclear. Should work with memcpy to copy data. Be clear about whom the memory belongs and that the access rights are respected. It is best, when user and kernel use OWN memory and are copying the bytes into their spaces. Else you may get strange and undebuggable errors. ...
30 Mar 2015 by kommuric
Best thing is to sign the drivers with test signature, at least. Please see the following link for documentation.https://msdn.microsoft.com/en-us/library/windows/hardware/ff553480(v=vs.85).aspx[^]Alternatively, on Windows 7, while booting, press F8. It should show options to enabled...
17 Apr 2018 by Kyudos
Can someone point me at the APIs I'd have to use to list the loaded Kernel mode drivers (*.sys files)? The way that Process Explorer does for the System process. What I have tried: Googling without success. I found this Windows kernel | Microsoft Docs[^] but there are thousand of functions...
19 Jan 2012 by Lakamraju Raghuram
Here is one useful link for hiding a filehttp://msdn.microsoft.com/en-us/library/aa365535%28VS.85%29.aspx[^]And for locking it here is a useful linkhttp://msdn.microsoft.com/en-us/library/aa365202%28VS.85%29.aspx[^]
10 Apr 2012 by Lakamraju Raghuram
I think this is simialr to any question posted earlier. Check hereabout dereferencing pointer to incomplete type[^]
27 May 2012 by lilyNaz
Hello,I have written a driver and I need my driver to call a function in a user mode program(which can be done using DEVICEIOCONTROL), then my driver have to wait for the user program to respond. I need a sample code which does so.Thanks
22 Dec 2012 by lilyNaz
I am writing a driver and I need to check the signature of a PE file in it. I know how to do it in user mode and it works fine according to http://forum.sysinternals.com/topic19247.html[^] but now I need to do the same in my driver, I can not use the headers like "wintrust.h" in my driver so I...
24 Jun 2023 by Littery
I'm running Ubuntu 22.04.2 LTS and have dual boot windows 11. I'm trying to hide grub menu while booting and automatically boot ubuntu as I have seen that can be done with changing GRUB_TIMEOUT to 0 in /etc/default/grub and run sudo update-grub...
24 Jun 2013 by Lucky_Girl
Hi:Which kernel API does Linux cmd [ chattr ] call ?Thanks!
25 Jun 2013 by Lucky_Girl
The answer:int flags = 0;ioctl(fd,FS_IOC_GETFLAGS,&flags);flags |= FS_COMPR_FL;flags &= ~FS_NOCOMP_FL;ioctl(fd,FS_IOC_SETFLAGS,&flags);Thanks!
25 Jun 2013 by Lucky_Girl
The answer:int flags = 0;ioctl(fd,FS_IOC_GETFLAGS,&flags);flags |= FS_COMPR_FL;flags &= ~FS_NOCOMP_FL;ioctl(fd,FS_IOC_SETFLAGS,&flags);Thanks
4 Jan 2015 by Mandelnuss
I am trying to enumerate the NTFS USN change log. Calling DeviceIoControl with the control code FSCTL_ENUM_USN_DATA returns zero for Reason, SecurityId, SourceInfo and TimeStamp for all 428k records.Why? How do I get the full record?
15 Apr 2013 by Matthew Faithfull
The HelenOS documentation should explain how to do this. If you want another example which has entirely Windows hosted development and a includes an OS Bootloader for x86 based machines then I would take a look at the SanOS[^] project which is a fantastic small OS example.
13 Oct 2023 by Maxim Kartavenkov
This is a guide on how to configure your application, service or driver to handle appearing the new devices or device removal avoiding reboot request.
29 Apr 2012 by Mehdi Gholam
Writing a debugger, especially a kernel debugger is a very specialized undertaking which requires advanced knowledge of processors and operating systems.This is not recommended for "newbies", and resources are few.
12 Dec 2014 by Mehdi Gholam
Try using a virtual machine for this, you can save a copy of the "original state" of your VM and reuse that.Some VM managers allow for online snapshots (1 or more) and restores.
9 Feb 2015 by Member 11137231
Hello,I'm new in windows driver development.I modified parallel port driver for windows, I modified the parport file.I used for building this driver WinDDK (3790.1830), I had a good file system (parport.sys). It work in windows x32 bits and in windows 7 x32 bits.Without changing any...
12 Dec 2014 by Member 11304907
I have to develop a kernel level driver that makes user changes (new files, new software installations, etc.) store at a cache (or specified location in the disk). Upon restart of the machine, all changes to be discarded and original system to be loaded. This is similar to softwares like Deep...
24 Apr 2015 by Member 11535226
Need support for creating a log file which will record the output of fsfilter driver.In place of DbgView to see the debug messages i want this to be written in a log file.
29 Apr 2015 by Member 11535226
how to create a log file for fsfilter driver which will record the debug messages without using DbgView
7 Jul 2015 by Member 11682338
I need to do datatransfer with my older 16ch Sony Dat recorder. This is connected to the PC via parallel port IEEE 1284 EPP mode standart. How to use parport.sys to do propper handshake ... ?
17 Nov 2015 by Member 12147362
Hy guysI have a little project i need help with. i want to add an authentication to my pc that will run before the boot options and before i can choose to enter bios(authentication means either password or certain key presses). now i have done some research and someone recomended me to study...
18 Nov 2015 by Member 12147362
i found this: Bios Interrupt Service Routine (ISR). any of you guys know something about it and if it might work this way?
19 Sep 2017 by Member 13373000
I am using a COM Interface where I am receiving byte data representing a DIP (Device Independent Bitmap). I want take this byte[] and copy its data into a BITMAPINFOHEADER variable. I have a long piece of code and this is only part of it, however it is written in VBA and it works: Private...
21 Dec 2017 by Member 13589269
I am working on a testing tool for nvme-cli(written in c and can run on linux). For SSD validation purpose, we are actually looking for sending I/O commands to a particular Submission queue(IO Queue pair). We needed this because we wanted threading, but for threading to happen we need to send...
12 Sep 2018 by Member 13980942
so the problem is as the title says how could i use shmem instead of IoCreateDevice / IoCreateDriver done shmem before and i googled and i did not find anything useful they are all complicated and i cant understand them so if anyone could explain me how to use it to communicate with my...
23 Sep 2018 by Member 13980942
so i cant read an integer from my usermode idk why i will share the code cuz i found it and its public hope that someone could help me with this :D in kernel space typedef struct { DWORD64 proccessId; DWORD64 address; DWORD64 Read; } MEMDATA; UINT64 ReadMem(MEMDATA *data) { NTSTATUS...
24 Sep 2018 by Member 13980942
so my driver can read integers, DWORD64 etc but now i want to read strings i tried a lot of things and am sure this one should work but for some reason it displays some random chars this is how am reading from kernel PCHAR ReadMem_String(MEMDATA *data) { NTSTATUS ntStatus; PEPROCESS...
1 Oct 2018 by Member 14002991
I don't know if you still need this, but I found the solution to your problem. I'm just starting a project where I need to do the same. The BBB sets up the USB clients in /opt/scripts/boot/am335x_evm.sh And it seems that after this, you can no longer disable the UDC in order to install your...
5 Dec 2018 by Member 14078997
I have been attempting to write strings in Kernel Memory for some time now. I have been able to read strings, however I have no luck with writing them. I can write regular things such as a DWORD. I keep getting stuck on casting a string to a UINT_PTR. Any help is appreciated and here is my code...
27 Jan 2019 by Member 14130865
by the way am developing my kernel driver i know c++ but am new to C syntax thanks for helping in advance What I have tried: first i had my struct in my .c file but i want to initialize my vars in global space instead of giving my vars to local. so i have tried to do it this way in my...
27 Jan 2019 by Member 14130865
for (auto entry : directory_object->HashBuckets) { if (entry == NULL) continue; if (success == true) break; i tried a lot of foreach loops non of them has worked. am re - writing my kernel driver from c++ to C What I have tried: #define for_each_item(item, list) \ for(T * item...
30 Jan 2019 by Member 14130865
typedef struct _OBJECT_DIRECTORY_ENTRY { _OBJECT_DIRECTORY_ENTRY* ChainLink; } OBJECT_DIRECTORY_ENTRY, *POBJECT_DIRECTORY_ENTRY; this is the c++ struct its working fine in c++ btw am going with kernel here.and am trying to make this struct works with my C kernel driver struct its the same but i...
7 Mar 2019 by Member 14130865
so straight to the point i have created a kernel driver that maps shared section to user mode. my problem is am trying to read/write memory with the driver but i have 0 experience with ReadFile , WriteFile . i have a handle that was created with CreateFileA. now i my old project driver i used...
8 Mar 2019 by Member 14130865
hMapFile = OpenFileMappingA(FILE_MAP_WRITE, FALSE, "Global\\SharedMemoryTest"); if (!hMapFile || hMapFile == INVALID_HANDLE_VALUE) { printf("OpenFileMappingA(write) fail! Error: %u\n", GetLastError()); return 0; } pBuf = (char*)MapViewOfFile(hMapFile, FILE_MAP_WRITE, 0, 0, 4096); if...
17 Mar 2019 by Member 14130865
kernel mode : VOID DriverLoop() { while (TRUE) { //DbgPrintEx(0, 0, "First loop is running \n"); ReadSharedMemory(); if (!(PCHAR)SharedSection == NULL && strcmp((PCHAR)SharedSection, "Read") == 0) { DbgPrintEx(0, 0, "Read looping \n"); ...
21 Mar 2019 by Member 14130865
void sendrequests() { auto Readstring = (char*)MapViewOfFile(hMapFileW, FILE_MAP_WRITE, 0, 0, 4096); RtlCopyMemory(Readstring, "Read", 4); printf("message has been sent to kernel [Read]! \n"); UnmapViewOfFile(Readstring) } ; so basically if i do something like this it works fine but if i...
10 Mar 2019 by Member 14177389
what i am doing in my user mode app : typedef struct KM_READ_REQUEST { ULONG ProcessId; UINT_PTR Address; UINT_PTR Size; void* Output; } KM_READ_REQUEST, *PKM_READ_REQUEST; template type RPM(UINT_PTR ReadAddress) { if (hDriver == INVALID_HANDLE_VALUE) { return...
8 Nov 2022 by Member 14769677
I am writing a kernel, the base is working fine, but when i went to add I/O ports, with this header: #ifndef __PORT_H #define __PORT_H class Port { protected: //protected: Port(uint16_t _portNum); ~Port(); uint16_t portNum; }; ...