DaemonForums  

Go Back   DaemonForums > Miscellaneous > Programming

Programming C, bash, Python, Perl, PHP, Java, you name it.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 6th January 2009
PeterSteele PeterSteele is offline
Port Guard
 
Join Date: Jul 2008
Posts: 43
Default Broadcast does not under FreeBSD

We need to write a Python app that uses limited broadcast to send messages in our closed network. However, we've discovered that although our code works fine under Linux it does not work under FreeBSD. This problem appears to be described in this article:

http://unix.derkeiler.com/Mailing-Li.../msg00067.html

Is this problem still not resolved in FreeBSD 7.0? We essential that we find a way to send/receive broadcasts under FreeBSD, preferably in Python. Surely there must be a way to do this? Any suggestions would be greatly appreciated.
Reply With Quote
  #2   (View Single Post)  
Old 6th January 2009
PeterSteele PeterSteele is offline
Port Guard
 
Join Date: Jul 2008
Posts: 43
Default Broadcast does not work under FreeBSD

I meant "does not *work*" of course...
Reply With Quote
  #3   (View Single Post)  
Old 6th January 2009
PeterSteele PeterSteele is offline
Port Guard
 
Join Date: Jul 2008
Posts: 43
Default

I came across another lengthy discussion on this subject:

http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/99558

It appears some work has been done to correct this problem but if I understand the discussion correctly it still is not resolved, at least at the timeframe of this thread.

In our case, we have systems with no IP identity of any kind--no IP address and no gateway, and they are connected by switches. There is no router in the network. They receive IP addresses through this special service that we've written that runs on one of the systems. All communication is done through limited broadcast. This works fine one our Linux and Windows boxes but not FreeBSD.

It may very well be user error in our FreeBSD code. Has anyone managed to get limited broadcast to work under FreeBSD?

Last edited by PeterSteele; 6th January 2009 at 02:37 PM.
Reply With Quote
  #4   (View Single Post)  
Old 6th January 2009
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,125
Default

You probably will get more response by asking on the freebsd-stable mailinglist or on freebsd-hackers. Especially if it used to work on FreeBSD 4.x and 5.xx

I wonder if there could be a sysctl variable you need to turn on. Unfortunately don't have a FreeBSD box available at this time.
OpenBSD has a sysctl to enable directed broadcasts, which is not what you want
Code:
$ sysctl -a | grep broad
net.inet.ip.directed-broadcast=0
Only after setting this to 1, a directed broadcast would work under OpenBSD.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #5   (View Single Post)  
Old 6th January 2009
PeterSteele PeterSteele is offline
Port Guard
 
Join Date: Jul 2008
Posts: 43
Default

Yeah, the hackers list is probably the best option. And I just checked the sysctl list and there is no such variable to enable broadcasts. Now that would have been a nice solution!

Thanks.
Reply With Quote
  #6   (View Single Post)  
Old 21st January 2009
tehuelche tehuelche is offline
New User
 
Join Date: Jan 2009
Posts: 1
Default

Using raw sockets maybe?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Heartbeat and broadcast stukov Other BSD and UNIX/UNIX-like 0 22nd October 2008 02:30 PM


All times are GMT. The time now is 08:08 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick