Sponsored Content
Top Forums UNIX for Dummies Questions & Answers how to find out the systen and n/w charecteristics by writing codes in c Post 302171952 by jeenat on Saturday 1st of March 2008 09:09:18 AM
Old 03-01-2008
how to find out the systen and n/w charecteristics by writing codes in c

a project is given to me in which i have to find out the system and n/w charecteristics by writing codes in c but i cant use the commands.
n/w charecteristics means:

Network Adapter Related Information:
a. Number of network adapters
b. Type of the Adapter: LAN (Ethernet, Token Ring, FDDI), WAN (X.25,
ATM, etc)
c. Interface Name
d. Interface Index
e. Speed/Rate (100Mbps, 1000Mbps, 255Mbps, etc)
f. Maximum Transmission Unit (Packet sizes in the network)
g. Transmitted Packets per port and interval
h. Received Packets per port and interval
i. Erroneous Packets per port and interval
j. Average Network Utilization
Network Protocol Related Information: The protocols currently that could be assumed are IP, ICMP,
TCP, and UDP.
IP:
a. Input and Output packets per interval
b. Total input and output packets
c. Error packets discarded
ICMP:
a. Input packets received
b. Failed ICMP input packets
c. Output packets sent
d. Failed ICMP output packets
TCP:
a. Active number of connections
b. Connection Local address, port number
c. Connection destination address, port number
d. Type of application (if any): ssh, telnet, rsh
e. Per connection packets transmitted, received, rejected, or error
f. Per connection pending packets in send-queue or receive-queue
UDP:
a. Connection Local address, port number
b. Connection destination address, port number
c. Packets sent, received, or error

and system charecteristics like

The analysis of software components in the system can be attributed directly to the processes running in
the system. Process characteristics needed are:
a. Number of Processes running in the system
b. Number of Zombie Processes in the system
c. Details of each of the processes:
d. Process Name,
e. Process Class (Time sharing class, real-time class, etc.),
f. Process State (sleeping, running, waiting for IO, etc),
g. Process Priority,
h. % of CPU Used
i. CPU Time used by the process in User, Kernel
j. Number of file descriptors opened by the process
k. Listing of Opened files, sockets, pipes, devices
l. Virtual address map of the libraries, files
m. Signals pending, blocked on the process
n. Stack trace of the process or threads


The above characteristics should be defined as private MIBs (following SNMP protocol). The intelligent
agent should be SNMPv3 compliant.



I badly need some help as im new 2 linux,mib,snmp everythng...

plzzzzzzzzzzz help me...
 

10 More Discussions You Might Find Interesting

1. Programming

How to get Key codes

Hi Experts, I like to get the Key codes of the keys in the Keyboard while I press it. Its something like scan code. I want to know which key had been pressed. Can anyone fine me a solution for this using C. Regards Anent (12 Replies)
Discussion started by: anent
12 Replies

2. UNIX for Dummies Questions & Answers

Writing "find" code in C

I've got a project that writing "find" C code in solaris. That is finding a file in current and sub directories. While I am looking for some example on the book for two days, but I have no idea where to start. I think I need to use recursion, but is it true? I am still a Unix... (2 Replies)
Discussion started by: SQ4LIFE
2 Replies

3. UNIX for Dummies Questions & Answers

Where can I find a list of exit codes? (Exit code 64)

I'm receiving an exit code 64 in our batch scheduler (BMC product control-m) executing a PERL script on UX-HP. Can you tell me where I can find a list of exit codes and their meaning. I'm assuming the exit code is from the Unix operating system not PERL. (3 Replies)
Discussion started by: jkuchar747
3 Replies

4. UNIX for Advanced & Expert Users

Return Codes

I have a simple script which renames a file.How do i capture the return code of the script if the script fails (3 Replies)
Discussion started by: kris01752
3 Replies

5. AIX

Warning codes

Dear Experts, i am very to AIX when i am trying to compile my code i am getting two warning several times like 1540-0053 (W) The declaration of a class member within the class definition must not be qualified. "/usr/include/alloca.h", line 34.9: 1540-1401 (I) An unknown "pragma __alloca" is... (1 Reply)
Discussion started by: vin_pll
1 Replies

