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.

28 lines
350 B

  1. /*
  2. * NATItem.cpp
  3. *
  4. * Created on: 10-01-2017
  5. * Author: Piotr Dergun
  6. */
  7. #include "NATRouter.h"
  8. NATRouter::NATRouter()
  9. {
  10. try
  11. {
  12. natTable = new NATItem[65536];
  13. }
  14. catch(bad_alloc &ba)
  15. {
  16. cerr << "Nie mozna zaalokowac pamieci dla tablicy NAT!" << endl;
  17. exit(1);
  18. }
  19. }
  20. NATRouter::~NATRouter()
  21. {
  22. if (natTable)
  23. delete [] natTable;
  24. }