Sponsored Content
Operating Systems Solaris Getting interface names using code Post 302213526 by herbmiller on Thursday 10th of July 2008 09:55:39 AM
Old 07-10-2008
Question Getting interface names using code

Is there a way to use code to get the interface names for a Solaris machine. I can easily see them on a command line with the "ifconfig -a" command. I could write a script that parses these out of a the ifconfig result and outputs them to a file, and then I run the script with the system command from code, and open the resulting file from code.

It seems there should be an easier way for a program to get these names. On some of the Solaris boxes I use, these names are bge0, bge1,... depending on how many ethernet cards are installed. On others the names are ce0, ce1,...

If you know how I can get these names from code directly, please let me know.
TIA,
Herb Miller
Smilie
 

9 More Discussions You Might Find Interesting

1. Programming

How to modify this c code to get full GUI interface for Unix Linux ?

Hi, the following code comes from Unix Linux dialog utility project. Unfortunately, this project is no more actively maintained. Unix Linux dialog utility is made of widget boxes. One of them is mixedgauge.c In the following example I would like to get rid of flickering when run in... (0 Replies)
Discussion started by: jack2
0 Replies

2. Shell Programming and Scripting

Shell Script to display function names (called & defined) in a C++ Source Code

Hello to all, I am looking for a way to display only the names of function (calls & definition) of a C++ source code.There is already a post related to this, but the script is to find the functions using a specific variable, and the replies are not that convincing since they cannot be used for... (2 Replies)
Discussion started by: frozensmilz
2 Replies

3. Shell Programming and Scripting

Searching for file names in a directory while ignoring certain file names

Sun Solaris Unix Question Haven't been able to find any solution for this situation. Let's just say the file names listed below exist in a directory. I want the find command to find all files in this directory but at the same time I want to eliminate certain file names or files with certain... (2 Replies)
Discussion started by: 2reperry
2 Replies

4. Solaris

Command line Interface or GUI Interface not shown on solaris

Dear all, I am a newbie in solaris and I need your advice. I have a Solaris version 5.9 installed on Sunfire V240. I am able to ssh the machine from putty remotely. My problem is that I cannot see the display from KVM switch I have connected to it. I need also to be able to see the GUI... (2 Replies)
Discussion started by: mbouster
2 Replies

5. SCO

Change SCO - GUI or Desktop interface to DOS based interface

Hi all I have installed a demo version of SCO OpenServer 5.0.2, I finally found it is Desktop Interface, I would like to know how to change its interface to dos based interface? If you have any ideas, please tell me then. Thank you (2 Replies)
Discussion started by: TinhNhi
2 Replies

6. IP Networking

Need a bridge from an ethernet interface to a serial interface

This is my situation DOS pc serial cable (sl0) Linux Pc eth1 192.168.0.10 <-------------------->192.168.0.2 <------------>192.168.0.1 (router) I connected the linux pc and the dos pc with a SLIP (serial line internet protocol), so they can communicate in the sl0 interface. ... (3 Replies)
Discussion started by: mghis
3 Replies

7. UNIX for Dummies Questions & Answers

Adding a network interface to a bonded interface

I have a RHEL 5 system with a bonded interface configure using only one network port (eth0). So I have config file for ifcfg-bond0 and ifcfg-eth. I'd like to configure eth5 to be the second SLAVE in the bond. My question is, after I modify ifcfg-eth5, can I add eth5 to the bond0 interface without... (1 Reply)
Discussion started by: westmoreland
1 Replies

8. Solaris

Haed code nxge0 nic interface with full duplex & 1000mbps

Hi All I would need to do hard code of nxge0 nic to full duplex & 1000mbps. So that whenever solaris server come up after reboot. it will show full duplex & 1000mbps setting only. Please also let me know how to do it online through command. regards (0 Replies)
Discussion started by: amity
0 Replies

9. Shell Programming and Scripting

Exclude certain file names while selectingData files coming in different names in a file name called

Data files coming in different names in a file name called process.txt. 1. shipments_yyyymmdd.gz 2 Order_yyyymmdd.gz 3. Invoice_yyyymmdd.gz 4. globalorder_yyyymmdd.gz The process needs to discard all the below files and only process two of the 4 file names available ... (1 Reply)
Discussion started by: dsravanam
1 Replies
RARPD(8)						      System Manager's Manual							  RARPD(8)

NAME
rarpd - reverse address resolution protocol daemon SYNOPSIS
rarpd [-d] DESCRIPTION
Rarpd listens on the ethernet for broadcast packets asking for reverse address resolution. These packets are sent by hosts at boot time to find out their IP address. Rarpd looks up the six octet ethernet number in the /etc/ethers file finding a host name. This name is trans- lated to the IP address of the host by a DNS lookup. The IP address is then sent to the host. Before rarpd can start its service it first finds out what the IP addresses of the ethernets are. It will look through /etc/ethers to map the ethernet addresses to host names. It then uses /etc/hosts to map the host names to IP addresses. If this lookup fails then several RARP requests are broadcasted in the hope that some RARP server knows the addresses. The IP addresses are eventually set in the same way as ifconfig(8). (The address is not changed if already set with ifconfig.) Note that the host names in the ethers and hosts files must match exactly. The DNS can not be used yet, so a simple name can't be translated to a fully qualified name. Rarpd exits after startup if there are no active ethernets, or if there is no ethers file. Warning! Sun diskless workstations assume that the first RARP server that answers is the host they are to boot from. For this to work all other Sun RARP servers delay their answer if they are not also the requestors boot server. The Minix rarpd does not have this kludge so it will happily engage the Sun boot server to see who can answer the client first. Unless your Minix host can actually serve a Sun diskless client, it is better not to list any more hosts in the ethers file than necessary. OPTIONS
-d Turns on debugging messages. Debugging can also be turned on at runtime by sending signal SIGUSR1 or turned off with SIGUSR2. SEE ALSO
ifconfig(8), ethers(5), hosts(5), set_net_default(8), boot(8), inetd(8), irdpd(8), nonamed(8). AUTHOR
Kees J. Bot (kjb@cs.vu.nl) RARPD(8)
All times are GMT -4. The time now is 08:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy