Sponsored Content
Special Forums IP Networking How to handle unplugging ethernet cable in socket programming Post 302395084 by JagadishB on Monday 15th of February 2010 12:52:40 AM
Old 02-15-2010
How to handle unplugging ethernet cable in socket programming

Hi, I am trying to implement a server-client socket communication. My server and clients are in different PCs. During communications if the ethernet cable is removed from the server side it shows broken pipe due to unable to write on the socket. I want to know how to check whether the ethernet cable is plugged or not before trying to write on socket. Is there any API to check ethernet connectivity that can be used in socket programming?? How can I check a socket is alive or not ??

Last edited by JagadishB; 02-19-2010 at 01:19 AM..
 

10 More Discussions You Might Find Interesting

1. Programming

Socket Programming

Dear Reader, Is there any way to check up socket status other than 'netstatus ' Thanks in advance, (1 Reply)
Discussion started by: joseph_shibu
1 Replies

2. Programming

Socket Programming socket

Hello, I actually try to make client-server program. I'm using SCO OpenServer Release 5.0.0 and when I try to compile my code (by TELNET) I've got this error : I'm just using this simple code : and I get the same error if I use : If someone can help me, Thanks (2 Replies)
Discussion started by: soshell
2 Replies

3. Programming

Socket Programming

Hi , I'm facing the following problem in socket programming. My structure is struct { int i; char *str; }samp; I'm creating the pointer to this structure and assigning the value to the structure members and send via the socket to the another process. The receiver process when... (7 Replies)
Discussion started by: arunviswanath
7 Replies

4. Red Hat

[RHEL4.5] server shutdown when I unplug the ethernet cable

hi.. I unplug my eth0 lan cable.. and suddenly my system shutdown... no idea :eek::confused: (3 Replies)
Discussion started by: flekzout
3 Replies

5. Programming

Help with socket programming in C

hi guys i got this code trying to make connection between the server and multi clients but when i do ./server i got message server waiting then when i run ./client it says client 1 nosuch file i dont know whats that should i use any argument plz help how to compile and run and whats the expected... (1 Reply)
Discussion started by: kedah160
1 Replies

6. IP Networking

Two Servers via ethernet crossover cable

Hi, I'm trying to communicate two servers (HP DLProliant 380 G5) via a crossover cable, but I don't get them to ping each other. I am working in RHEL 4. These are the steps I've performed: 1) Plugged the crossover cables in eth2. (note: The cable is brand new. Also I built one myself... (3 Replies)
Discussion started by: jrodriguez365
3 Replies

7. Programming

Socket programming

Hi everyone, I'm new to this forum. I'm working on new project for last few days and this forum already helped me on couple of occasions. I don't have any prior experience with network programming so I'll appreciate any advise given. I'm trying to do the following: 1. open user... (2 Replies)
Discussion started by: _thomas
2 Replies

8. UNIX for Dummies Questions & Answers

How to change ethernet cable of iscsi initiator (iscsi client)?

how to change ethernet cable of iscsi initiator (iscsi client) (0 Replies)
Discussion started by: pankajd
0 Replies

9. Programming

How detect TCP/IP socket shutdown when ethernet cable is disconnected

Hi, I want to code TCP/IP client/server in linux application capable to fastly detect ethernet cable disconnection in any condition. So I have activate SO_KEEPALIVE options and set TCP_KEEPCNT, TCP_KEEPIDLE and TCP_KEEPINTVL to 1. When I disconnect ethernet cable I have the following... (5 Replies)
Discussion started by: jeje_clb
5 Replies

10. AIX

How to detect the network cable status with c programming on AIX

Hello, Is there any API or any other approach to detect whether the network cable is connected to the network adapter, say, en0, en1 or en2? The OS is AIX6.1. Thank you. (4 Replies)
Discussion started by: zephyrbj
4 Replies
VDE_OVER_NS(1)						      General Commands Manual						    VDE_OVER_NS(1)

NAME
vde_over_ns - Steganographic cable over NS protocol for Virtual Distributed Ethernet SYNOPSIS
vde_over_ns [-D] [-c server_address] [-s vde_plug] [-i ip.to.bi.nd] domain.name DESCRIPTION
A vde_over_ns allows to connect two remote vde_switches through steganographic NS query/response datagrams. e.g.: dpipe vde_plug /tmp/s1 = vde_over_ns tun.mydomain.vde binds to udp port 53 and listen for incoming steganographic NS queries (server mode). All the traffic to/from stdout/stdin is redirected to the client via ns responses. creates a wire between two vde_switches (with sockets /tmp/s1 and /tmp/s2 respectively). This cable looses 10% of the packets in each direction. The same vde_over_dns server can be created using: vde_over_ns -s /tmp/s1 tun.mydomain.vde The syntax is almost identical for the client mode, except that to have a vde_over_ns client connect to that server, the -c server option must be specified. OPTIONS
-s vdeplug If specified, the vde_over_ns will connect to the local vde socket vdeplug instead pf stdin/stdout, using the libvdeplug library. -D Detach console and send the process to background. -b ip.to.bind The NS server will bind only to the specified ip, instead of any ip. Only valid in server mode (without -c) -c server_addr If specified, client mode is enabled. Vde_over_ns will try to send NS requests to server_addr. If not specified, server mode is enabled by default. NOTICE
Virtual Distributed Ethernet is not related in any way with www.vde.com ("Verband der Elektrotechnik, Elektronik und Informationstechnik" i.e. the German "Association for Electrical, Electronic & Information Technologies"). SEE ALSO
vde_switch(1), vdeq(1). dpipe(1). unixterm(1). AUTHORS
VDE_OVER_NS is a tool by Daniele Lacamera <root@danielinux.net> VDE is a project by Renzo Davoli <renzo@cs.unibo.it> based on nstx, a steganographic ns client/server software by: Florian Heinz <sky@sysv.de> Julien Oster <frodo@sysv.de> Virtual Distributed Ethernet May 2, 2007 VDE_OVER_NS(1)
All times are GMT -4. The time now is 05:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy