linux implementation based on nsstools