Enrico Rossi

c++ create a catalog of static functions

Create a catalog of static functions so any class can register its own functions into the catalog and later all the same functions in the catalog can be called. ex. Register all the suspend() and resume() functions for all the classes created. A working example (available on github). /* Bind functions in C++, a working example. DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 Copyright (C) 2004 Sam Hocevar <sam@hocevar.


c++ template derivate notes

A working example. /* Derivate Templates in C++, a working example. DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0.


OpenVAS scanner on Debian Stretch

OpenVAS scanner stand-alone configuration for Debian 9 Stretch. Working example I use for deploy a distributed series of scanners which will be managed by a remote openvas-manager. Install the scanner software, it will also install redis as a dependency. apt install openvas-scanner You need to update the NVT database, which by default will use the rsync protocol. openvas-nvt-sync Note: NVT updates can also be performed by curl or wget using an http proxy.


Systemd network vlan interface up

How to configure systemd to bring up a virtual network interface from a vlan trunk. Prerequisite Debian 9 (aka Stretch) or probably most of the systemd installations. Knowledge of how to manage network setup with systemd. No other managers for the network, like network-manager, ifup/down etc. Trunked connection to an ethernet card. Here I suppose to have vlan id 10 and 20 trunked to the eno1 network card. Scope Extract from the network interface eno1 the two vlans (10, 20) and configure the 1st vlan (10) with a standard ipv4 address which bringing up the second vlan for other use, for example libvirt, kvm or other stuff.


Intel sr-iov on Debian Stretch

Wrap-up about the sr-iov, some passage may be forgotten. Expose the SR-IOV virtual network interfaces 1 Search for the pci interfaces (here the server has a 4 port intel network card). root@srv:~# find /sys -name sriov_numvfs /sys/devices/pci0000:00/0000:00:1c.0/0000:06:00.2/sriov_numvfs /sys/devices/pci0000:00/0000:00:1c.0/0000:06:00.0/sriov_numvfs /sys/devices/pci0000:00/0000:00:1c.0/0000:06:00.3/sriov_numvfs /sys/devices/pci0000:00/0000:00:1c.0/0000:06:00.1/sriov_numvfs find maximum numbers of VFs root@srv:~# cat /sys/devices/pci0000:00/0000:00:1c.0/0000:06:00.0/sriov_totalvfs 7 expose 7 virtual interface on the 1st ethernet card and check the result. root@srv:~# echo 7 > /sys/devices/pci0000:00/0000:00:1c.0/0000:06:00.0/sriov_numvfs root@srv:~# ip link show [.

Previous Page 3 of 16 Next Page