>>>>> On Tue, 7 Sep 2010 11:22:08 -0700, Stephen Hemminger 
>>>>> <shemmin...@vyatta.com> said:

SH> I have fix to make it keep overrides. But I did not implement
SH> setting kernel ifalias because on most systems snmpd runs as
SH> non-root (no cap_netadmin) and is therefore not allowed to set the
SH> value in sysfs (or via netlink).

Then we should probably discuss if you SET the ifAlias then snmpd simply
reports that value back in the future, regardless of what the kernel
might report through other ways.  EG an alias would be:

1) the last value set for that interface
2) the super-cool string created from kernel info (from the patch) if possible
3) an empty string

This is sort of what the ifalias object text should happen.  IE, a
Network Manager (NM) should be able to set the value and it's really up to
the NM to decide what should be in the field.

[in fact, it's probably questionable as to whether the patch is legal in
the first place since it says it should be a zero-length string until
set]

IF-MIB::ifAlias
ifAlias OBJECT-TYPE
  -- FROM       IF-MIB
  -- TEXTUAL CONVENTION DisplayString
  SYNTAX        OCTET STRING (0..64) 
  DISPLAY-HINT  "255a"
  MAX-ACCESS    read-write
  STATUS        current
  DESCRIPTION   "This object is an 'alias' name for the interface as
            specified by a network manager, and provides a non-volatile
            'handle' for the interface.

            On the first instantiation of an interface, the value of
            ifAlias associated with that interface is the zero-length
            string.  As and when a value is written into an instance of
            ifAlias through a network management set operation, then the
            agent must retain the supplied value in the ifAlias instance
            associated with the same interface for as long as that
            interface remains instantiated, including across all re-
            initializations/reboots of the network management system,
            including those which result in a change of the interface's
            ifIndex value.

            An example of the value which a network manager might store
            in this object for a WAN interface is the (Telco's) circuit
            number/identifier of the interface.

            Some agents may support write-access only for interfaces
            having particular values of ifType.  An agent which supports
            write access to this object is required to keep the value in
            non-volatile storage, but it may limit the length of new
            values depending on how much storage is already occupied by
            the current values for other interfaces."
::= { iso(1) org(3) dod(6) internet(1) mgmt(2) mib-2(1) ifMIB(31) 
ifMIBObjects(1) ifXTable(1) ifXEntry(1) 18 }

-- 
Wes Hardaker
Please mail all replies to net-snmp-coders@lists.sourceforge.net

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to