Symulacja NAT na przedmiot Symulacje Komputerowe
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
548 B

  1. /*
  2. * Main.cpp
  3. *
  4. * Created on: 07-01-2017
  5. * Author: Piotr Dergun
  6. */
  7. #include "common.h"
  8. #include "Node.h"
  9. int main(int argc, char *argv[])
  10. {
  11. cout << "Obiekt PC1" << endl;
  12. Node pc1("PC1", "10.0.0.2", "255.0.0.0");
  13. cout << "Obiekt PC2" << endl;
  14. Node pc2("PC2", "10.0.0.3", "255.0.0.0");
  15. cout << "Lacze PC1 z PC2" << endl;
  16. cout << pc1.connectNode(&pc2) << endl;
  17. cout << "Lacze PC1 z PC2 (ponownie)" << endl;
  18. cout << pc1.connectNode(&pc2) << endl;
  19. cout << "Tworze pakiet i adresuje go do PC2" << endl;
  20. Packet p;
  21. return 0;
  22. }