Fix build of pcap import test code

This commit is contained in:
Srivats P 2016-06-26 17:26:06 +05:30
parent e3b75d5ca8
commit c5487067e5

View File

@ -20,6 +20,26 @@ QString kDiffPathDefaultValue;
QString kAwkPathDefaultValue; QString kAwkPathDefaultValue;
#endif #endif
/*
* Dummy Stuff for successful linking
*/
char *version = "";
char *revision = "";
quint64 getDeviceMacAddress(
int /*portId*/,
int /*streamId*/,
int /*frameIndex*/)
{
return 0;
}
quint64 getNeighborMacAddress(
int /*portId*/,
int /*streamId*/,
int /*frameIndex*/)
{
return 0;
}
int usage(int /*argc*/, char* argv[]) int usage(int /*argc*/, char* argv[])
{ {
printf("usage:\n"); printf("usage:\n");
@ -29,6 +49,7 @@ int usage(int /*argc*/, char* argv[])
return 255; return 255;
} }
/* End of dummy stuff */
int testImportPcap(int argc, char* argv[]) int testImportPcap(int argc, char* argv[])
{ {
@ -45,7 +66,7 @@ int testImportPcap(int argc, char* argv[])
OstProto::StreamConfigList streams; OstProto::StreamConfigList streams;
QString inFile(argv[2]); QString inFile(argv[2]);
isOk = pcapFileFormat.openStreams(inFile, streams, error); isOk = pcapFileFormat.open(inFile, streams, error);
if (!error.isEmpty()) if (!error.isEmpty())
{ {
printf("%s: %s\n", printf("%s: %s\n",