🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sun
Article #7426

Broadcasting on a socket

#7426
From: Carl Alex Friis Nielsen
Date: Wed, 17 Apr 1991 01:00
20 lines
1536 bytes
I am currently trying to familiarize myself with the socket-mechanism in
SunOS 4.1.1.  I have written small programs wich send and receive
datagrams via sockets, wich work fine; but now I want to broadcast.  I
have tried to do this by modifying a program wich sends a packet to a
given socket on a given host.  First I create a datagram-socket, wich I
allow to broadcast with setsocopt.  Then I build  an address with family:=
AF_INET, s_addr:= INADDR_BROADCAST and the port I want to send to.  Finaly
I try to broadcast a packet.

I have another program running, which just listens at a known socket;
which works fine when a packet is send to it explicitly.  When i try the
broadcasting program nothing appears to be happening.

I would appreciate it a lot if someone would tell me how to do it/what I
am doing wrong. A simple programming example would be werry helpfull.

  Thanks in advance.

  Carl Alex Friis Nielsen
  EMAIL: cnielsen@imada.dk
Technical Details
Message-ID: <2464@brchh104.bnr.ca>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!brtph3!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-request

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!brtph3!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-request
From: cnielsen@imada.dk (Carl Alex Friis Nielsen)
Newsgroups: comp.sys.sun
Subject: Broadcasting on a socket
Keywords: Miscellaneous
Message-ID: <2464@brchh104.bnr.ca>
Date: 17 Apr 91 01:00:00 GMT
Sender: news@brchh104.bnr.ca
Organization: Sun-Spots
Lines: 20
Approved: Sun-Spots@rice.edu
X-Original-Date: Tue, 9 Apr 1991 13:49:36 GMT
X-Sun-Spots-Digest: Volume 10, Issue 81, message 3
X-Note: Submissions: sun-spots@rice.edu, Admin: sun-spots-request@rice.edu