Generalizing ns-3 parts from second example