Julia - not able to capture looped back UDP packets in Wireshark

Viewed 60

I have a UDP sender program here:

# UDPSender.jl
using Sockets
sock = UDPSocket()
bind(sock,IPv4(200,120,1,1),1025)

data = [0x00, 0x20, 0x00, 0x10, 0x00, 0x01, 0x00, 0x3f, 0x00, 0x08, 0x00, 0x00, 0x0b, 0xb8, 0x64, 0x00]

send(sock,ip"200.120.1.1", 11028,data)

and the UDP listener here:

# UDPListener.jl
using Sockets
s = Sockets.UDPSocket()
Sockets.bind(s, ip"200.120.1.1", 11028)
while true
    hostport, packet = Sockets.recvfrom(s)
      println(packet)
end

When both files are run in seperate Julia command lines, The statement println(packet) in UDPListener.jl is able to print data in the command line. But these packets are not captured by Wireshark.

Why Wireshark is not able to display the packets?

OS: Windows 10 64 bit. LAN is looped back

NB : asked the same qn to julia discourse site, not yet approved.

1 Answers

When I tried to change the destination ip address to 255.255.255.255 [broadcasting?]

send(sock,ip"255.255.255.255", 11028,data)

permission denied message came.

Then I changed ip address to 200.120.1.255 [multicasting?]

send(sock,ip"200.120.1.255", 11028,data)

then Wireshark is able to capture the packets.

Related