...
 
Commits (2)
......@@ -14,7 +14,7 @@ IMPORTS
libvirtMIB MODULE-IDENTITY
LAST-UPDATED "201012020000Z"
LAST-UPDATED "201803200000Z"
ORGANIZATION "www.libvirt.org"
CONTACT-INFO
"email: libvirt-users@redhat.com
......@@ -22,10 +22,11 @@ libvirtMIB MODULE-IDENTITY
DESCRIPTION
"First draft, for experimental purposes only!
Not to be used in real deployment!"
REVISION "201803200000Z"
DESCRIPTION "Updated OID"
REVISION "201012020000Z"
DESCRIPTION "Initial version."
::= { enterprises 12345 }
-- TODO: user real libvirt OID here ^
::= { enterprises 36957 }
-- structure advised by RFC 4181:
......
......@@ -11,7 +11,7 @@
## If you do, it is likely to break lots of generated code that
## you will have to fix.
##
## @eval $m2c_decl = U64@
## @eval $m2c_decl = "struct counter64"@
##
########################################################################
## Generate/use mapping functions? Useful if the MIB defines
......
......@@ -587,14 +587,14 @@ Table / column details
/*
* LIBVIRT-MIB::libvirtGuestTable is subid 1 of libvirtObjects.
* Its status is Current.
* OID: .1.3.6.1.4.1.12345.1.1, length: 9
* OID: .1.3.6.1.4.1.36957.1.1, length: 9
*/
/*---------------------------------------------------------------------
* LIBVIRT-MIB::libvirtGuestEntry.libvirtGuestUUID
* libvirtGuestUUID is subid 1 of libvirtGuestEntry.
* Its status is Current, and its access level is NoAccess.
* OID: .1.3.6.1.4.1.12345.1.1.1.1
* OID: .1.3.6.1.4.1.36957.1.1.1.1
* Description:
The UUID of the virtual guest.
*
......@@ -620,7 +620,7 @@ The UUID of the virtual guest.
* LIBVIRT-MIB::libvirtGuestEntry.libvirtGuestName
* libvirtGuestName is subid 2 of libvirtGuestEntry.
* Its status is Current, and its access level is ReadOnly.
* OID: .1.3.6.1.4.1.12345.1.1.1.2
* OID: .1.3.6.1.4.1.36957.1.1.1.2
* Description:
Name of active virtual guest.
*
......@@ -638,7 +638,7 @@ Name of active virtual guest.
* LIBVIRT-MIB::libvirtGuestEntry.libvirtGuestState
* libvirtGuestState is subid 3 of libvirtGuestEntry.
* Its status is Current, and its access level is Create.
* OID: .1.3.6.1.4.1.12345.1.1.1.3
* OID: .1.3.6.1.4.1.36957.1.1.1.3
* Description:
Current state of the active guest.
*
......@@ -656,7 +656,7 @@ Current state of the active guest.
* LIBVIRT-MIB::libvirtGuestEntry.libvirtGuestCpuCount
* libvirtGuestCpuCount is subid 4 of libvirtGuestEntry.
* Its status is Current, and its access level is ReadOnly.
* OID: .1.3.6.1.4.1.12345.1.1.1.4
* OID: .1.3.6.1.4.1.36957.1.1.1.4
* Description:
Number of virtual CPUs the virtual guest uses.
*
......@@ -674,7 +674,7 @@ Number of virtual CPUs the virtual guest uses.
* LIBVIRT-MIB::libvirtGuestEntry.libvirtGuestMemoryCurrent
* libvirtGuestMemoryCurrent is subid 5 of libvirtGuestEntry.
* Its status is Current, and its access level is ReadOnly.
* OID: .1.3.6.1.4.1.12345.1.1.1.5
* OID: .1.3.6.1.4.1.36957.1.1.1.5
* Description:
Current amount of memory (in MiB) used by the virtual guest.
*
......@@ -692,7 +692,7 @@ Current amount of memory (in MiB) used by the virtual guest.
* LIBVIRT-MIB::libvirtGuestEntry.libvirtGuestMemoryLimit
* libvirtGuestMemoryLimit is subid 6 of libvirtGuestEntry.
* Its status is Current, and its access level is ReadOnly.
* OID: .1.3.6.1.4.1.12345.1.1.1.6
* OID: .1.3.6.1.4.1.36957.1.1.1.6
* Description:
The maximum amount of memory (in MiB) that can be used by the virtual
guest.
......@@ -711,7 +711,7 @@ The maximum amount of memory (in MiB) that can be used by the virtual
* LIBVIRT-MIB::libvirtGuestEntry.libvirtGuestCpuTime
* libvirtGuestCpuTime is subid 7 of libvirtGuestEntry.
* Its status is Current, and its access level is ReadOnly.
* OID: .1.3.6.1.4.1.12345.1.1.1.7
* OID: .1.3.6.1.4.1.36957.1.1.1.7
* Description:
The CPU time used by the virtual guest, in nanoseconds.
*
......@@ -722,13 +722,13 @@ The CPU time used by the virtual guest, in nanoseconds.
*
*
* Its syntax is COUNTER64 (based on perltype COUNTER64)
* The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64)
* The net-snmp type is ASN_COUNTER64. The C type decl is struct counter64.
*/
/*---------------------------------------------------------------------
* LIBVIRT-MIB::libvirtGuestEntry.libvirtGuestRowStatus
* libvirtGuestRowStatus is subid 9 of libvirtGuestEntry.
* Its status is Current, and its access level is Create.
* OID: .1.3.6.1.4.1.12345.1.1.1.9
* OID: .1.3.6.1.4.1.36957.1.1.1.9
* Description:
Status of the virtual guest.
......
......@@ -68,7 +68,7 @@ void shutdown_libvirtGuestTable(void);
/*
* LIBVIRT-MIB::libvirtGuestTable is subid 1 of libvirtObjects.
* Its status is Current.
* OID: .1.3.6.1.4.1.12345.1.1, length: 9
* OID: .1.3.6.1.4.1.36957.1.1, length: 9
*/
/* *********************************************************************
* When you register your mib, you get to provide a generic
......@@ -119,9 +119,9 @@ typedef struct libvirtGuestTable_data_s {
u_long libvirtGuestMemoryLimit;
/*
* libvirtGuestCpuTime(7)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h
* libvirtGuestCpuTime(7)/COUNTER64/ASN_COUNTER64/struct counter64//l/A/w/e/r/d/h
*/
U64 libvirtGuestCpuTime;
struct counter64 libvirtGuestCpuTime;
/*
* libvirtGuestRowStatus(9)/RowStatus/ASN_INTEGER/long(u_long)//l/A/W/E/r/d/h
......
......@@ -51,7 +51,7 @@
/*
* LIBVIRT-MIB::libvirtGuestTable is subid 1 of libvirtObjects.
* Its status is Current.
* OID: .1.3.6.1.4.1.12345.1.1, length: 9
* OID: .1.3.6.1.4.1.36957.1.1, length: 9
*/
/**
......@@ -291,7 +291,7 @@ libvirtGuestTable_row_prep( libvirtGuestTable_rowreq_ctx *rowreq_ctx)
* LIBVIRT-MIB::libvirtGuestEntry.libvirtGuestUUID
* libvirtGuestUUID is subid 1 of libvirtGuestEntry.
* Its status is Current, and its access level is NoAccess.
* OID: .1.3.6.1.4.1.12345.1.1.1.1
* OID: .1.3.6.1.4.1.36957.1.1.1.1
* Description:
The UUID of the virtual guest.
*
......
......@@ -45,7 +45,7 @@ extern "C" {
/*
* LIBVIRT-MIB::libvirtGuestTable is subid 1 of libvirtObjects.
* Its status is Current.
* OID: .1.3.6.1.4.1.12345.1.1, length: 9
* OID: .1.3.6.1.4.1.36957.1.1, length: 9
*/
......
......@@ -50,7 +50,7 @@
/*
* LIBVIRT-MIB::libvirtGuestTable is subid 1 of libvirtObjects.
* Its status is Current.
* OID: .1.3.6.1.4.1.12345.1.1, length: 9
* OID: .1.3.6.1.4.1.36957.1.1, length: 9
*/
/* ---------------------------------------------------------------------
......@@ -134,7 +134,7 @@ libvirtGuestTable_indexes_set(libvirtGuestTable_rowreq_ctx *rowreq_ctx, char *li
* LIBVIRT-MIB::libvirtGuestEntry.libvirtGuestName
* libvirtGuestName is subid 2 of libvirtGuestEntry.
* Its status is Current, and its access level is ReadOnly.
* OID: .1.3.6.1.4.1.12345.1.1.1.2
* OID: .1.3.6.1.4.1.36957.1.1.1.2
* Description:
Name of active virtual guest.
*
......@@ -222,7 +222,7 @@ libvirtGuestName_get( libvirtGuestTable_rowreq_ctx *rowreq_ctx, char **libvirtGu
* LIBVIRT-MIB::libvirtGuestEntry.libvirtGuestState
* libvirtGuestState is subid 3 of libvirtGuestEntry.
* Its status is Current, and its access level is Create.
* OID: .1.3.6.1.4.1.12345.1.1.1.3
* OID: .1.3.6.1.4.1.36957.1.1.1.3
* Description:
Current state of the active guest.
*
......@@ -274,7 +274,7 @@ libvirtGuestState_get( libvirtGuestTable_rowreq_ctx *rowreq_ctx, u_long * libvir
* LIBVIRT-MIB::libvirtGuestEntry.libvirtGuestCpuCount
* libvirtGuestCpuCount is subid 4 of libvirtGuestEntry.
* Its status is Current, and its access level is ReadOnly.
* OID: .1.3.6.1.4.1.12345.1.1.1.4
* OID: .1.3.6.1.4.1.36957.1.1.1.4
* Description:
Number of virtual CPUs the virtual guest uses.
*
......@@ -326,7 +326,7 @@ libvirtGuestCpuCount_get( libvirtGuestTable_rowreq_ctx *rowreq_ctx, u_long * lib
* LIBVIRT-MIB::libvirtGuestEntry.libvirtGuestMemoryCurrent
* libvirtGuestMemoryCurrent is subid 5 of libvirtGuestEntry.
* Its status is Current, and its access level is ReadOnly.
* OID: .1.3.6.1.4.1.12345.1.1.1.5
* OID: .1.3.6.1.4.1.36957.1.1.1.5
* Description:
Current amount of memory (in MiB) used by the virtual guest.
*
......@@ -378,7 +378,7 @@ libvirtGuestMemoryCurrent_get( libvirtGuestTable_rowreq_ctx *rowreq_ctx, u_long
* LIBVIRT-MIB::libvirtGuestEntry.libvirtGuestMemoryLimit
* libvirtGuestMemoryLimit is subid 6 of libvirtGuestEntry.
* Its status is Current, and its access level is ReadOnly.
* OID: .1.3.6.1.4.1.12345.1.1.1.6
* OID: .1.3.6.1.4.1.36957.1.1.1.6
* Description:
The maximum amount of memory (in MiB) that can be used by the virtual
guest.
......@@ -431,7 +431,7 @@ libvirtGuestMemoryLimit_get( libvirtGuestTable_rowreq_ctx *rowreq_ctx, u_long *
* LIBVIRT-MIB::libvirtGuestEntry.libvirtGuestCpuTime
* libvirtGuestCpuTime is subid 7 of libvirtGuestEntry.
* Its status is Current, and its access level is ReadOnly.
* OID: .1.3.6.1.4.1.12345.1.1.1.7
* OID: .1.3.6.1.4.1.36957.1.1.1.7
* Description:
The CPU time used by the virtual guest, in nanoseconds.
*
......@@ -442,7 +442,7 @@ The CPU time used by the virtual guest, in nanoseconds.
*
*
* Its syntax is COUNTER64 (based on perltype COUNTER64)
* The net-snmp type is ASN_COUNTER64. The C type decl is U64 (U64)
* The net-snmp type is ASN_COUNTER64. The C type decl is struct counter64.
*/
/**
* Extract the current value of the libvirtGuestCpuTime data.
......@@ -452,14 +452,14 @@ The CPU time used by the virtual guest, in nanoseconds.
* @param rowreq_ctx
* Pointer to the row request context.
* @param libvirtGuestCpuTime_val_ptr
* Pointer to storage for a U64 variable
* Pointer to storage for a struct counter64 variable
*
* @retval MFD_SUCCESS : success
* @retval MFD_SKIP : skip this node (no value for now)
* @retval MFD_ERROR : Any other error
*/
int
libvirtGuestCpuTime_get( libvirtGuestTable_rowreq_ctx *rowreq_ctx, U64 * libvirtGuestCpuTime_val_ptr )
libvirtGuestCpuTime_get( libvirtGuestTable_rowreq_ctx *rowreq_ctx, struct counter64 * libvirtGuestCpuTime_val_ptr )
{
/** we should have a non-NULL pointer */
netsnmp_assert( NULL != libvirtGuestCpuTime_val_ptr );
......@@ -479,7 +479,7 @@ libvirtGuestCpuTime_get( libvirtGuestTable_rowreq_ctx *rowreq_ctx, U64 * libvirt
* LIBVIRT-MIB::libvirtGuestEntry.libvirtGuestRowStatus
* libvirtGuestRowStatus is subid 9 of libvirtGuestEntry.
* Its status is Current, and its access level is Create.
* OID: .1.3.6.1.4.1.12345.1.1.1.9
* OID: .1.3.6.1.4.1.36957.1.1.1.9
* Description:
Status of the virtual guest.
......
......@@ -44,7 +44,7 @@ extern "C" {
/*
* LIBVIRT-MIB::libvirtGuestTable is subid 1 of libvirtObjects.
* Its status is Current.
* OID: .1.3.6.1.4.1.12345.1.1, length: 9
* OID: .1.3.6.1.4.1.36957.1.1, length: 9
*/
/*
* indexes
......@@ -55,7 +55,7 @@ extern "C" {
int libvirtGuestCpuCount_get( libvirtGuestTable_rowreq_ctx *rowreq_ctx, u_long * libvirtGuestCpuCount_val_ptr );
int libvirtGuestMemoryCurrent_get( libvirtGuestTable_rowreq_ctx *rowreq_ctx, u_long * libvirtGuestMemoryCurrent_val_ptr );
int libvirtGuestMemoryLimit_get( libvirtGuestTable_rowreq_ctx *rowreq_ctx, u_long * libvirtGuestMemoryLimit_val_ptr );
int libvirtGuestCpuTime_get( libvirtGuestTable_rowreq_ctx *rowreq_ctx, U64 * libvirtGuestCpuTime_val_ptr );
int libvirtGuestCpuTime_get( libvirtGuestTable_rowreq_ctx *rowreq_ctx, struct counter64 * libvirtGuestCpuTime_val_ptr );
int libvirtGuestRowStatus_get( libvirtGuestTable_rowreq_ctx *rowreq_ctx, u_long * libvirtGuestRowStatus_val_ptr );
......
......@@ -46,7 +46,7 @@
/*
* LIBVIRT-MIB::libvirtGuestTable is subid 1 of libvirtObjects.
* Its status is Current.
* OID: .1.3.6.1.4.1.12345.1.1, length: 9
* OID: .1.3.6.1.4.1.36957.1.1, length: 9
*/
/*
* NOTE: if you update this chart, please update the versions in
......@@ -407,7 +407,7 @@ libvirtGuestTable_undo_commit( libvirtGuestTable_rowreq_ctx *rowreq_ctx)
* LIBVIRT-MIB::libvirtGuestEntry.libvirtGuestState
* libvirtGuestState is subid 3 of libvirtGuestEntry.
* Its status is Current, and its access level is Create.
* OID: .1.3.6.1.4.1.12345.1.1.1.3
* OID: .1.3.6.1.4.1.36957.1.1.1.3
* Description:
Current state of the active guest.
*
......@@ -586,7 +586,7 @@ libvirtGuestState_undo( libvirtGuestTable_rowreq_ctx *rowreq_ctx)
* LIBVIRT-MIB::libvirtGuestEntry.libvirtGuestRowStatus
* libvirtGuestRowStatus is subid 9 of libvirtGuestEntry.
* Its status is Current, and its access level is Create.
* OID: .1.3.6.1.4.1.12345.1.1.1.9
* OID: .1.3.6.1.4.1.36957.1.1.1.9
* Description:
Status of the virtual guest.
......
......@@ -44,7 +44,7 @@ extern "C" {
/*
* LIBVIRT-MIB::libvirtGuestTable is subid 1 of libvirtObjects.
* Its status is Current.
* OID: .1.3.6.1.4.1.12345.1.1, length: 9
* OID: .1.3.6.1.4.1.36957.1.1, length: 9
*/
......@@ -80,9 +80,9 @@ int libvirtGuestMemoryLimit_undo_setup( libvirtGuestTable_rowreq_ctx *rowreq_ctx
int libvirtGuestMemoryLimit_set( libvirtGuestTable_rowreq_ctx *rowreq_ctx, u_long libvirtGuestMemoryLimit_val );
int libvirtGuestMemoryLimit_undo( libvirtGuestTable_rowreq_ctx *rowreq_ctx );
int libvirtGuestCpuTime_check_value( libvirtGuestTable_rowreq_ctx *rowreq_ctx, U64 libvirtGuestCpuTime_val);
int libvirtGuestCpuTime_check_value( libvirtGuestTable_rowreq_ctx *rowreq_ctx, struct counter64 libvirtGuestCpuTime_val);
int libvirtGuestCpuTime_undo_setup( libvirtGuestTable_rowreq_ctx *rowreq_ctx );
int libvirtGuestCpuTime_set( libvirtGuestTable_rowreq_ctx *rowreq_ctx, U64 libvirtGuestCpuTime_val );
int libvirtGuestCpuTime_set( libvirtGuestTable_rowreq_ctx *rowreq_ctx, struct counter64 libvirtGuestCpuTime_val );
int libvirtGuestCpuTime_undo( libvirtGuestTable_rowreq_ctx *rowreq_ctx );
int libvirtGuestRowStatus_check_value( libvirtGuestTable_rowreq_ctx *rowreq_ctx, u_long libvirtGuestRowStatus_val);
......
......@@ -68,7 +68,7 @@
/*
* LIBVIRT-MIB::libvirtGuestTable is subid 1 of libvirtObjects.
* Its status is Current.
* OID: .1.3.6.1.4.1.12345.1.1, length: 9
* OID: .1.3.6.1.4.1.36957.1.1, length: 9
*/
typedef struct libvirtGuestTable_interface_ctx_s {
......@@ -842,11 +842,11 @@ rc = libvirtGuestMemoryCurrent_get(rowreq_ctx, (u_long *)var->val.string );
rc = libvirtGuestMemoryLimit_get(rowreq_ctx, (u_long *)var->val.string );
break;
/* libvirtGuestCpuTime(7)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */
/* libvirtGuestCpuTime(7)/COUNTER64/ASN_COUNTER64/struct counter64//l/A/w/e/r/d/h */
case COLUMN_LIBVIRTGUESTCPUTIME:
var->val_len = sizeof(U64);
var->val_len = sizeof(struct counter64);
var->type = ASN_COUNTER64;
rc = libvirtGuestCpuTime_get(rowreq_ctx, (U64 *)var->val.string );
rc = libvirtGuestCpuTime_get(rowreq_ctx, (struct counter64 *)var->val.string );
break;
/* libvirtGuestRowStatus(9)/RowStatus/ASN_INTEGER/long(u_long)//l/A/W/E/r/d/h */
......@@ -1022,7 +1022,7 @@ _libvirtGuestTable_check_column( libvirtGuestTable_rowreq_ctx *rowreq_ctx,
rc = SNMP_ERR_NOTWRITABLE;
break;
/* libvirtGuestCpuTime(7)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */
/* libvirtGuestCpuTime(7)/COUNTER64/ASN_COUNTER64/struct counter64//l/A/w/e/r/d/h */
case COLUMN_LIBVIRTGUESTCPUTIME:
rc = SNMP_ERR_NOTWRITABLE;
break;
......
......@@ -29,7 +29,7 @@ extern "C" {
/* column number definitions for table libvirtGuestTable */
#define LIBVIRTGUESTTABLE_OID 1,3,6,1,4,1,12345,1,1
#define LIBVIRTGUESTTABLE_OID 1,3,6,1,4,1,36957,1,1
#define COLUMN_LIBVIRTGUESTUUID 1
......
......@@ -34,15 +34,15 @@ int
send_libvirtGuestNotif_trap(virDomainPtr dom)
{
netsnmp_variable_list *var_list = NULL;
const oid libvirtGuestNotif_oid[] = { 1, 3, 6, 1, 4, 1, 12345, 0, 1 };
const oid libvirtGuestNotif_oid[] = { 1, 3, 6, 1, 4, 1, 36957, 0, 1 };
const oid libvirtGuestName_oid[] =
{ 1, 3, 6, 1, 4, 1, 12345, 1, 1, 1, 2, 0 };
{ 1, 3, 6, 1, 4, 1, 36957, 1, 1, 1, 2, 0 };
const oid libvirtGuestUUID_oid[] =
{ 1, 3, 6, 1, 4, 1, 12345, 1, 1, 1, 1, 1 };
{ 1, 3, 6, 1, 4, 1, 36957, 1, 1, 1, 1, 1 };
const oid libvirtGuestState_oid[] =
{ 1, 3, 6, 1, 4, 1, 12345, 1, 1, 1, 3, 2 };
{ 1, 3, 6, 1, 4, 1, 36957, 1, 1, 1, 3, 2 };
const oid libvirtGuestRowStatus_oid[] =
{ 1, 3, 6, 1, 4, 1, 12345, 1, 1, 1, 9, 3 };
{ 1, 3, 6, 1, 4, 1, 36957, 1, 1, 1, 9, 3 };
const char *domName = virDomainGetName(dom);
......