Added Wireshark extcap command line parameter interface to mstpcap utility.

Tested with Wireshark on Windows (mostly working).
To use extcap, run Wireshark and go to the About-dialog.  Find a tab located there named "Folders". Locate the extcap search path. Copy the mstpcap.exe to that folder, which may not exist.
Restart Wireshark, and look for "BACnet MS/TP on COMx" interfaces.
Configure the interface to change baud rate.
Capture directly from the interface.
This commit is contained in:
skarg
2015-07-14 20:31:32 +00:00
parent edcf8404d7
commit b4ad2c2729
5 changed files with 216 additions and 78 deletions
+8
View File
@@ -624,6 +624,14 @@ void RS485_Initialize(
printf("=success!\n");
}
void RS485_Print_Ports(void)
{
/* note: format for Wireshark ExtCap */
//printf("interface {value=/dev/ttyUSB%u}"
// "{display=MS/TP Capture on /dev/ttyUSB%u}\n", i, i);
/* FIXME: add code to print ports */
}
#ifdef TEST_RS485
#include <string.h>
int main(
+2
View File
@@ -67,6 +67,8 @@ extern "C" {
void RS485_Cleanup(
void);
void RS485_Print_Ports(
void);
#ifdef __cplusplus
}
+20
View File
@@ -489,6 +489,26 @@ void RS485_Check_UART_Data(
}
}
/*************************************************************************
* Description: print available COM ports
* Returns: none
* Notes: none
**************************************************************************/
void RS485_Print_Ports(
void)
{
unsigned i = 0;
/* try to open all 255 COM ports */
for (i = 1; i < 256; i++) {
if (RS485_Interface_Valid(i)) {
/* note: format for Wireshark ExtCap */
printf("interface {value=COM%u}"
"{display=BACnet MS/TP on COM%u}\n", i, i);
}
}
}
#ifdef TEST_RS485
#include "mstpdef.h"
+2
View File
@@ -70,6 +70,8 @@ extern "C" {
bool RS485_Interface_Valid(
unsigned port_number);
void RS485_Print_Ports(
void);
#ifdef __cplusplus