LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronize Clocks (PC and sniffer)

I am currently using the Packet Sniffer example to analyze traffic data  from a traffic generator connected to my PC. My main objective is to measure the delay of the transmitted - received packets. For this I am using a sniffer to capture data, so I use the example in LV (with some modifications do get delay) to display and analyze data in my project.

 

The point that is missing: If I use Wireshark I can install one plugin provided by the sniffer manufacturer that changes the time stamp in Wireshark with the sniffer time stamp. Is the only way that I can get the time stamp of transmitted and received data in the right point.

 

In LV I don't have this plugin, so I suppose that I need to synchronize the clock of my computer with the sniffer? If is that the point how I can do that in LV (I need automation for that, so it can be used in other computers later...).

 

I will be glad with any advice,

 

Thais

0 Kudos
Message 1 of 6
(3,081 Views)

I have installed NI-sync library and I am taking a look to the examples, but still I am not sure if that can help me or how to use it.

 

I am not new with Labview but I still have some doubts about this traffic test.

 

Find attached the structure of my connections:

 

traffic.png

 

 

I need to get the timestamp as shown (from the sniffer), and not on PC 1 as standard.

0 Kudos
Message 2 of 6
(3,055 Views)

Hello Thais,

 

To help you to find a solution for your problem I need to know how this sniffer communicates with other software, so if you can provide us with this documentation we can help you compete this task. We need to know how we can collect this information about the sniffer's timestamp using LabVIEW, and for this we need to know how your sniffer passes this data to other software.

 

We wait your response.

Thiago Matos
Engenharia de Aplicações
National Instruments Brasil
0 Kudos
Message 3 of 6
(2,972 Views)

Hi tmatos thank you for support 🙂

The task was already finished some time ago, still with some packet losses but this is other problem I guess.

The communication is based on the Packet Sniffer example as I mentioned before... Basically it uses the same principle as Wireshark software (it means that it is necessary to install WinPcap to be possible the capture of data, and my sniffer is 

there to read the time-stamp via WinPcap.

 

I was in doubt if it was necessary to synchronize clocks, but that was really not necessary because what matters for me it is the difference of time-stamps (the delay!).

 

So... I know it is very complicated but in the end I created a VI that reads the delay with less than 30% of packet loss what is acceptable in my case.

You saw the solution on my next topic.

I made some changes after that and now is fine to use.

 

but thank you anyway!

 

regards,

Thais

0 Kudos
Message 4 of 6
(2,955 Views)

btw

 

Nós poderíamos falar em portugês... mas não seria muito educado hehehe

0 Kudos
Message 5 of 6
(2,954 Views)

Olá Thais,

 

Considerando a sua aplicação, provavelmente seria necessário entender a comunicação do seu sniffer com outros softwares, acredito que seria algo via dll, que nós também conseguiríamos utilizar junto com o LabVIEW. Mas fico feliz que tenha achado a solução.

 

Caso precise de ajuda basta nos informar.

 

Atenciosamente,

Thiago Matos
Engenharia de Aplicações
National Instruments Brasil
0 Kudos
Message 6 of 6
(2,945 Views)