diff --git a/src/mpExperience.py b/src/mpExperience.py index 4687908..d1c7771 100644 --- a/src/mpExperience.py +++ b/src/mpExperience.py @@ -178,11 +178,12 @@ class MpExperience: #todo : replace filename by cst cpcap = self.xpParam.getParam(MpParamXp.CLIENTPCAP) spcap = self.xpParam.getParam(MpParamXp.SERVERPCAP) + snaplenpcap = self.xpParam.getParam(MpParamXp.SNAPLENPCAP) if cpcap == "yes" : self.mpTopo.commandTo(self.mpConfig.client, - "tcpdump -i any -w client.pcap &") + "tcpdump -i any -s " + snaplenpcap + " -w client.pcap &") if spcap == "yes" : self.mpTopo.commandTo(self.mpConfig.server, - "tcpdump -i any -w server.pcap &") + "tcpdump -i any -s " + snaplenpcap + " -w server.pcap &") if spcap == "yes" or cpcap == "yes": self.mpTopo.commandTo(self.mpConfig.client,"sleep 5") diff --git a/src/mpParamXp.py b/src/mpParamXp.py index 0876126..a20c47f 100644 --- a/src/mpParamXp.py +++ b/src/mpParamXp.py @@ -15,6 +15,7 @@ class MpParamXp(MpParam): USERPMSARGS = "upms_args" CLIENTPCAP = "clientPcap" SERVERPCAP = "serverPcap" + SNAPLENPCAP = "snaplenPcap" XPTYPE = "xpType" PINGCOUNT = "pingCount" DDIBS = "ddIBS" @@ -68,6 +69,7 @@ class MpParamXp(MpParam): defaultValue[CLIENTPCAP] = "no" defaultValue[SERVERPCAP] = "no" + defaultValue[SNAPLENPCAP] = "65535" # Default snapping value of tcpdump defaultValue[XPTYPE] = "none" defaultValue[PINGCOUNT] = "5" defaultValue[DDIBS] = "1k"