summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2015-09-20 17:34:55 +0300
committerHanoh Haim <hhaim@cisco.com>2015-09-20 17:34:55 +0300
commit3fe28431157f7b2ed2ed8184ed85017c42a4cb6c (patch)
tree41fa17684842885e1664cc63ff1520157f191261 /src/common
parent588bb20e9c8f8438db4eb3e8db85111f41bd7306 (diff)
parent28fef018f75b5a54ac69ac7c919127bf47f5b61f (diff)
Merge branch 'master' of csi-sceasr-b45:/auto/proj-pcube-b/apps/PL-b/tools/repo//trex-core into wen
Diffstat (limited to 'src/common')
-rwxr-xr-xsrc/common/captureFile.cpp2
-rwxr-xr-xsrc/common/pcap.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/common/captureFile.cpp b/src/common/captureFile.cpp
index a4fe78be..00625181 100755
--- a/src/common/captureFile.cpp
+++ b/src/common/captureFile.cpp
@@ -110,7 +110,7 @@ void CCapPktRaw::CloneShalow(CCapPktRaw *obj){
}
void CCapPktRaw::Dump(FILE *fd,int verbose){
- fprintf(fd," =>pkt (%p) %llu , len %d, time [%x:%x] \n",raw,pkt_cnt,pkt_len,time_sec,time_nsec);
+ fprintf(fd," =>pkt (%p) %llu , len %d, time [%x:%x] \n",raw, (unsigned long long)pkt_cnt,pkt_len,time_sec,time_nsec);
if (verbose) {
utl_DumpBuffer(fd,raw,pkt_len,0);
}
diff --git a/src/common/pcap.cpp b/src/common/pcap.cpp
index 6dd54514..9b360a3e 100755
--- a/src/common/pcap.cpp
+++ b/src/common/pcap.cpp
@@ -156,7 +156,8 @@ bool LibPCapReader::ReadPacket(CCapPktRaw *lpPacket)
}
if (pkt_header.len > READER_MAX_PACKET_SIZE) {
/* cannot read this packet */
- assert(0);
+ printf("ERROR packet is too big, bigger than %d \n",READER_MAX_PACKET_SIZE);
+ exit(-1);
return false;
}