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.

40 lines
652 B

  1. /*
  2. * Packet.h
  3. *
  4. * Created on: 10-01-2017
  5. * Author: Piotr Dergun
  6. */
  7. #ifndef PACKET_H_
  8. #define PACKET_H_
  9. #include "common.h"
  10. class Packet
  11. {
  12. string srcIp;
  13. string dstIp;
  14. int srcPort;
  15. int dstPort;
  16. string msg;
  17. public:
  18. Packet() : srcIp("0.0.0.0"), dstIp("0.0.0.0"), srcPort(0), dstPort(0), msg("") {}
  19. Packet(string msg);
  20. virtual ~Packet();
  21. // settery
  22. void setSrcIp(string srcIp);
  23. void setDstIp(string dstIp);
  24. void setSrcPort(int srcPort);
  25. void setDstPort(int dstPort);
  26. void setMsg(string msg);
  27. // gettery
  28. string getSrcIp();
  29. string getDstIp();
  30. int getSrcPort();
  31. int getDstPort();
  32. string getMsg();
  33. };
  34. #endif /* PACKET_H_ */