6. UNIX for Dummies Questions & Answers

Help writing a script to find a file

I just started learning about Unix and I cant figure out what im doing wrong. I'm trying to write a script that will ask for the file name and tell what type it is. This is what i have so far. http://i63.photobucket.com/albums/h123/wacand/untitled.jpg (2 Replies)
Discussion started by: wacand
2 Replies

7. Shell Programming and Scripting

writing shell script to find line of invalid characters

Hi, I have to write s script to check an input file for invalid characters. In this script I have to find the exact line of the invalid character. If the input file contain 2 invalid character sat line 10 and 17, the script will show the value 10 and 17. Any help is appreciated. (3 Replies)
Discussion started by: beginner82
3 Replies

8. Shell Programming and Scripting

Help in writing a find/replace script using awk

Hi All, I need to write a script that will go through 600+ files and perform find and replace. I was going to use sed but there is a level of complexity that is doing my head in. To explain: I have 600+ files that have a line in them that reads (for example) FILE=DCLCLHST... (4 Replies)
Discussion started by: Kocko
4 Replies

9. Shell Programming and Scripting

how to find a job which is writing a big file and eating up space?

how to find a job which is writing a big file and eating up space? (3 Replies)
Discussion started by: rush2andy
3 Replies

10. Shell Programming and Scripting

Need some help writing a find script

hello all! well, here is my problem: i have to write a script which waits for a directory as an argument and scans it recuresively and than it prints those files, which have write permission for everyone (as relative path from the argument directory so the find will be the key). and it shouldnt... (9 Replies)
Discussion started by: Mixe3y
9 Replies
udp(7P) 							     Protocols								   udp(7P)

