3

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.

2
  • 2
    Have you tried doing similar in a different language? Is this specific to Julia’s network stack or is this typical of loopback UDP traffic in general? Commented Jan 13, 2022 at 12:47
  • @StefanKarpinski In Matlab this kind of code was working with broadcast ip address 255.255.255.255. Commented Jan 14, 2022 at 8:40

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.