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
|
||||
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")
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user