NAME
udp, UDP - Internet User Datagram Protocol SYNOPSIS
#include <sys/socket.h> #include <netinet/in.h> s = socket(AF_INET, SOCK_DGRAM, 0); s = socket(AF_INET6, SOCK_DGRAM, 0); t = t_open("/dev/udp", O_RDWR); t = t_open("/dev/udp6", O_RDWR); DESCRIPTION
UDP is a simple datagram protocol which is layered directly above the Internet Protocol ("IP") or the Internet Protocol Version 6 ("IPv6"). Programs may access UDP using the socket interface, where it supports the SOCK_DGRAM socket type, or using the Transport Level Interface ("TLI"), where it supports the connectionless (T_CLTS) service type. Within the socket interface, UDP is normally used with the sendto(), sendmsg(), recvfrom(), and recvmsg() calls (see send(3SOCKET) and recv(3SOCKET)). If the connect(3SOCKET) call is used to fix the destination for future packets, then the recv(3SOCKET) or read(2) and send(3SOCKET) or write(2) calls may be used. UDP address formats are identical to those used by the Transmission Control Protocol ("TCP"). Like TCP, UDP uses a port number along with an IPor IPv6 address to identify the endpoint of communication. The UDP port number space is separate from the TCP port number space, that is, a UDP port may not be "connected" to a TCP port. The bind(3SOCKET) call can be used to set the local address and port number of a UDP socket. The local IP or IPv6 address may be left unspecified in the bind() call by using the special value INADDR_ANY for IP, or the unspecified address (all zeroes) for IPv6. If the bind() call is not done, a local IP or IPv6 address and port number will be assigned to the endpoint when the first packet is sent. Broadcast packets may be sent, assuming the underlying network supports this, by using a reserved "broadcast address" This address is network interface dependent. Broadcasts may only be sent by the privileged user. Note that no two UDP sockets can be bound to the same port unless the bound IP addresses are different. IPv4 INADDR_ANY and IPv6 unspeci- fied addresses compare as equal to any IPv4 or IPv6 address. For example, if a socket is bound to INADDR_ANY or unspecified address and port X, no other socket can bind to port X, regardless of the binding address. This special consideration of INADDR_ANY and unspecified address can be changed using the SO_REUSEADDR socket option. If SO_REUSEADDR is set on a socket doing a bind, IPv4 INADDR_ANY and IPv6 unspecified address do not compare as equal to any IP address. This means that as long as the two sockets are not both bound to INADDR_ANY/unspecified address or the same IP address, the two sockets can be bound to the same port. If an application does not want to allow another socket using the SO_REUSEADDR option to bind to a port its socket is bound to, the appli- cation can set the socket level option SO_EXCLBIND on a socket. The option values of 0 and 1 represent enabling and disabling the option, respectively. Once this option is enabled on a socket, no other socket can be bound to the same port. IPv6 does not support broadcast addresses; their function is supported by IPv6 multicast addresses. Options at the IP level may be used with UDP. See ip(7P) or ip6(7P). Additionally, there is one UDP-level option of interest to IPsec Key Management applications (see ipsec(7P)and pf_key(7P)): UDP_NAT_T_ENDPOINT If this boolean option is set, datagrams sent via this socket will have a non-ESP marker inserted between the UDP header and the data. Likewise, inbound packets that match the endpoint's local-port will be demultiplexed between ESP or the endpoint itself if a non-ESP marker is present. This option is only available on IPv4 sockets (AF_INET), and the application must have sufficient privilege to use PF_KEY sockets to also enable this option. There are a variety of ways that a UDP packet can be lost or corrupted, including a failure of the underlying communication mechanism. UDP implements a checksum over the data portion of the packet. If the checksum of a received packet is in error, the packet will be dropped with no indication given to the user. A queue of received packets is provided for each UDP socket. This queue has a limited capacity. Arriving datagrams which will not fit within its high-water capacity are silently discarded. UDP processes Internet Control Message Protocol ("ICMP") and Internet Control Message Protocol Version 6 ("ICMP6") error messages received in response to UDP packets it has sent. See icmp(7P) and icmp6(7P). ICMP "source quench" messages are ignored. ICMP "destination unreachable," "time exceeded" and "parameter problem" messages disconnect the socket from its peer so that subsequent attempts to send packets using that socket will return an error. UDP will not guarantee that pack- ets are delivered in the order they were sent. As well, duplicate packets may be generated in the communication process. ICMP6 "destination unreachable" packets are ignored unless the enclosed code indicates that the port is not in use on the target host, in which case, the application is notified. ICMP6 "parameter problem" notifications are similarly passed upstream. All other ICMP6 messages are ignored. SEE ALSO
read(2), write(2), bind(3SOCKET), connect(3SOCKET), recv(3SOCKET), send(3SOCKET), icmp(7P), icmp6(7P), inet(7P), inet6(7P), ip(7P), ipsec(7P), ip6(7P), pf_key(7P), tcp(7P) Postel, Jon, RFC 768, User Datagram Protocol, Network Information Center, SRI International, Menlo Park, Calif., August 1980 Huttunen, A., Swander, B., Volpe, V., DiBurro, L., Stenberg, M., RFC 3948, UDP Encapsulation of IPsec ESP Packets, The Internet Society, 2005. DIAGNOSTICS
A socket operation may fail if: EISCONN A connect() operation was attempted on a socket on which a connect() operation had already been performed, and the socket could not be successfully disconnected before making the new connection. EISCONN A sendto() or sendmsg() operation specifying an address to which the message should be sent was attempted on a socket on which a connect() operation had already been performed. ENOTCONN A send() or write() operation, or a sendto() or sendmsg() operation not specifying an address to which the message should be sent, was attempted on a socket on which a connect() operation had not already been performed. EADDRINUSE A bind() operation was attempted on a socket with a network address/port pair that has already been bound to another socket. EADDRNOTAVAIL A bind() operation was attempted on a socket with a network address for which no network interface exists. EINVAL A sendmsg() operation with a non-NULL msg_accrights was attempted. EACCES A bind() operation was attempted with a "reserved" port number and the effective user ID of the process was not the privi- leged user. ENOBUFS The system ran out of memory for internal data structures. SunOS 5.11 4 July 2006 udp(7P)
All times are GMT -4. The time now is 11:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy