UDP sockets

S

Sven Jacobs

Dear newsgroup,

first of all let me tell you that I am no network nor an C++ expert. I have
several years of programming experience but this is the first time that I
have to deal with UDP sockets (and sockets generally) at a relatively low
level layer. If this is the wrong place for my question please be
considerate and point me to the right location, thanks!

The project I am developing is aimed for Linux deployment and is being
developed under Linux. I am using the GNU CommonC++ library, especially the
UDPSocket and UDPBroadcast class, for my purposes. I've successfully
managed to build a NetBIOS name query package and sent it to the broadcast
address of my network via the UDPBroadcast class. Ethereal shows me that
the packet is transmitted and an answer is being replied. I am unable to
receive the answer though, because it's directly sent to the IP of my
computer. I am listening on IP 0.0.0.0 (which, as far as I understand,
means "listen on all network devices") via the UDPSocket class. I do
receive all UDP broadcast messages, but I don't receive the packets sent to
192.168.0.3 (which is the IP of my computer, the originator of the name
query). The UDPReceive class, which may be an alternative way of receiving
the packets, unfortunately needs the IP address of the other computer (the
one which is sending the name query reply) but I am not aware of this IP at
that moment. The purpose of a NetBIOS name query is to resolve a NetBIOS
name to a IP address.

So my question is: How do I receive a UDP packet which is sent to my
computer without needing to know the IP of the sender?

--

Thanks for any help,
Sincerely

Sven Jacobs
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top