Broadcasting over LAN

I am working on a program that broadcasts a packet over the LAN.I implemented a datagram packet which has some data inside .Is there any way to broadcast this message to the computers without specifying the port number..I want all the computers on LAN to take this packet
here is the part of the code.
DatagramSocket socket = new DatagramSocket();
InetAddress address=InetAddress.getByName("255.255.255.255");
DatagramPacket sendPacket =new DatagramPacket(m,m.length,address,?????);
socket.send(sendPacket);

Hi!
as far as i know you have to set a port number ;) so:
int port = 2000;
DatagramSocket socket = new DatagramSocket(port);
hmm... getByName is not a good idea, try getByAddress, defining a byteArray first (255,255,255,255).
InetAddress address=InetAddress.getByAddress(yourByteArray);
Define your sendPacket like thist, where "buf" is the byteArray of your sendData, like:
buf = sendData.getBytes();
DatagramPacket sendPacket =new DatagramPacket(buf, buf.length, address, port);
finally:
socket.send(sendPacket);
could work...
greetings
commy

Similar Messages

  • Broadcast over lan

    Hi,
    I was wondering how to write an application that does a broadcasts over a local network.
    The idea is one program that does a broadcast over a lan, and the clients respond to that broadcast. Only things I find are MulticastSocket's and similar, but no real broadcast examples.
    Any suggestions?

    The only difference between multicast and broadcast packets are the network you use. A multicast is in the 224+.*.*.* range and a broadcast is typically limited to the network the server is on e.g. 10.10.10.*

  • Live Video Broadcasting over LAN

    Hi Guys,
    I have studied the JMF Framework.
    And sucessfully transmitted and received video and audio over a network i.e. LAN.
    Also I have successful in displaying Webcam onto applet.
    Only issue with me is how do I broadcast the Live Video to clients.
    Do help me at the earliest.
    Thanks and Regards,

    Ummm, the same way you broadcast a video file.
    You feed the DataSource associated with your web cam through a Processor, program the Processor's tracks to output the encoding you want, and then you send that out via RTP.
    And on the receiving end, nothing changes from the video file.

  • Printing broken for HP LJ1150 over Lan

    All of sudden today I cannot print to my LaserJet 1150, although all other Win boxes can. The printer is connected via USB to a MacMini and shared over Lan. It's rather embarrassing.
    When I attempt to print from say Safari, I get a dialog that says "Print - Error while Printing. OK"
    Please help. Thanks people, as always.
    I checked my Console.log and I attach what I see:
    ===========================================
    ===== Wednesday, December 12, 2007 4:47:57 PM Europe/Athens =====
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    2007-12-12 16:48:03.806 Safari[306] PMSessionValidatePrintSettings failed (error code = -50)
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    Dec 12 16:48:03 any /Applications/Safari.app/Contents/MacOS/Safari: CGContextSetStyle: invalid context
    2007-12-12 16:48:03.818 Safari[306] PMSessionEndDocumentNoDialog failed (error code = -30871)
    2007-12-12 16:48:04.601 Safari[306] Failed to end PMPrintContext

    Thanks greg,
    I had already Safe Booted and then re-added the printer by the time I had read your post. All is fine for now.
    Thanks.
    PS Prior to Safe-Booting, I had deleted/re-added the printer a number of times. Every time I attempted to print after adding the printer, it just locked and reproduced the error. Only after Safe-Boot did it come back alive.

  • FTP/SFTP/FISH (etc) slow file transfer rate over LAN

    Hi everyone,
    I have a problem with transferring files over my home network that has been bothering me for quite some time.
    I have a 802.11n router which should provide me with the transfer rate up to 150 Mbps (afaik). When I download files from the Internet, 3 MB/s data transfer rate is of no problem.
    However, when receiving or sending data over LAN, the transfer rate is much slower (1.8 MB/s).
    My rough guess is (after reading some papers on this topic) that TCP protocol is causing this (its flow control feature to be exact), since TCP max window size is too small on Linux by default.
    So, setting TCP max window size to a greater number should solve this.
    I tried putting this:
    # increase TCP max buffer size setable using setsockopt()
    # 16 MB with a few parallel streams is recommended for most 10G paths
    # 32 MB might be needed for some very long end-to-end 10G or 40G paths
    net.core.rmem_max = 16777216
    net.core.wmem_max = 16777216
    # increase Linux autotuning TCP buffer limits
    # min, default, and max number of bytes to use
    # (only change the 3rd value, and make it 16 MB or more)
    net.ipv4.tcp_rmem = 4096 87380 16777216
    net.ipv4.tcp_wmem = 4096 65536 16777216
    # recommended to increase this for 10G NICS
    net.core.netdev_max_backlog = 30000
    # these should be the default, but just to be sure
    net.ipv4.tcp_timestamps = 1
    net.ipv4.tcp_sack = 1
    in /etc/sysctl.conf but to no avail.
    So either there is no problem with the max window size setting, or the Linux kernel ignores it (maybe because /proc is no longer supported?).
    Thanks for any neat ideas.
    Last edited by Vena (2012-06-01 21:48:14)

    Bump? No ideas whatsoever?

  • Has anyone successfully used the serial-over-lan feature in ipmitool?

    The IPMI hardware in Apple's Intel Xserves ostensibly supports serial-over-LAN access via ipmitool. Attempting to access it with ipmitool doesn't appear to work, however; the command
    ipmitool -H hostname -U username sol activate
    simply returns without entering a serial session. I am able to perform other queries on the same interface with ipmitool, however. Is there some setting that I must enable in order to permit the above command to succeed?

    I have version 2.0.2 installed. The firmware is not up to date (its boot ROM is at version XS11.0080.B01); however, I never was able to figure out how to update it (see http://discussions.apple.com/thread.jspa?threadID=1569860&tstart=0). Querying the bmc info with ipmitool does work; it reports firmware revision 1.2.8. No manual changes were made within /dev to my knowledge.

  • X.25 over LAN using hme

    Hi there,
    I have to use hme for X.25 over LAN.
    But I can't see the hme in the device list on x25tool screen.
    I'm using SunLink X.25 9.0.
    Is there any way ? Modify some config files ?
    Thanks a lot

    Hi franky,
    I have just read your question with regards to configuring X.25
    over a LAN connection.
    What type/model of system is X.25 being configured on ?
    Has the hme ethernet card been added recently to the system?
    What devices do you have available to you ?
    Are you referring to the list under:
    Edit > Add Link > LAN > Device?
    Do you see the hme definition under the Board definition list?
    ie: Boards > Definition menu
    If not add a new device specifying a symbolic name Path to device
    which is /dev/hme, L for Lan device, number of lines/ports, MRU (usually 1515 for lan connections) and a Comment.
    I hope that this helps;
    Regards
    Derek SUN-DTS

  • RD120 Serial over Lan configuration.

    Hi,
    Does anyone know what the settings in the bios/BMC need to be on the RD120 to allow Serial over LAN...
    I am remote so I cannot see the bios or BMC utilities. There is no documentation on this on the Lenove website. I do not have an RSA adapter for this box as I really dont think I need it for Serial over LAN. I can see the BMC settings with ipmitool so I just need the SOL configuration steps.
    Does anyone know if I can set this up? I am looking for documentation on how to configure the bios and BMC..
    I can't find it anywhere.
    Thanks.

    Hi Bill,
    SoL is a special text based management path for users to access IBM blade servers via the Management Module uplink. On the IGESM, in code at 12.1(22)AY1 and below, it is necessary to configure a special VLAN on the IGESM to permit SoL to operate. Details on configuring SoL on older code IGESMs can be found in section 7.8 of the IGESM Redpaper:
    http://www.redbooks.ibm.com/abstracts/redp3869.html
    On code versions at 12.1(22)EA6 and above, there is a built in special hidden VLAN (4095) that does not require any configuration to support SoL. Based on this simplification, it is recommend to use code 12.1(22)EA6 or later if the use of SoL is desired.
    Thanks, Matt

  • Mac OS X 10.4.9 and Music Lab's "Midi Over LAN" broken?

    Hi all,
    I run "music lab's midi over lan" and am wondering if it doesn't work under the new OSX 10.4.9......
    I was forced to update 1 of my slave G5s and now "MolCP" no longer worx...... I can't be certain that it is 10.4.9, but I'm trouble-shooting,
    thanx in advance.
    SvK

    Er, that's not forced, that's just not knowing any better!
    You should have just gone to Apple and downloaded the 10.4.8 combo installer.
    http://www.apple.com/support/downloads/macosx1048comboupdateppc.html
    http://search.info.apple.com/?q=macos+x10.4.8&type=kbdload&search=Search&lr=lang_en&search=Go
    OSX updates are always recommended to be done from the full combo update, rather than the smaller cut-down software updates anyway.

  • UDP broadcast over multinetted VLAN

    We're having an issue with UDP broadcast over a VLAN that has three IP's configured on it.  This is on a Cat 6509.
    interface Vlan11
    description ZZZZ
    ip address 10.10.249.1 255.255.255.0 secondary
    ip address 10.10.250.1 255.255.255.0 secondary
    ip address 192.168.101.1 255.255.255.0
    no ip redirects
    ip pim sparse-mode
    The device broadcasting is 192.168.101.34.
    We've added the global config:
    ip forward-protocol udp 4444
    And we've tried interface commands like:
    ip helper-address 192.168.101.34
    and
    ip directed broadcast
    Nothing seems to help, though.  Are there any inherit limitations due to the multinet?  Devices on the 192.168.101.0/24 subnet receive the broadcast fine.  Devices on the other two subnets do not.  Basic routing between all subnets is fine.
    Thanks,
    Joe

    Hi John,
    If you're running 2008R2 DHCP, you can fix the DHCP issue that you're having by configuring a DHCP super scope on the DHCP server.  We ran into that problem too and managed to get DHCP working on all three subnets.  I know it works on 2008R2 but not sure on other versions.
    We're mandated to get off the 192.168.101.0 subnet; so, if we can't get it working this way we may need to do a complete cutover including re-IP-ing all devices involved in this dilemma.  It's more complicated than I'm stating as this is basically a troubleshooting step to see why it broke.  There's an application server involved, an audio streaming server, and some Barix devices.  We're attempting to get all the workstations cutover first when we ran into this issue.
    Thank you,
    Joe

  • Time Capsule backup over LAN

    Hello,
    is it possible to Time Capsule backup a non wifi Mac over LAN?

    of course. you can back up over an ethernet connection.

  • File transfer protocol over LAN

    Hello every wizards of this world...i extemely need ur help...plz...can i ask for ur helping hands to give us a running codes for file transfer. on socket programming over LAN(local area network)..we nid this codes for our project...we find hard searching for it on the internet...there are lots of examples but it doesn't work...

    FTP

  • Firebird connection problem over LAN

    Hi, people this is my 7th day i fight with firebird on Arch to work on my LAN in work.
    The database is working on localhost when i go ./islq and select * all is ok and i see
    all that crap in my fdb base.
    At first i must say that port 3050 and 3051 are open and all other things that i configured
    like ssh, nomachine and murmur are working and i can connect to them even over internet.
    But when i try connect to database over lan i got connection refuse errors and info that cant connect
    to database.
    Firebird is 2.1.3 CS installed from official tarball from firebirdsql.org
    Before Arch on server was CentOS and firebird was working fine
    i changed the os because i love Arch and crappy CentOS was slow
    and after some updates start to crashing.
    Plz post your ideas and concepts i need help !!
    PS. sorry for my English i hope you understand me

    Did you try install firebird from AUR!?

  • Video conferencing over LAN

    I want to do a project on video conferencing over LAN .Plz help me
    for implementation.

    Have you tried AVTransmit2 and AVReceive2 to transmit multicast stream. then have multiple receivers join and disconnect.
    It works without any code modification, so I would study the differences between that and yours.
    I think I asked this before, are you transmitting multisession?? and receive multisession??
    Are you using linux by chance?

  • Broadcasting over 79xx VoIP speakerphones

    Does anyone know if Call Manager has a function where you can broadcast over the speakerphones in an emergency situation? If not, are there products that can do this? Ideally, I'd like something where I can create groups and broadcast to specific groups or to the entire campus.

    Hi Brian,
    This feature (Group Paging) is not built-in to any CUCM version (including 7.x, unlike CME) but is most possible (via IP Phone speaker and Overhead) using these highly rated Third party products;
    CDW-Berbee Informacast
    http://www.berbee.com/public/berbeesoftware/InformaCast.aspx
    IPCelerate
    http://www.ipcelerate.com/assets/docs/IPcelerate_ER.pdf
    Hope this helps!
    Rob

Maybe you are looking for

  • Can I use my mac mini with an apple TV to watch my desktop wirelessly?

    Hello, I would like to know if I can use an Apple TV to watch my mac mini´s desktop and other apps to use my HD TV as a monitor but wirelessly usin AirPlay or another app? Thank you in advance for your help!!

  • Default Views are not listed in Community Prefs of  WorkList Item portlet

    I have created some custom views and presentation. I have imported them and deployed them. But when I go to edit the community prefs to set the default view, I do not see the custom views I had imported. I am using ALIP 1.5 AnyIdeas why I am not able

  • Problem regarding F-47

    Through t. code F-47 It is observed that system is allowing users to create DPR for closed & Partial Closed POs (GR made, invoices booked & payment made) as well. I need  validation that system should not allow users to create DPR for closed & Partia

  • Accounts Receivable payment schedule

    Hello, Have you ever heard of a payment schedule possibility for Accounts receivable? This payment schedule is different then the scheduled billing. It occurs after the invoices have been posted and the customer is requesting to allow a change in the

  • Database Configuration Assistant Failed During 9i Installation

    Database Configuration Assistant failed during my 9i Installation due to lack of disk space. I had 4MG allocated on /apps and the application used 3.1GB. I now do not have the required 1GB for the seed database. Actually, I want to create the seed da