Skip to content

Instantly share code, notes, and snippets.

View nkapliev's full-sized avatar
🎯
Focusing

Nick Kapliev nkapliev

🎯
Focusing
View GitHub Profile
@nkapliev
nkapliev / Makefile
Last active March 19, 2020 12:10
Linux kernel 4.4+ netfilter packet capturing boilerplate.
obj-m += ip_mac_packet_logger.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
install:
insmod ip_mac_packet_logger.ko
@nkapliev
nkapliev / test_1.cpp
Last active December 7, 2017 12:50
Compilation error if field class does not have default constructor and the field was not initialized during pre-constructor initialization.
#include <iostream>
class Point {
public:
int x;
int y;
Point() {
std::cout << "A point has been initialized by default constructor" << std::endl;