Posts

If you have a latin keyboard without numpad or any without slash key, maybe you couldn't use the shortcut enabled in Pycharm to comment multiple lines (Ctrl+Slash).
To change this shortcut, you must create a default keymap copy to edit it, just clicking on Copy button.
Go to File/Settings... and write keymap

#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from ryu.cmd import manager
def main():
sys.argv.append('--ofp-tcp-listen-port')
sys.argv.append('6633')
sys.argv.append('simple_switch_13')
sys.argv.append('--verbose')
sys.argv.append('--enable-debugger')
manager.main()
if __name__ == '__main__':
main()
Where simple_switch_13 is your ryu.app.name. Run with Shift+F9 in Pycharm.
If you choose any line in your Ryu app to debug, the console will show you the data about this variable like the following screenshot:

If you want to load topologies in your network emulation with mininet, the best option is use grahpml format. I compared a lot extesions available from Gephi and Cytoscape (software for work with topologies) and graphml is one of the extensions that gives more information about the topology.
You can export your topologies and save information like label, geolocalization, delay, bw, loss, etc.

If you want real topologies, you can get them from Topology Zoo website.
To import these topologies to mininet, you can use Auto-Mininet (for mininet 2.0.0):

This last command will call to the following sentence to run gephi./bin/sh -c /home/dragonx/Downloads/gephi/modules/application/target/gephi/bin/gephi --userdir /home/dragonx/Downloads/gephi/modules/application/target/userdir -J-Dnetbeans.logger.console=true -J-ea --branding gephi --jdkhome /usr/lib/jvm/java-8-openjdk-amd64

You can use it to create a .desktop file in your desktop to run it.[Desktop Entry]Type=ApplicationIcon=/home/dragonx/Pictures/icons/gephi.pngName=GephiComment="Start Gephi"Exec= /bin/sh -c /home/dragonx/gephi/modules/application/target/gephi/bin/gephi --userdir /home/dragonx/gephi/modules/application/target/userdir -J-Dnetbeans.logger.console=true -J-…

To follow PEP-8 standar, for identation (tabs) it's recommended 4 spaces, not 8 as vim uses by default.
To change this value, just add these lines to your vimrc file (usually located in /etc/vim/vimrc).

filetype plugin indent on" show existing tab with 4 spaces widthset tabstop=4" when indenting with '>', use 4 spaces widthset shiftwidth=4" On pressing tab, insert 4 spacesset expandtab
if for some reason you need disable any command, just put an exclamation sign at the end of the command. For example:

To enable number lines, use: set numberTo disable it, use: set number!

Compile programs takes a long time.
Do you have an SSD and it takes more time than with your old HDD? A good solution is create a RAM disk and compile on them.
First, you need to create a disk on your RAM (I chose 1Gb size)

wget https://www.wireshark.org/download/automated/src/wireshark-2.3.0-947-g5a12a5e.tar.xztar xvf wireshark-2.3.0-947-g5a12a5e.tar.xzcd wireshark-2.3.0-947-g5a12a5e./autogen.sh./autogen.sh: 1: ./autogen.sh: libtool: not foundYou must have libtool 2.2.2 or later installed to compile Wireshark.Download the appropriate package for your distribution/OS,or get the source tarball at ftp://ftp.gnu.org/pub/gnu/libtool/

Libtool usually already exists in the system, but with a different name. To solve it, just create a symbolic link with the name that autogen.sh expected: sudo ln -s /usr/bin/libtoolize /usr/bin/libtool
Now, continue: ./autogen.sh./configure --with-luachecking for the location of lua.h... not foundconfigure: error: Lua support was requested, but is not available
You need to install liblua5.2-dev, because liblua5.3-dev is not recognized by wireshark by default. Wireshark for windows and OSX are based on liblua5.2.

If you create a new project on CLion, it will be a C++ project.
If you want a C project, for the moment (2 years ago that users are asking the same to JetBrains here) you will need to edit CMakeLists.txt file: