hi,
does anyone know how i could detect the bit (ie tx and rx) on cat5 cable? or any other ways that i could detect the connection to a sever?
thanks
hi,
does anyone know how i could detect the bit (ie tx and rx) on cat5 cable? or any other ways that i could detect the connection to a sever?
thanks
What's wrong with using the standard protocol based approaches to checking if a connection exists?
Besides, who said anything about it being 'cat5' all the way between you and the server?
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Also note that cat5 is just a cabel http://en.wikipedia.org/wiki/Category_5_cable
it is not a connection method...
This type of cable is often used in structured cabling for computer networks such as Ethernet, although it is also used to carry many other signals such as basic voice services, token ring, and ATM (at up to 155 Mbit/s, over short distances).
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler
u better have to look at some tutorial on how to get the data from the cables
[url ="http://cboard.cprogramming.com/showthread.php?t=41926"]Network Programming[/url]
there are some set of websites which might b helpfull for you.
ssharish2005
i understand that it just a cable. but imagine, i have this pc which connected to a server through cat 5 cable and my program will be running in that particular pc to detect when the server is down. what i previously do is to ping to the server which will occupy the line, it seems like not a good method to do so. and now i was trying to detect through the port where we connected to the server (which cat 5 cable connected). if we're detecting a modem signal then the serial port will be used (which is ttyS0 in linux) but how about the port for cat 5?
perhaps the idea would sound silly, but i couldnt think of any other better way.
It might be possible, but it would require more detailed knowledge of your system.
Say for example performing some kind of diagnostic checks on the actual network hardware in your machine. This is where it gets OS/Compiler/device specific.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Can't you just use the bind() function?
I believe that if the link on the ethernet port is down, the function will return an error.
"I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe
http://www.Bloodware.net - Developing free software for the community.