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.

39 lines
632 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. // settery
  21. void setSrcIp(string srcIp);
  22. void setDstIp(string dstIp);
  23. void setSrcPort(int srcPort);
  24. void setDstPort(int dstPort);
  25. void setMsg(string msg);
  26. // gettery
  27. string getSrcIp();
  28. string getDstIp();
  29. int getSrcPort();
  30. int getDstPort();
  31. string getMsg();
  32. };
  33. #endif /* PACKET_H_ */