Preliminary MPI logic for UDP and TCP protocols