modify icmp

othe

New Member


Messages: 14

i want to enter two more fields in the icmp packet so as to send some extra information that i can decide. i suppose it is more easy to enter them at the end of the packet.can anyone knows how to do this?i was thinking of someone making a icmp question like traceroute and the other will reply with time exceeded and the extra field. there is and some new rfc 4884 that indicates the icmp extension but it isnt implemented yet by anyone
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 8,741
Messages: 33,023

What kind of extra information do you want?
 
OP
O

othe

New Member


Messages: 14

i want to put two extra float numbers to send. for example the temperature of the cpu, or the location of the host. i can read this information from a a file and send it with the icmp.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 8,741
Messages: 33,023

ICMP is not meant for this. Look into SNMP.
 

mk

Well-Known Member

Reaction score: 20
Messages: 300

snmp or similar tool wouldn't be more suitable for the job?
 
OP
O

othe

New Member


Messages: 14

like what? what do you suggest? i want a way to find the temperature or the location of the host because some times the ip doesnt give the correct information about the location.
 

DutchDaemon

Administrator
Staff member
Administrator
Moderator
Developer

Reaction score: 2,916
Messages: 11,335

SNMP is used to query a host about just about everything, including disk usage, network stats, running programs, motherboard stuff (like temp). You can add alerts or actions to values (snmp traps). Apps like Cacti or Nagios can do the leg work for you and produce monitoring statistics, sanity overview pages, etc.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 8,741
Messages: 33,023

You seem to misunderstand what ICMP is used for.

Internet Control Message Protocol is part of the Internet Protocol Suite as defined in RFC 792. ICMP messages are typically generated in response to errors in IP datagrams (as specified in RFC 1122) or for diagnostic or routing purposes.
http://en.wikipedia.org/wiki/Internet_Control_Message_Protocol

Getting location data and/or temperature readings is NOT part of it's usage.

The information you want can be gathered using SNMP, that's the protocol used to get information like that.

http://en.wikipedia.org/wiki/Snmp
 
OP
O

othe

New Member


Messages: 14

SirDice said:
You seem to misunderstand what ICMP is used for.


http://en.wikipedia.org/wiki/Internet_Control_Message_Protocol

Getting location data and/or temperature readings is NOT part of it's usage.

The information you want can be gathered using SNMP, that's the protocol used to get information like that.

http://en.wikipedia.org/wiki/Snmp
you are correct on what you are saying. i found the rfc 4884 that says

This document redefines selected ICMPv4 [RFC0792] and ICMPv6
[RFC4443] messages to include an extension structure and a length
attribute. The extension structure supports multi-part ICMP
operation. Protocol designers can make an ICMP message carry
additional information by encoding that information in the extension structure.

do you know about it?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 8,741
Messages: 33,023

I didn't know about RFC-4884 specifically but the additions you want will never be included. ICMP is about control messages to aid in diagnostics and routing problems within the IP protocol itself. RFC-4884 talks about extending the 'normal' ICMP packages to include more information that wouldn't normally fit inside a regular ICMP package. It does not extend the ICMP protocol to include things like temperature readings or location information.

SNMP was specifically designed for that purpose, to monitor equipment and get information like location and temperature.
 

mk

Well-Known Member

Reaction score: 20
Messages: 300

othe said:
do you know about it?
1. icmp isnt that much secure to send server info using it - today you send cpu temp in 12 monts you got so comfy that you send your ssh keys over it.
2. why shoud i brain damage myself in conding/recoding/testing/debuging when somewhere, someone is filtering icmp?
3. what will happen if you deploy it over 100 machines?
4. if you think about it - then the chances that is already invented/implemented are big
5. doest the benefit of this project worth it's consumed resources?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 8,741
Messages: 33,023

6. Temperature and physical location have nothing to do with diagnosing problems with IP, hence ICMP is not the place to do it.
 

vivek

Aspiring Daemon

Reaction score: 196
Messages: 805

Why reinvent wheel? SNMP does the same more securely and easily.
 
OP
O

othe

New Member


Messages: 14

on what you are saying you are right. but it is a project for my school and just using snmp is very easy. and making the rfc 4884 from scratch it will be more harder thats why i want just to put more bytes to icmp to do my job
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 8,741
Messages: 33,023

As I said, RFC4884 is for extending existing ICMP control messages.
 

DutchDaemon

Administrator
Staff member
Administrator
Moderator
Developer

Reaction score: 2,916
Messages: 11,335

Is this a correct graphical representation of what you want?

 
OP
O

othe

New Member


Messages: 14

othe said:
wouldnt be more easy to just extend the existed icmp?
as you can probably see , this is my first time i do this thats why i dont know exactly how to do it. i read now the code of icmp how it is implemented.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 8,741
Messages: 33,023

Why not just create your own service? If it's a school project I'm sure this wouldn't be a problem.
 
OP
O

othe

New Member


Messages: 14

what do you mean? i want to do something more professional . as you being more pro than me what do you suggest? i thought that modifying the icmp would be a different thing to do
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 8,741
Messages: 33,023

Being professional means not raping a protocol that's not meant to do this stuff.

Search for socket programming tutorial, there's a whole bunch to be found on how to set up a service and accompanied client. Create something that listens on a port and serves the values you want. Create a client that's able to connect to it and get those values.
 
Top