mpExperience: added snaplenPcap param to specify snaplen to tcpdump
Avoid storing huge pcap files with lot of useless payloads
This commit is contained in:
parent
a7af377776
commit
b5ae4673a9
@ -178,11 +178,12 @@ class MpExperience:
|
|||||||
#todo : replace filename by cst
|
#todo : replace filename by cst
|
||||||
cpcap = self.xpParam.getParam(MpParamXp.CLIENTPCAP)
|
cpcap = self.xpParam.getParam(MpParamXp.CLIENTPCAP)
|
||||||
spcap = self.xpParam.getParam(MpParamXp.SERVERPCAP)
|
spcap = self.xpParam.getParam(MpParamXp.SERVERPCAP)
|
||||||
|
snaplenpcap = self.xpParam.getParam(MpParamXp.SNAPLENPCAP)
|
||||||
if cpcap == "yes" :
|
if cpcap == "yes" :
|
||||||
self.mpTopo.commandTo(self.mpConfig.client,
|
self.mpTopo.commandTo(self.mpConfig.client,
|
||||||
"tcpdump -i any -w client.pcap &")
|
"tcpdump -i any -s " + snaplenpcap + " -w client.pcap &")
|
||||||
if spcap == "yes" :
|
if spcap == "yes" :
|
||||||
self.mpTopo.commandTo(self.mpConfig.server,
|
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":
|
if spcap == "yes" or cpcap == "yes":
|
||||||
self.mpTopo.commandTo(self.mpConfig.client,"sleep 5")
|
self.mpTopo.commandTo(self.mpConfig.client,"sleep 5")
|
||||||
|
@ -15,6 +15,7 @@ class MpParamXp(MpParam):
|
|||||||
USERPMSARGS = "upms_args"
|
USERPMSARGS = "upms_args"
|
||||||
CLIENTPCAP = "clientPcap"
|
CLIENTPCAP = "clientPcap"
|
||||||
SERVERPCAP = "serverPcap"
|
SERVERPCAP = "serverPcap"
|
||||||
|
SNAPLENPCAP = "snaplenPcap"
|
||||||
XPTYPE = "xpType"
|
XPTYPE = "xpType"
|
||||||
PINGCOUNT = "pingCount"
|
PINGCOUNT = "pingCount"
|
||||||
DDIBS = "ddIBS"
|
DDIBS = "ddIBS"
|
||||||
@ -68,6 +69,7 @@ class MpParamXp(MpParam):
|
|||||||
|
|
||||||
defaultValue[CLIENTPCAP] = "no"
|
defaultValue[CLIENTPCAP] = "no"
|
||||||
defaultValue[SERVERPCAP] = "no"
|
defaultValue[SERVERPCAP] = "no"
|
||||||
|
defaultValue[SNAPLENPCAP] = "65535" # Default snapping value of tcpdump
|
||||||
defaultValue[XPTYPE] = "none"
|
defaultValue[XPTYPE] = "none"
|
||||||
defaultValue[PINGCOUNT] = "5"
|
defaultValue[PINGCOUNT] = "5"
|
||||||
defaultValue[DDIBS] = "1k"
|
defaultValue[DDIBS] = "1k"
|
||||||
|
Loading…
Reference in New Issue
Block a user