Inside packet sampling techniques: exploring modularity to enhance network measurements