Solved

how to make a broadcast ping in VC++.net??

Posted on 2003-10-26
6
283 Views
Last Modified: 2013-11-20
I am using winsock2.h for dealing with network programming. But I dont know how to make broadcast ping in it ??
0
Comment
Question by:elsayed_mazen
  • 3
  • 2
6 Comments
 
LVL 12

Expert Comment

by:migel
ID: 9625951
Hi!
What do you mean under "broadcast ping"?
Do you try find all "near" hosts?
0
 
LVL 12

Expert Comment

by:migel
ID: 9625952
Hi!
What do you mean under "broadcast ping"?
Do you trying find all "near" hosts?
0
 

Author Comment

by:elsayed_mazen
ID: 9631299
yes I mean that, I use the function setsockopt() and use the parameter SO_BROADCAST to make my socket dealing with the broadcasting, but there is a runtime error appeares when excute the program.
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 12

Expert Comment

by:migel
ID: 9632130
code please?
and what exactly error you get?
May be you use wrong type for SO_... value?
for SO_BROADCAST you have to use BOOL (reallly DWORD) value.
0
 

Author Comment

by:elsayed_mazen
ID: 10065260
OK, forget that quistion, How can I know the hosts connected to the LAN by my program??
0
 
LVL 5

Accepted Solution

by:
Nass89 earned 125 total points
ID: 10068714
Hi,
Try

Bool IsNetworkAlive(
  LPDWORD lpdwFlags     // Specifies the type of network connection
);

Good Luck!
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Question regarding Copy/Paste 16 87
Expand data scrubbing tool 13 31
maven archtype selection in eclipse 1 51
wordmultiple challenge 12 90
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now