473,508 Members | 2,300 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

UDP sockets

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
Jul 22 '05 #1
1 4399
Sven Jacobs <sv*********@web.de> spoke thus:
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?


Your post is off-topic for comp.lang.c++. Please visit

http://www.slack.net/~shiva/welcome.txt
http://www.parashift.com/c++-faq-lite/

for posting guidelines and frequently asked questions. Thank you.

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
Jul 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3880
by: Tero Saarni | last post by:
Hi, I have several threads communicating with each other using events stored in Queues. Threads block on Queue.get() until somebody publishes an event in thread's event queue. I need to add...
1
3757
by: Dmitry Akselrod | last post by:
Hello everyone, I have a vb.net application that wraps the TCPListener object in a class. The server connects to the local interface and establishes itself on port 9900. It then polls for...
0
1786
by: mrpolitics | last post by:
So I'm working with PureIRCD (http://sourceforge.net/projects/pure-ircd) and everything was fine untill yesterday when the server crashed. So I did a cold restart and staretd the server back up...
3
10379
by: Logan McKinley | last post by:
I have a C# program that uses blocking sockets and want to allow the user to stop the server. The problem I am having is the socket blocks on...
1
20176
by: Adam Clauss | last post by:
I am (attempting) to move an existing socket application to use raw sockets. Right now, my application is essentially a port forwarder. Upon receiving a connection, it will open a connection to...
4
6297
by: BadOmen | last post by:
Hi, What is the different between 'System.Net.Sockets.Socket' and 'System.Net.Sockets.TcpClient'? When do I use System.Net.Sockets.TcpClient and System.Net.Sockets.Socket?? Yours, Jonas
3
4335
by: Michael Maercker | last post by:
hi! i'm really not into networking at all and have now been asigned the task of porting a vb6-code into vb.net (compact framework, in this case) and the code uses the winsock-control. i quickly...
3
11567
by: J C | last post by:
Hi, I'm using UDPClient to make a simple DNS server. I notice that intermittently and unpredictibly I get: Unhandled Exception: System.Net.Sockets.SocketException: An existing connection...
7
6703
by: Adam01 | last post by:
Im using cygwin to test the code of a server I am writing. I've included sys/types.h, sys/socket.h, netdb.h, and arpa/inet.h. And this is the output.. ../../../sockets.cpp: In constructor...
0
7233
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7135
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7342
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7410
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7067
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7505
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5060
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4729
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
440
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.