how to make a broadcast ping in

Posted on 2003-10-26
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 ??
Question by:elsayed_mazen
  • 3
  • 2
LVL 12

Expert Comment

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

Expert Comment

ID: 9625952
What do you mean under "broadcast ping"?
Do you trying find all "near" hosts?

Author Comment

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.
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

LVL 12

Expert Comment

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.

Author Comment

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

Accepted Solution

Nass89 earned 125 total points
ID: 10068714

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

Good Luck!

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to create frequencies of a variable from SAS dataset? 10 133
ODBC Connection Logging, ADO.NET 6 69
matchUp  challenge 6 68
"Black Box" Testing of Control System Software 2 69
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
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.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit If you want to manage em…

789 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