Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

icmp(4p) [ultrix man page]

icmp(4p)																  icmp(4p)

Name
       icmp - Internet Control Message Protocol

Syntax
       #include <sys/socket.h>
       #include <netinet/in.h>

       s = socket(AF_INET, SOCK_RAW, proto);

Description
       The ICMP is the error and control message protocol used by the Internet Protocol (IP) transport layer and the Internet protocol family.	It
       can be accessed through a ``raw socket'' for network monitoring and diagnostic functions.  The proto argument to the socket call to  create
       an  ICMP  socket is obtained from the routine.  ICMP sockets are connectionless, and are normally used with the and system calls.  The call
       can also be used to fix the destination for future packets (in which case the or and or system calls can then be used).

       Outgoing packets automatically have an IP header prepended to them (based on the destination address).  Incoming packets are received  with
       the IP header and options intact.

Diagnostics
       On failure, a socket operation returns any of the following errors:

       [EISCONN]      Tried  to  establish a connection on a socket that already has one, or tried to send a datagram with the destination address
		      specified and the socket was already connected.

       [ENOTCONN]     Tried to send a datagram, but no destination address was specified, and the socket has not connected.

       [ENOBUFS]      The system ran out of memory for an internal data structure.

       [EADDRNOTAVAIL]
		      An attempt was made to create a socket with a network address for which no network interface exists.

See Also
       inet(4f), intro(4n), ip(4p)

																	  icmp(4p)

Check Out this Related Man Page

ip(4p)																	    ip(4p)

Name
       ip - Internet Protocol

Syntax
       #include <sys/socket.h>
       #include <netinet/in.h>

       s = socket(AF_INET, SOCK_RAW, 0);

Description
       The  IP	is the transport layer protocol used by the Internet protocol family.  It can be accessed through a ``raw socket'' when developing
       new protocols or special purpose applications.  IP sockets are connectionless and are normally used with the and calls.	The call, however,
       can also be used to fix the destination for future packets, in which case the or and or system calls can be used.

       Outgoing  packets automatically have an IP header prepended to them, based on the destination address and the protocol number the socket is
       created with.  Incoming packets are received with their IP headers and options intact.

Diagnostics
       On failure, a socket operation returns any of the following errors:

       [EISCONN]      Tried to establish a connection on a socket that already had one, or tried to send a datagram with the  destination  address
		      specified when the socket was already connected.

       [ENOTCONN]     Tried to send a datagram, but no destination address was specified and the socket was not connected.

       [ENOBUFS]      The system ran out of memory for an internal data structure.

       [EADDRNOTAVAIL]
		      Made an attempt to create a socket with a network address for which no network interface existed.

See Also
       send(2), recv(2), inet(4f), intro(4n), packetfilter(4)

																	    ip(4p)
Man Page

15 More Discussions You Might Find Interesting

1. IP Networking

socket

how to create a socket ? why to bind a socket? when we use a socket? (1 Reply)
Discussion started by: amin
1 Replies

2. IP Networking

icmp

how i can send the big icmp packets to the another ip for loose connection ....or how he can loose (1 Reply)
Discussion started by: seccom
1 Replies

3. UNIX for Dummies Questions & Answers

socket

hi everybody ! i want create server/clients in c++ anyone can give me i little exemple for send a string ? or give me a good site for explain. thx (1 Reply)
Discussion started by: mercutio
1 Replies

4. IP Networking

set the source IP address to zero

Hi, does anybody know how to set the IP source address of an IP packet to be zero? The problem is that when you create a raw socket and set the IP_HDRINCL socket option, if you put the ip_src address to zero (INADDR_ANY) the kernel will automatically set the source address to the primary IP address... (2 Replies)
Discussion started by: developer
2 Replies

5. IP Networking

socket options

Hello there The socket option IP_OPTIONS returns an integer value, supposed to be the contents of the IP header. Could you please help me out to interpret those values. ThankYou. (1 Reply)
Discussion started by: hufs375
1 Replies

6. IP Networking

socket address

Could anyone tell me please: -what the socket number of a network computer is? -How it is related to the IP address? -And how can I obtain this information from my work station? :D (2 Replies)
Discussion started by: fishman2001
2 Replies

7. UNIX for Dummies Questions & Answers

C socket

I have been serching for a guide to unix C network programming everywhere but I have found only some tuorials, very useful but a little bit poors. My question is if exist a network domain all over the world where C socket is treated with examples. Programs i have looked into is hard to... (4 Replies)
Discussion started by: Davide71
4 Replies

8. IP Networking

socket programming

my system is a stand alone system... i want to try doing socket porgramming..ihave heard that this is usually done during testing... how can i do that....? (6 Replies)
Discussion started by: damn_bkb
6 Replies

9. IP Networking

Obtaining IP address from both my network interface

HI folks, I am developing a software which one of the module is to interchange the ip address of another active network interface's when making a socket connection. I would like to know whether there is any function call that would enable me to retrieve the ip address that is obtained by a... (2 Replies)
Discussion started by: citiz3n
2 Replies

10. IP Networking

Ping ICMP

Hi All, How to disable ICMP time stamp request and time stamp reply of a machine? How to test this feature from remote machine? Please reply back Vasanth (2 Replies)
Discussion started by: vasanthan
2 Replies

11. UNIX for Dummies Questions & Answers

Log file for icmp requests

I'm not a unix expert so I need to ask what maybe a simple question to some. Is there a log file which records any icmp packets hitting the server? I ask, because I need to verify what the ip is from a server pinging mine. (3 Replies)
Discussion started by: numele
3 Replies

12. UNIX for Advanced & Expert Users

Ways to quickly check if you are connected to the internet while on an internal network

I need some help thinking of ways to quickly check if I am connected to the internet while on an internal network. I never lose connection to the internal network but for some annoying reason I lose the internet quite often. I don't get any errors or warnings. I usually find out that I have lost my... (2 Replies)
Discussion started by: cokedude
2 Replies

13. AIX

Directories getting 100% capacity

I am new to using AIX but ive ran into issues with 100% full and then rebooting and having a socket error repeating over and over. My question is, what can I do besides just monitoring to ensure I dont run into these issues? Scripts? anything? Thanks (3 Replies)
Discussion started by: terry.berger
3 Replies

14. Shell Programming and Scripting

ICMP for limited time

Hi, I am using following command: tcpdump -i eth1 icmp =8 >output.txt i want this command to get execute for a minute only. How can we do this? Thanks. Please use code tags next time for your code and data. Thanks (2 Replies)
Discussion started by: Satyajeet@uh
2 Replies

15. UNIX for Dummies Questions & Answers

Phantom Protocol Configuration File

I've been trying to set up the phantom protocol just to try it out. I compiled it fine, but when I ran it I got an error that the configuration file wouldn't load. I found that file didn't exist, so I created it with a blank file, but got this: ./phantom Loading configuration file... (4 Replies)
Discussion started by: Azrael
4 Replies