By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,687 Members | 2,055 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,687 IT Pros & Developers. It's quick & easy.

ping in c as nonroot

P: n/a
hello,

is out there any tutorial for writting a c/cpp program,
that can ping an other computer WITHOUT having suid state.

for the moment i only get working raw socket as root.

many thanx
ppl
Nov 14 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Philipp Plaenitz <pp*@janus.hrz.tu-chemnitz.de> scribbled the following:
hello, is out there any tutorial for writting a c/cpp program,
that can ping an other computer WITHOUT having suid state. for the moment i only get working raw socket as root.


The ISO standard C language does not define "ping", "suid state", "raw
sockets" or "root". In fact it does not even define "other computers".
Please ask in comp.unix.programmer.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"War! Huh! Good God, y'all! What is it good for? We asked Mayor Quimby."
- Kent Brockman
Nov 14 '05 #2

P: n/a
Philipp Plaenitz wrote:
is out there any tutorial for writting a c/cpp program,
that can ping an other computer WITHOUT having suid state.

for the moment i only get working raw socket as root.


So the answer is : The isn't.

Igmar
Nov 14 '05 #3

P: n/a
Igmar Palsenberg <ig***@non-existant.local> wrote:
Philipp Plaenitz wrote:
is out there any tutorial for writting a c/cpp program,
that can ping an other computer WITHOUT having suid state.

for the moment i only get working raw socket as root.
So the answer is : The isn't.


No, not necessarily, it's just that you asked the question in the
wrong newgroup. Most people usually don't admit to knowing any-
thing here about C++, networking or what "suid state" or root
accounts are since the topic of this group is the C programming
language which does not have any build-in support for networking
or must be used on an OS were "suid state" or root accounts are
available. And for C++ there's another group. Sorry.

You probably should try comp.unix.programmer if the "suid state"
and root account bits aren't misleading me (but I guess I don't
really have to tell you about that group since you have already
posted there).
Regards, Jens
--
\ Jens Thoms Toerring ___ Je***********@physik.fu-berlin.de
\__________________________ http://www.toerring.de
Nov 14 '05 #4

P: n/a
Philipp Plaenitz wrote:
hello,

is out there any tutorial for writting a c/cpp program,
that can ping an other computer WITHOUT having suid state.

for the moment i only get working raw socket as root.


See http://www.planet-lab.org/raw_sockets/api.html, if you can live with
the limitations. There not true raw sockets, but better as nothing.

Igmar
Nov 14 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.