09-06-2002
ndd commands using function calls
Hi,
Is there any function calls available ( for using in a C program ) to get the Ethernet Link status. ?
I am looking for the status available from
ndd /dev/hme link_status
And how about plumbing and configuring an interface using C program ?
BTW, Is all this documented anywere ?
Thanks in Advance ...
10 More Discussions You Might Find Interesting
1. AIX
i want to replace the *alloc and free function calls in an existing project with my own functions, to be able to log the adresses etc in a text file. (memoryleak debugging)
I think LD_PRELOAD is what i am looking for.
That way i could create a Library with my own malloc functions and link them... (1 Reply)
Discussion started by: Lazzar
1 Replies
2. Solaris
Hi Guys,
I need help with ndd.
I was going through network FAQ but i have more questions then answers regarding ndd.
#ndd -set /dev/hme instance 0
#ndd -set /dev/hme adv_100fdx_cap 1
#ndd -set /dev/hme adv_100hdx_cap 0
#ndd -set /dev/hme adv_10fdx_cap 0
#ndd -set /dev/hme adv_10hdx_cap 0... (2 Replies)
Discussion started by: nitinkgoud
2 Replies
3. IP Networking
Is there any facility to filter/identify the data calls and voice calls coming throug modem?
OR
Can we get the data or voice calls information through a script(preferably C Kermit)? (0 Replies)
Discussion started by: pcsaji
0 Replies
4. Solaris
Hello Gurus
I would like to know more about ndd commands related to ethernet(NIC) like how to set link_status, link_speed & link_mode as I know how to check these value. And I also would like to know how to make these setting permanents after reboot as I know that these setting will vanish... (5 Replies)
Discussion started by: amity
5 Replies
5. Programming
Apart from writing debug and statements in constructors is there any way by which we can trace the function call stack at any depth?
The issue that we always face is that when program crashes (Web Server running on Linux) we have no idea where it crashes and we have to do the hard way of... (1 Reply)
Discussion started by: uunniixx
1 Replies
6. Solaris
Hi,
I would like to know whether there is any config file that i can refer to for the result of 'ndd -get /dev/tcp tcp_time_wait_interval'?
When i man 'ndd', there is one statement which is -> Each driver chooses which parameters to make visible using ndd. Does it answering my question above... (3 Replies)
Discussion started by: honmin
3 Replies
7. UNIX for Advanced & Expert Users
My understanding is when you see a man page command with a (3), is that this is a library call such as XSetScreenSaver(3) .. Sometimes these "calls" seem to do exactly what I need from a command. is there a way to access these calls from the terminal and just run them like a normal binary? How... (1 Reply)
Discussion started by: glev2005
1 Replies
8. Shell Programming and Scripting
Hello everyone,
here's my problem: I want to create two shell scripts. one of them should includes some functions, the other one just the function calls. Is this possible? Can i call a function which is placed in a scriptfile eg functions.sh out of another script eg call.sh? :confused: And if... (2 Replies)
Discussion started by: Sebi0815
2 Replies
9. Shell Programming and Scripting
Hi,
Here is my requirement.
Currently, there is a function which gets called in a for loop 2 times.
doCopy() {
cp /src/a*.jar /target/
cp /src/b*.jar /target/
cp /src/c*.jar /target
}
Since it is called sequentially from the for loop, I was asked to make parellel copy to... (7 Replies)
Discussion started by: kgsrinivas
7 Replies
10. UNIX for Advanced & Expert Users
I wonder if someone knows what is the rationale behind linking function calls of the POSIX threads library at link-time vs. run-time.
For example, if I create the following program:
#include <pthread.h>
void noop() {
return;
}
int main() {
pthread_self();
pthread_atfork(noop,... (1 Reply)
Discussion started by: jsimsa
1 Replies
LEARN ABOUT OPENSOLARIS
rge
rge(7D) Devices rge(7D)
NAME
rge - Realtek Gigabit/Fast Ethernet Network Adapter driver
SYNOPSIS
/dev/rge
DESCRIPTION
The rge Gigabit/Fast Ethernet driver is a multi-threaded, loadable, clonable, GLD-based STREAMS driver supporting the Data Link
Provider Interface, dlpi(7P), on the Realtek Gigabit/Fast Ethernet Network Adapter.
The rge driver functions includes controller initialization, frame transmit and receive, promiscuous and multicast support, and error
recovery and reporting.
APPLICATION PROGRAMMING INTERFACE
The cloning, character-special device /dev/rge is used to access all Realtek Gigabit/Fast Ethernet devices installed within the system.
The rge driver is managed by the dladm(1M) command line utility, which allows VLANs to be defined on top of rge instances and for rge
instances to be aggregated. See dladm(1M) for more details.
The values returned by the driver in the DL_INFO_ACK primitive in response to the DL_INFO_REQ are as follows:
o Maximum SDU (with jumbo frame) is 7000.
o Minimum SDU is 0.
o DSLAP address length is 8 bytes.
o MAC type is DL_ETHER.
o SAP length value is -2, meaning the physical address component is followed immediately by a 2-byte sap component within the
DLSAP address.
o Broadcast address value is Ethernet/IEEE broadcast address (FF:FF:FF:FF:FF:FF).
Once in the DL_ATTACHED state, you must send a DL_BIND_REQ to associate a particular Service Access Point (SAP) with the stream.
CONFIGURATION
By default, the rge driver performs auto-negotiation to select the link speed and mode. Link speed and mode can be any one of the follow-
ing:
o 1000 Mbps, full-duplex
o 100 Mbps, full-duplex
o 100 Mbps, half-duplex
o 10 Mbps, full-duplex
o 10 Mbps, half-duplex
Alternatively, you can set the capabilities advertised by the rge device using ndd(1M). The driver supports a number of parameters whose
names begin with adv_. Each of these parameters contains a boolean value that determines if the device advertises that mode of operation.
The adv_pause_cap indicates if half/full duplex pause is advertised to link partner. You can set adv_asym_pause_cap to advertise to the
link partner that asymmetric pause is desired.
For example, to prevent the device 'rge2' from advertising gigabit capabilities, enter (as super-user):
# ndd -set /dev/rge2 adv_1000fdx_cap 0
All capabilities default to enabled. Note that changing any capability parameter causes the link to go down while the link partners renego-
tiate the link speed/duplex using the newly changed capabilities.
You can find the current parameter settings by using ndd -get. In addition, the driver exports the current state, speed, duplex setting,
and working mode of the link via ndd parameters (these are read only and may not be changed). For example, to check link state of device
rge0:
# ndd -get /dev/rge0 link_status
1
# ndd -get /dev/rge0 link_speed
100
# ndd -get /dev/rge0 link_duplex
2
The output above indicates that the link is up and running at 100Mbps full-duplex. In addition, the driver exports its working mode by
loop_mode. If it is set to 0, the loopback mode is disabled.
FILES
/dev/rge* Character special device.
/kernel/drv/rge 32-bit x86 rge driver binary.
/kernel/drv/amd64/rge 64-bit x86 rge driver binary.
/kernel/drv/sparcv9/rge SPARC rge driver binary.
ATTRIBUTES
See attributes(5) for a description of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Architecture |SPARC, x86 |
+-----------------------------+-----------------------------+
SEE ALSO
dladm(1M), attributes(5), streamio(7I), dlpi(7P)
Writing Device Drivers
STREAMS Programming Guide
Network Interfaces Programmer's Guide
SunOS 5.11 21 Dec 2007 rge(7D)