473,805 Members | 2,027 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

error with examples (UDP broadcast)

Hi All!

I'm writing a small programm which must send and service UDP broadcast
packets.
As start of it I looked at
/usr/share/doc/python2.4/Examples/Demo/sockets/broadcast.py

damir@debian-IBM:/usr/share/doc/python2.4/examples/Demo/sockets$
python2.4 broadcast.py
Traceback (most recent call last):
File "broadcast. py", line 14, in ?
s.sendto(data, ('<broadcast>', MYPORT))
socket.error: (101, 'Network is unreachable')
damir@debian-IBM:/usr/share/doc/python2.4/examples/Demo/sockets$

If I replace '<broadcast>' to '192.168.10.255 ' (this is my network's
broadcast addres) it's working fine.
Were is the truble?

Damir.

Aug 8 '05 #1
0 1769

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

Similar topics

0
11869
by: Stephan Steiner | last post by:
Hi The project I'm currently working on involves sending large UDP broadcasts. As the .NET framework already provides an easy facility for sending and receiving UDP packets I thought it was a good idea to use UdpClient rather than sockets directly. A few weeks back I ended up rewriting the receiver part to use sockets directly because I had to manipulate some low level socket properties, and those manipulations would fail on the...
8
46103
by: Frank Esser | last post by:
Hello! I have got machines that answer a certain UDP broadcast request with certain information about them. Some years ago I wrote a VB6 application that just sent out this UDP broadcast request and received all machine information to display all available machines in a grid. Now I want to write the same application in C# but so far with no success.
2
5789
by: Daniel Lindberg | last post by:
Hi, im a beginner in C# and i just cant seem to get my udp broadcasting to work. What happens is that it just locks down on the Receive call and never gets any data. I have the code for the server who answers the broadcast, so i know that it sends a reply, but i cant figure out why my C# client cant receive it.. Any input on whats wrong with my code will be appreciated //My code...
3
3658
Sagittarius
by: Sagittarius | last post by:
Hi there. I have a problem concerning an UDP socket in C++ (Winsock). The next paragraphs is merely to explain the system I am working on. If U want to skip it, I have marked the question in bold below it. I have a pc, connected to a network of boards, all connected in a ring, all having their own unique IP adresses. As it is now, I send messages to the network of boards via broadcast, so all the boards gets the message. All the...
9
3696
by: Irmen de Jong | last post by:
Hello Sorry this might be a bit offtopic but I don't really know where else to post this question. If you could point me in the right direction that is much appreciated. I'm running into a weird thing on Windows XP. I'm using Python 2.5 with latest pywin32 from Mark Hammond.
1
1691
by: =?Utf-8?B?aXdkdTE1?= | last post by:
hi, im trying to send a broadcast out to my network using a UDP socket. heres how i initialize it. Dim soc As New Socket(AddressFamily.InterNetwork, SocketType.Raw, ProtocolType.Udp) i get the data into a byte array, then i try to set the socket options and it works fine soc.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Broadcast, 1)
0
1506
by: =?Utf-8?B?aXdkdTE1?= | last post by:
Hi, im trying to broadcast a UDP packet to my networks broadcast address (192.168.255.255) which i have verified with my network admin is the correct address. i can ping that address and get responses from the other computers on the network (via the command prompt) but when i attempt to send a UDP packet, it does not go through. there are no errors, however, i am listening on another computer on the same port, but the packet is not...
2
6551
by: OBones | last post by:
Hi all, I'm currently trying to receive replies to a UDP broadcast that I sent and I can't get it to work. I know the datagrams are sent as I see them with WireShark, but my C# code does not see them. Here is how I intended things to work: Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); try
1
7621
by: raviskar | last post by:
Hi, I have a problem in receiving UDP broadcast data. We have a simple application which listens for the UDP broadcast data from the external servers. We can receive the UDP broadcast data from one of the servers. For the other external server, our program does not receive any data in the sockets, but we can see the broadcast data in tcpdump capture. Is there any possible reason on why our sockets cannot receive the UDP broadcast, but the...
0
9716
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9596
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10361
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10103
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7644
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5536
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5676
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3839
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3006
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.