Your attention, please (specially Amos).

You are assumed to know about SNMPv1, specially about GetNextRequest-PDU
(rfc1157 ).

(Sorry for unformatted message, but Squid-Mail does nnot accept HTML
MIME )
On the Peer Table, just only for some columns

ACTUAL TABLE (SQUID-2)
==================================================================

cachePeerAddress cachePeerName  cachePortHttp    cachePeerPortIcp
10.0.0.99       blue            80               21
9.1.2.3         yellow          82               24
10.0.0.51       pink            86               19

SCENARIO :
---------

   The management station sends to the Squid-SNMP agent a
GetNextRequest-PDU
   containing the indicated OBJECT IDENTIFIER values as the requested
   variable names:

   GetNextRequest ( cachePeerAddress, cachePeerName, cachePortHttp,
cachePeerPortIcp )


   The Squid-SNMP agent responds with a GetResponse-PDU:

                 GetResponse (( cachePeerAddress.9.1.2.3 = "9.1.2.3" ),
                         ( cachePeerName.9.1.2.3 = "yellow" ),
                         ( cachePortHttp.9.1.2.3 = 82 ),
                         ( cacheICPPort.9.1.2.3 = 24 ))


   The management station continues with:

                 GetNextRequest ( cachePeerAddress.9.1.2.3,
                                cachePeerName.9.1.2.3,
                                cachePortHttp.9.1.2.3,
                                cacheICPPort.9.1.2.3 ) 

   The SNMP agent responds:

                 GetResponse (( cachePeerAddress.10.0.0.51 =
"10.0.0.51" ),
                         ( cachePeerName.10.0.0.51 = "pink" ),
                         ( cachePortHttp.10.0.0.51 = 86 ),
                         ( cacheICPPort.10.0.0.51 = 19 ))

   The management station continues with:

                 GetNextRequest ( cachePeerAddress.10.0.0.51,
                                cachePeerName.10.0.0.51,
                                cachePortHttp.10.0.0.51,
                                cacheICPPort.10.0.0.51 )

   The SNMP agent responds:

                 GetResponse (( cachePeerAddress.10.0.0.99 =
"10.0.0.99" ),
                         ( cachePeerName.10.0.0.99 = "blue" ),
                         ( cachePortHttp.10.0.0.99 = 80 ),
                         ( cacheICPPort.10.0.0.99 = 21 ))


                 GetResponse (( ipRouteDest. = "10.0.0.99" ),
                         ( ipRouteNextHop.10.0.0.99 = "89.1.1.42" ),
                         ( ipRouteMetric1.10.0.0.99 = 5 ))



PROPOSED NEW TABLE      (SQUID-3)
==================================================================

The new one would look like:


cachePeerAddress cachePeerName  cachePortHttp    cachePeerPortIcp
10.0.0.99               blue            80               21
2001:32ef:a221:fb32::1  yellow          82               24
10.0.0.51               pink            86               19


Routines engaged
================
1.- addr2oid.

How to encode an IPv6 addr into an OID (Object Identifier) ?
Encoding every byte in network order, let it be 4 or 16 .

IPv4 : ( d.d.d.d where every d is a byte, 0-255 0xFF)
10.0.0.99  
====>
10.0.0.99  

IPv6 : (every two hex-digits are a byte )
2001:32ef:a221:fb32::1  
=======>  (non abreviated form)
=======>  20:01:32:ef:a2:21:fb:32:00:00:00:00:00:00:00:00:OO:01
=======>  32.1.50.239.162.33.251.20.50.0.0.0.0.0.0.0.0.0.1


2.- oid2addr .
How to decode an OID into an IPv6 addr ?
Reverting step. You must know if an OID holds an IPv4 or IPv6 address.


Of course, we miss the visual representation of an IPv6 OID do noat
coincide with human readable notation (10.0.0.99) , but we can implement
a method to visualaze oid2human , missing now.

3) oi2human (missing).


SCENARIO :
---------

   GetNextRequest ( cachePeerAddress, cachePeerName, cachePortHttp,
cachePeerPortIcp )


   The Squid-SNMP agent responds with a GetResponse-PDU:

                 GetResponse (( cachePeerAddress.10.0.0.51 =
"10.0.0.51" ),
                         ( cachePeerName.10.0.0.51 = "pink" ),
                         ( cachePortHttp.10.0.0.51 = 86 ),
                         ( cacheICPPort.10.0.0.51 = 19 ))


   The management station continues with:

                 GetNextRequest ( cachePeerAddress.10.0.0.51,
                                cachePeerName.10.0.0.51,
                                cachePortHttp.10.0.0.51,
                                cacheICPPort.10.0.0.51 ) 

   The SNMP agent responds:

                 GetResponse (( cachePeerAddress.10.0.0.9  =
"10.0.0.99" ),
                         ( cachePeerName.10.0.0.99  = "blue" ),
                         ( cachePortHttp.10.0.0.99  = 80 ),
                         ( cacheICPPort.10.0.0.99  = 21 ))

   The management station continues with:

                 GetNextRequest ( cachePeerAddress.10.0.0.99,
                                cachePeerName.10.0.0.99,
                                cachePortHttp.10.0.0.99,
                                cacheICPPort.10.0.0.99 )

   The SNMP agent responds:

                 GetResponse
(( cachePeerAddress.32.1.50.239.162.33.251.20.50.0.0.0.0.0.0.0.0.0.1 =
"2001:32ef:a221:fb32::1" ),

( cachePeerName.32.1.50.239.162.33.251.20.50.0.0.0.0.0.0.0.0.0.1 =
"yellow" ),

( cachePortHttp.32.1.50.239.162.33.251.20.50.0.0.0.0.0.0.0.0.0.1 = 82 ),
                         ( 
cacheICPPort.32.1.50.239.162.33.251.20.50.0.0.0.0.0.0.0.0.0.1 =
24 ))

============================================================================================
============================================================================================
============================================================================================

If this rationale is OK for you, I will start to code and commit

============================================================================================
============================================================================================
============================================================================================


Reply via email to