Sponsored Content
Operating Systems AIX How to detect the network cable status with c programming on AIX Post 302556027 by alister on Friday 16th of September 2011 11:06:12 AM
Old 09-16-2011
Disclaimer: I have absolutely no experience with AIX.

Most systems provide this type of information via ioctl on a socket fd.

Regards,
Alister
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Network Status

Hi, My system ( Solaris 2.6, Entrerprise 250 ) shows lot of connections in TIME_WAIT status against service localhost.8007 and localhost.45221 What are these services and where can I get the cross references. I have checked up in /etc/services and there is no such entry. Infact... (5 Replies)
Discussion started by: shibz
5 Replies

2. Solaris

Solaris 9 on x86- Can't detect network interface

Hi All, I recently installed Solaris 9 on my Compaq Presario V2000 Series (V2069CL) laptop. Everything is working fine except that Solaris is not able to detect the Network Interface after boot. While the system is booting, it shows that it has detected "Xircom Pocket Ethernet parallel port... (3 Replies)
Discussion started by: com2com
3 Replies

3. AIX

need AIX console cable

Hello ... I am newbie and will be very grateful for any help. I need a serial console cable for my AIX boxes (seems we have lost the one we had!). However I am confused about the one one to order - UK based if possible. I wonder if anyone can point me at a specific one or the exact spec i need to... (0 Replies)
Discussion started by: tim441
0 Replies

4. IP Networking

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... (0 Replies)
Discussion started by: JagadishB
0 Replies

5. Shell Programming and Scripting

how to detect port open status?

I write a script which will stop an application, then restart it. Sometimes it is succesful, sometimes not. The problem is, when stop the application, some ports are still listenning (or not released). When start the application, it reports that ports are used, and can't continues. I use... (1 Reply)
Discussion started by: rdcwayx
1 Replies

6. Shell Programming and Scripting

set a variable and detect error status...

Hi there, I'm driven crazy by a new problem. It seems very complex to me and I see no way to come around. In my script, I receive the path to a tgz file and I want to output the md5 sum of the file inside the tgz. I want a way to detect if tar fails. I'm using the following command tar... (7 Replies)
Discussion started by: chebarbudo
7 Replies

7. 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

8. AIX

AIX 7.1 don't detect my DataDomain Library

Hi. I have 2 libraries (overland + data domain). My AIX 7.1 detect all "rmt" of the overland but none of the data domain. I have the Atape driver 12.3.9. During cfgmgr, I have this message : cfgmgr: 0514-621 WARNING: The following device packages are required for device support... (2 Replies)
Discussion started by: stephnane
2 Replies

9. Solaris

No network cable But Network interface is UP and Running

I've one Netra 240 After changing main board and system configuration card reader, Network is not accessible any more, Network interfaces are always UP and Running even when there is no cable connected to Network interfaces. I tried to restart and plumb/unplumb with no luck. ifconfig -a... (7 Replies)
Discussion started by: samer.odeh
7 Replies

10. Post Here to Contact Site Administrators and Moderators

AIX server do not detect LUN from HP storage

ssssssssssss (0 Replies)
Discussion started by: sampathenjoy
0 Replies
mfa(7)							 Miscellaneous Information Manual						    mfa(7)

NAME
mfa - DEMFA FDDI Network Interface SYNOPSIS
config_driver mfa DESCRIPTION
The mfa interface is a high speed XMI adapter to a 100 Mbit/second Fiber Distributed Data Interface (FDDI) timed token ring network adapter. The mfa interface allows the host system to be an FDDI single attachment station. The host's Internet address is specified at boot time with an SIOCSIFADDR ioctl. The mfa interface employs the address resolution protocol described in arp(7) to map dynamically between Internet and FDDI addresses on the local network. The maximum frame size for the mfa interface is 4500 bytes, which is substantially larger that the 1500 bytes maximum packet size of the Ethernet interfaces. The mfa interface does not support the BSD trailer encapsulation, which is specific to the VAX architecture. The SIOCRPHYSADDR ioctl can be used to read the physical address of the DEMFA adapter. The physical address of the DEMFA adapter can be changed by use of the SIOCSPHYSADDR ioctl. The SIOCADDMULTI and SIOCDELMULTI ioctls can be used to add or delete multicast addresses. The DEMFA supports up to 15 multicast addresses. The SIOCRDCTRS ioctl can be used to read the FDDI driver counters. The DEMFA adapter status and characteristics can also be read through this ioctl by providing a FDDISTATUS flag . The argument to this ioctl is a pointer to a counter or status structure, ctrreq, found in <net/if.h>. The SIOCENABLBACK and SIOCDISABLBACK ioctls can be used to enable and disable the interface loopback mode, respectively. The SIOCIFRESET ioctl can be used to reset the adapter. EXAMPLES
To obtain the physical address of the adapter, use the SIOCRPHYSADDR ioctl as in the following program example: #include <stdio.h> /* standard I/O */ #include <errno.h> /* error numbers */ #include <sys/socket.h> /* socket definitions */ #include <sys/ioctl.h> /* ioctls */ #include <net/if.h> /* generic interface structures */ main() { int s,i; static struct ifdevea devea; /* Get a socket */ s = socket(AF_INET,SOCK_DGRAM,0); if (s < 0) { perror("socket"); exit(1); } strcpy(devea.ifr_name,"mfa0"); if (ioctl(s,SIOCRPHYSADDR,&devea) < 0) { perror(&devea.ifr_name[0]); exit(1); } printf("Address is "); for (i = 0; i < 6; i++) printf("%X ", devea.default_pa[i] & 0xff); printf(" "); close(s); } To reset the adapter, use the SIOCIFRESET ioctl as in the following program example: #include <stdio.h> /* standard I/O */ #include <errno.h> /* error numbers */ #include <sys/socket.h> /* socket definitions */ #include <sys/ioctl.h> /* ioctls */ #include <net/if.h> /* generic interface structures */ main() { int s; struct ifreq data; /* Get a socket */ s = socket(AF_INET,SOCK_DGRAM,0); if (s < 0) { perror("socket"); exit(1); } strcpy(data.ifr_name,"mfa0"); if (ioctl(s,SIOCIFRESET,&data) < 0) { perror("SIOCIFRESET:"); exit(1); } close(s); } ERRORS
Diagnostic error messages contain information provided by the mfa driver. For example: The DEMFA adapter did not pass the power-up selftest during autoconfiguration. The DEMFA is unable to allocate system memory or cluster mbufs for device initialization. The DEMFA cannot transition to the initialized state. An interrupt has been received with no packets found. An internal command to the device has failed to complete on time. An internal command to the device has returned an error. The DEMFA has received an unknown type of unsolicited interrupt about the FDDI ring state. The DEMFA has received an unsolicited interrupt, the FDDI ring state has been changed. The DEMFA was unable to change FDDI characteristics and restart. An attempt was made to add more than 15 multicast addresses to the device. The DEMFA has failed internal self test during a reset operation. The DEMFA has failed to re-initialize after a reset operation. The DEMFA has encountered a hard error which should cause the device to reset. RELATED INFORMATION
netstat(1), arp(7), inet(7), intro(7), fddi_config(8) delim off mfa(7)
All times are GMT -4. The time now is 04:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy