/*
|
|
* Packet.h
|
|
*
|
|
* Created on: 10-01-2017
|
|
* Author: Piotr Dergun
|
|
*/
|
|
|
|
#ifndef PACKET_H_
|
|
#define PACKET_H_
|
|
|
|
#include "common.h"
|
|
|
|
class Packet
|
|
{
|
|
string srcIp;
|
|
string dstIp;
|
|
int srcPort;
|
|
int dstPort;
|
|
string msg;
|
|
public:
|
|
Packet() : srcIp("0.0.0.0"), dstIp("0.0.0.0"), srcPort(0), dstPort(0), msg("") {}
|
|
Packet(string msg);
|
|
|
|
// settery
|
|
void setSrcIp(string srcIp);
|
|
void setDstIp(string dstIp);
|
|
void setSrcPort(int srcPort);
|
|
void setDstPort(int dstPort);
|
|
void setMsg(string msg);
|
|
|
|
// gettery
|
|
string getSrcIp();
|
|
string getDstIp();
|
|
int getSrcPort();
|
|
int getDstPort();
|
|
string getMsg();
|
|
};
|
|
|
|
#endif /* PACKET_H_ */
|