Trying to get SNMP Data from a badly documented system - snmp

I'm trying to receive snmp data from a badly documented Device. I'll attach a copy of the docs I have.
It would be awesome if you could help me to get a snmpget command.
Best Regards
Niklas
Here are the credentials and the IP Adress:
IP: 192.168.62.219
Security Name: snmpadmin
Auth Protocol: MD5
Auth Password: 12345678
Privacy Protocol: DES
Privacy Password: ezcastdes
AM-SNMP-MIB DEFINITIONS ::= BEGIN
-- Design notes:
--
-- The design of this mib may seem unusual in parts, as it was
-- designed for ease of numerical management routines.
--
-- In that light, most sub-sections of this mib have four common
-- numerical oid consistencies:
--
-- (iana requeted).ID.1 : an integer index value. In scalers, this is always
-- of value 1. In tables it is a row index.
-- (47659).ID.2 : a name of the script, process, etc. that this row represents.
-- (47659).ID.100 : An error flag indicating if an error is present on
-- that row (a threshold value was crossed, etc).
-- (47659).ID.101 : An error string describing why the error flag is non-0.
--
-- These conventions enable managers to easy examine portions of the
-- mib by setting the ID to the sub-section they are interested in
-- monitoring, and then scanning the .100 value to check for an
-- error(s), and get a more specific error message from .101 for the
-- named check found in .2.
--
-- Row numbers between 2 and 100 are sub-section specific.
--
-- Mib sections utilizing the above conventions:
-- Tables: procTable, execTable, diskTable, loadTable
-- Scalers: memory, snmperrs
IMPORTS
OBJECT-TYPE, NOTIFICATION-TYPE, MODULE-IDENTITY,
Integer32, Opaque, enterprises, Counter32, Unsigned32
FROM SNMPv2-SMI
TEXTUAL-CONVENTION, DisplayString, TruthValue
FROM SNMPv2-TC;
actionsmicro MODULE-IDENTITY
LAST-UPDATED "201603310000Z"
ORGANIZATION "Actions MicroEletronics Co. Ltd."
CONTACT-INFO
" http://www.actions-micro.com
postal: Actions MicroEletronics Co. Ltd.
4F.-5, No.736, Jhongjheng Rd., Jhonghe Dist.,
New Taipei City, Taiwan 23511
email: darrelllao#actions-micro.com
"
DESCRIPTION
"This file defines the private AM(ActionsMicro) SNMP MIB extensions."
REVISION "201603310000Z"
DESCRIPTION
"New object for number of CPUs as counted by the agent"
REVISION "201105140000Z"
DESCRIPTION
"New objects for monitoring CPU Steal, Guest and Nice values"
REVISION "200901190000Z"
DESCRIPTION
"New 64-bit objects for monitoring large disk usage"
REVISION "200611220000Z"
DESCRIPTION
"Clarify behaviour of objects in the memory & systemStats groups
(including updated versions of malnamed mem*Text objects).
Define suitable TCs to describe error reporting/fix behaviour."
REVISION "200404070000Z"
DESCRIPTION
"Added ssCpuRawSoftIRQ for Linux (2.6) and forgotten raw swap counters."
REVISION "200209050000Z"
DESCRIPTION
"Deprecate the non-raw objects."
REVISION "200109200000Z"
DESCRIPTION
"Group to monitor log files"
REVISION "200101170000Z"
DESCRIPTION
"Added raw CPU and IO counters."
REVISION "9912090000Z"
DESCRIPTION
"SMIv2 version converted from older MIB definitions."
::= { enterprises 47659 }
-- Current AM core mib table entries:
-- amNetworkMIB OBJECT IDENTIFIER ::= { actionsMicro 1 } - AM-NETWORK-MIB
-- amProjectorMIB OBJECT IDENTIFIER ::= { actionsMicro 2 }
-- Older mib table entries that were changed to new locations above:
-- (TBD) OBJECT IDENTIFIER ::= { actionsMicro 1 }
-- Never implemented and removed from the mib:
-- (TBD) OBJECT IDENTIFIER ::= { actionsMicro 5 }
--
-- Define the Float Textual Convention
-- This definition was written by David Perkins.
--
Float ::= TEXTUAL-CONVENTION
STATUS current
DESCRIPTION
"A single precision floating-point number. The semantics
and encoding are identical for type 'single' defined in
IEEE Standard for Binary Floating-Point,
ANSI/IEEE Std 754-1985.
The value is restricted to the BER serialization of
the following ASN.1 type:
FLOATTYPE ::= [120] IMPLICIT FloatType
(note: the value 120 is the sum of '30'h and '48'h)
The BER serialization of the length for values of
this type must use the definite length, short
encoding form.
For example, the BER serialization of value 123
of type FLOATTYPE is '9f780442f60000'h. (The tag
is '9f78'h; the length is '04'h; and the value is
'42f60000'h.) The BER serialization of value
'9f780442f60000'h of data type Opaque is
'44079f780442f60000'h. (The tag is '44'h; the length
is '07'h; and the value is '9f780442f60000'h."
SYNTAX Opaque (SIZE (7))
AMErrorFlag ::= TEXTUAL-CONVENTION
STATUS current
DESCRIPTION
"Represents a possible error condition"
SYNTAX INTEGER { noError(0), error(1) }
AMErrorFix ::= TEXTUAL-CONVENTION
STATUS current
DESCRIPTION
"Represents a 'push-button' object, to invoke a suitable
configured action. Will always return 0 when read."
SYNTAX INTEGER { noError(0), runFix(1) }
--
-- Process table checks
-- (TBD)
--
-- Memory usage/watch reporting.
-- Not supported on all systems!
-- See agent/mibgroup/ucd_snmp.h to see if its loaded for your architecture.
-- (TBD)
-- SYNTAX OBJECT IDENTIFIER
-- MAX-ACCESS read-only
-- STATUS current
-- DESCRIPTION
-- "The registry slot of a mibmodule."
-- ::= { mrEntry 1 }
-- possibly used in the future:
--
-- ssErrorFlag OBJECT-TYPE
-- SYNTAX AMErrorFlag
-- MAX-ACCESS read-only
-- STATUS current
-- DESCRIPTION
-- "Error flag."
-- ::= { systemStats 100 }
--
-- ssErrMessage OBJECT-TYPE
-- SYNTAX DisplayString
-- MAX-ACCESS read-only
-- STATUS current
-- DESCRIPTION
-- "Error message describing the errorflag condition."
-- ::= { systemStats 101 }
END
AM-SETUP-MIB DEFINITIONS ::= BEGIN
IMPORTS
MODULE-IDENTITY, OBJECT-TYPE, Integer32 FROM SNMPv2-SMI
actionsmicro FROM AM-SNMP-MIB;
amSetUp MODULE-IDENTITY
LAST-UPDATED "201607080000Z"
ORGANIZATION "Actions MicroEletronics Co. Ltd."
CONTACT-INFO
" http://www.actions-micro.com
postal: Actions MicroEletronics Co. Ltd.
4F.-5, No.736, Jhongjheng Rd., Jhonghe Dist.,
New Taipei City, Taiwan 23511
email: darrelllao#actions-micro.com
"
DESCRIPTION
"The AM-SNMP setup MIB."
REVISION "201603310000Z"
DESCRIPTION
"SMIv2 version converted from older MIB definitions."
::= { actionsmicro 1 }
amAirSetup OBJECT IDENTIFIER ::= { amSetUp 1 }
amDeviceManagemant OBJECT IDENTIFIER ::= { amSetUp 2 }
amAccessControl OBJECT IDENTIFIER ::= { amSetUp 3 }
amNetworkSetup OBJECT IDENTIFIER ::= { amSetUp 4 }
amAdvancedSetup OBJECT IDENTIFIER ::= { amSetUp 5 }
amSystemInfo OBJECT IDENTIFIER ::= { amSetUp 6 }
amWifiWlan0 OBJECT IDENTIFIER ::= { amSystemInfo 1 }
amWifiWlan1 OBJECT IDENTIFIER ::= { amSystemInfo 2 }
amWifiWlan2 OBJECT IDENTIFIER ::= { amSystemInfo 3 }
amWifiWlan3 OBJECT IDENTIFIER ::= { amSystemInfo 4 }
amMibLan OBJECT IDENTIFIER ::= { amSystemInfo 5 }
amMibVersion OBJECT IDENTIFIER ::= { amSystemInfo 6}
amMibCurstatus OBJECT IDENTIFIER ::= { amSystemInfo 7}
AddNetwork OBJECT IDENTIFIER ::= { amNetworkSetup 5}
--
-- AirSetup
--
SoftApPassWord OBJECT-TYPE
SYNTAX OCTET STRING(SIZE(8..64))
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"WiFi 2.4G and 5G use the same PSK password."
::= { amAirSetup 1 }
SoftApHideSSID OBJECT-TYPE
SYNTAX OCTET STRING(SIZE(8..64))
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"0:ssid is open,you can see it ;1:ssid is hidden"
::= { amAirSetup 2 }
EZAir OBJECT-TYPE
SYNTAX OCTET STRING(SIZE(8..64))
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"0:Mirror+Streaming;1:Mirror Only."
::= { amAirSetup 3 }
--
-- DeviceManagemant
--
Language OBJECT-TYPE
SYNTAX OCTET STRING(SIZE(0..2))
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"0:en; 1:fr; 2:de; 3:es; 4:zh-CN; 5:zh-TW; 6:ja; 7:ko; 8:it;
9:ru; 10:nl; 11:pt; 12:tr; 13:ar; 14:tha; 15:fa; 16:auto"
::= { amDeviceManagemant 1 }
ChangeSSID OBJECT-TYPE
SYNTAX OCTET STRING(SIZE(8..15))
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The SSID length should be 1~20 characters."
::= { amDeviceManagemant 2 }
Resolution OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Get/set resolution;
HDMI_TAB id:
0:1280x720_50P; 1:1280x720_60P; 2:1920x1080_24P; 3:1920x1080_50P;
4:1920x1080_60P; 5:3840x2160_24P; 6:3840x2160_25P; 7:3840x2160_30P;
8:4096x2160_24P"
::= { amDeviceManagemant 3}
EDIDTable OBJECT-TYPE
SYNTAX OCTET STRING (SIZE(0..1024))
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"the system resolution of EDID Table."
::= { amDeviceManagemant 4 }
MaxConNum OBJECT-TYPE
SYNTAX OCTET STRING (SIZE(0..3))
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Maximum number of connections in the system.
0: 4 users; 1: 8 users; 2: 16 users; 3: 32 users; 4: 64 users;"
::= { amDeviceManagemant 5 }
--
-- AccessControl
--
CastCodeControl OBJECT-TYPE
SYNTAX OCTET STRING(SIZE(0..8))
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"CastCodeControl 0:OFF;1:Random;2:Fixed,only 4 bit digits are allowed.
set example:(1)0; (2)1; (3)2;6688;"
::= { amAccessControl 1 }
InternetAccessControl OBJECT-TYPE
SYNTAX OCTET STRING(SIZE(0..8))
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"InternetAccessControl 0:All allowed; 1:Casting users allowed; 2:All
denied."
::= { amAccessControl 2 }
PassowrdHidden OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Get/Set the password status, 0:off 1:on."
::= {amAccessControl 3}
AirView OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Get/Set the airview, 0:off 1:on.frame_rate:{5000,15000,30000,60000,0},
example:1;5000;"
::= {amAccessControl 4}
--
-- NetworkSetup
--
RouterOrDirectOnly OBJECT-TYPE
SYNTAX OCTET STRING (SIZE(0..1))
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"0:Via Router Allowed; 1:Direct Link Only; 2:Via Router Only"
::= { amNetworkSetup 1 }
SoftApChannel OBJECT-TYPE
SYNTAX OCTET STRING(SIZE(0..128))
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"5G WiFiChannel.Warning!!,Configure without connect router.Channel Auto, input Auto.BandWidth:20/80.SetExample:5G;America;2;Auto;80;
channel5g_regiontbl[]={
1,South Africa,{36,40,44,48};
1,Israel,{36,40,44,48};
1,Turkey,{36,40,44,48};
1,Egypt,{36,40,44,48};
1,Tunisia,{36,40,44,48};
1,Kuwait,{36,40,44,48};
1,United Arab Emirates,{36,40,44,48};
2,Russia,{36,40,44,48,149,153,157,161};
2,Singapore,{36,40,44,48,149,153,157,161};
1,South America,{36,40,44,48};
1,Saudi Arabia,{36,40,44,48};
2,America,{36,40,44,48,149,153,157,161};
2,Australia,{36,40,44,48,149,153,157,161};
2,Canada,{36,40,44,48,149,153,157,161};
2,India,{36,40,44,48,149,153,157,161};
2,Korea,{36,40,44,48,149,153,157,161};
2,Malaysia,{36,40,44,48,149,153,157,161};
2,Mexico,{36,40,44,48,149,153,157,161};
2,China,{36,40,44,48,149,153,157,161};
3,Iran,{149,153,157,161};
3,Labanon,{149,153,157,161};
3,Qatar,{149,153,157,161};
2,Europe,{36,40,44,48,149,153,157,161};
1,Japan,{36,40,44,48};
2,Taiwan,{36,40,44,48,149,153,157,161};
}"
::= { amNetworkSetup 2 }
WiFiManual OBJECT-TYPE
SYNTAX OCTET STRING (SIZE(0..128))
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"set wifi IP;Gateway;Netmask;DNS; setexample:192.168.48.68;192.168.48.1;255.255.255.0;192.168.48.1;"
::= { amNetworkSetup 3 }
LanSet OBJECT-TYPE
SYNTAX OCTET STRING (SIZE(0..128))
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"set lan IP;Gateway;Netmask;DNS; setexample:192.168.48.68;192.168.48.1;255.255.255.0;192.168.48.1;"
::= { amNetworkSetup 4 }
--
-- AddNetwork
--
AddNetworkApply OBJECT-TYPE
SYNTAX OCTET STRING(SIZE(0..1))
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"add network parameters format:ssid;authen;psk;
set example:action;WPA-PSK;12345678;"
::= { AddNetwork 1 }
ScanNetwork OBJECT-TYPE
SYNTAX OCTET STRING(SIZE(0..1))
MAX-ACCESS write-only
STATUS current
DESCRIPTION
"Do not need to enter any value ,just press SET key and it will scan
network."
::= { AddNetwork 2 }
ScanresultNetwork OBJECT-TYPE
SYNTAX OCTET STRING(SIZE(0..8192))
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"get the scan network results.
format:SSID;Authen;unknown;networkid;macaddr;"
::= { AddNetwork 3 }
ConnectNetwork OBJECT-TYPE
SYNTAX OCTET STRING(SIZE(0..128))
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"set connect network ssid;authen;psk;mac;networkid;
set example:action;WPA-PSK;12345678;84:1b:5e:d7:3a:83;-1;"
::= { AddNetwork 4 }
--
-- AdvancedSetup
--
OTAURL OBJECT-TYPE
SYNTAX OCTET STRING (SIZE(0..128))
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"OTA Server,such as http://www.iezvu.com"
::= { amAdvancedSetup 1 }
AdminPassword OBJECT-TYPE
SYNTAX OCTET STRING (SIZE(6..64))
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"admin password,Password must be between 6 and 64 characters long.It is
md5 encrypted password when you GET it"
::= { amAdvancedSetup 2 }
--
-- SystemInfo
--
Wlan0MacAddress OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"MAC of wlan0."
::= { amWifiWlan0 1 }
Wlan0IPAddress OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"IP of wlan0."
::= { amWifiWlan0 2 }
Wlan0LinkStatus OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The link status of WLAN0 interface."
::= { amWifiWlan0 3 }
Wlan1MacAddress OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"MAC of wlan1."
::= { amWifiWlan1 1 }
Wlan1IPAddress OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"IP of wlan1."
::= { amWifiWlan1 2 }
Wlan1LinkStatus OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The link status of WLAN1 interface."
::= { amWifiWlan1 3 }
Wlan2MacAddress OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"MAC of wlan2."
::= { amWifiWlan2 1 }
Wlan2IPAddress OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"IP of wlan2."
::= { amWifiWlan2 2 }
Wlan2LinkStatus OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The link status of WLAN2 interface."
::= { amWifiWlan2 3 }
Wlan3MacAddress OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"MAC of wlan3."
::= { amWifiWlan3 1 }
Wlan3IPAddress OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"IP of wlan3."
::= { amWifiWlan3 2 }
Wlan3LinkStatus OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The link status of WLAN3 interface."
::= { amWifiWlan3 3 }
LanMacAddress OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"MAC of LAN."
::= { amMibLan 1 }
LanIPAddress OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"IP of LAN."
::= { amMibLan 2 }
LanLinkStatus OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The link status of LAN interface."
::= { amMibLan 3 }
FWLocalVersion OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Local Software Version."
::= { amMibVersion 1 }
FWOTAServerVersion OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"OTA Server Version."
::= { amMibVersion 2 }
LoginUserNum OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Current Login user num."
::= { amMibCurstatus 1 }
InternetStatus OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Current Internet status."
::= { amMibCurstatus 2 }
END

Related

How to correctly use coercions such that no parenthesis are needed?

Why does the following grammar does not recognize nat -> nat but does recognize (nat -> nat) and how can I fix that?
TNat . Typ4 ::= "nat" ;
TVoid . Typ4 ::= "<>" ;
TProd . Typ3 ::= SumType;
TProd . Typ2 ::= Typ2 "*" Typ3;
TArrow . Typ1 ::= Typ1 "->" Typ2;
coercions Typ 4;
Inverting the order of declaration fixed the issue
TArrow . Typ ::= Typ "->" Typ1;
TSum . Typ1 ::= SumType;
TProd . Typ2 ::= Typ2 "*" Typ3;
TNat . Typ3 ::= "nat" ;
TVoid . Typ3 ::= "<>" ;
coercions Typ 3;

Discriminated union type checking in F# with differernt return types

I am trying to write an interpreter in F#. I want to check the type of expressions.
Here is my discriminated union for the expressions
type Expr =
| Integer of int
| String of string
| Boolean of bool
This is the method i am using to check the types with
let checkType (e:Expr) =
match e with
| String s -> s
| Integer i -> i
| Boolean b -> b
I want the method to determine wether an expression is a string,integer or boolean.
However, visual studio gives me the following error on line 4 of the checkType method:
This expression was expected to have type string but here has type int
Am i missing something?
To expand on John Palmer's comment:
F# expects each function to have a single return type. For example, you can write a function that takes an int and returns an int, which would be a function of type int -> int. A function that parses strings into ints would be of type string -> int. And so on.
Now, what is the return type of the checkType function you've written? Since you don't specify a return type, the compiler looks at the type of the values you can return from the function -- every possible code branch must return a value, and they must all be the same type. So it looks at your match statement, sees that its first branch returns a string, and says, "Ah ha! I've figured out the return type of this function; this is a function that takes an Expr and returns a string. The function's type is Expr -> string."
Then it looks at the second branch of your match statement, and says, "Wait a minute. This is a function that returns a string, but in this code branch it's returning an int. That's not valid: the code that calls this function needs to know what type to expect it to return." And so you get the error.
Now, if you were to swap the order of your match statement cases, checking for Integer i first, then the compiler would evaluate your function as having type Expr -> int (taking an Expr input and returning an int output), and throw an error on the | String s -> s line. This time, the error would be "Wait a minute, this is a function that returns an int, so the expression s here should have been of type int. But instead, it's of type string. That's not valid."
Or delete the | String s -> s line, and you'll see an error "This expression was expected to have type int but here has type bool." Same thing: each function can have only one return type. If you want to return multiple different possible types from a function, that's what Discriminated Unions are for.
For more reading on F# types, see http://fsharpforfunandprofit.com/series/understanding-fsharp-types.html.
You can wrap all of the expressions into an Option type like Some or String:
let checkType (e:Expr) =
match e with
| String e -> "we are string: " + string e
| Integer e-> "we are integer: " + string e
| Boolean e -> "we are boolean: " + string e

SNMP MIB ERROR scalar's parent node must be simple node Object Not Imported

I have the following file and I get
X-MIB.txt:26: scalar's parent node must be simple node Object Not
Imported
X-MIB.txt:35: scalar's parent node must be simple node Object Not
Imported
X-MIB.txt:45: scalar's parent node must be simple node Object Not
Imported
X-MIB.txt:55: scalar's parent node must be simple node Object Not
Imported
Here's the MIB file (after emitting my company name and replacing names with "x" and "y")
X-MIB DEFINITIONS ::= BEGIN
IMPORTS
MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE, Integer32 FROM SNMPv2-SMI
DisplayString FROM RFC1213-MIB
OBJECT-GROUP, NOTIFICATION-GROUP FROM SNMPv2-CONF
y FROM Y-MIB;
x MODULE-IDENTITY
LAST-UPDATED "201411060000Z"
ORGANIZATION "Y Corporation"
CONTACT-INFO
"Y Corporation
www.y.com"
DESCRIPTION
"The Structure of Management Information for the Y X enterprise."
REVISION "201411060000Z"
DESCRIPTION
"Initial version of this MIB."
::= { y 101 }
-- 1.3.6.1.4.1.1139.101.1
xAlert OBJECT IDENTIFIER ::= { x 1 }
-- 1.3.6.1.4.1.1139.101.1.1
xAlertSeverity OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS accessible-for-notify
STATUS current
DESCRIPTION
"Severity of the event"
::= { xAlert 1 }
-- 1.3.6.1.4.1.1139.101.1.2
xAlertType OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..255))
MAX-ACCESS accessible-for-notify
STATUS current
DESCRIPTION
"Type of the alert"
::= { xAlert 2 }
-- 1.3.6.1.4.1.1139.101.1.3
xAlertSourceObjectId OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..255))
MAX-ACCESS accessible-for-notify
STATUS current
DESCRIPTION
"Object id for which the alert was created"
::= { xAlert 3 }
-- 1.3.6.1.4.1.1139.101.1.4
xAlertActionCode OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..255))
MAX-ACCESS accessible-for-notify
STATUS current
DESCRIPTION
"Action code of the alert"
::= { scaleioAlert 4 }
-- 1.3.6.1.4.1.1139.101.1.5
xGroups OBJECT IDENTIFIER ::= { xAlert 5 }
-- 1.3.6.1.4.1.1139.101.1.5.1
currentObjectGroup OBJECT-GROUP
OBJECTS { xAlertSeverity,
xAlertType,
xAlertSourceObjectId,
xAlertActionCode }
STATUS current
DESCRIPTION
"x-MIB-V2 OBJECT-GROUP."
::= { xGroups 1 }
-- 1.3.6.1.4.1.1139.101.1.5.2
currentNotificationGroup NOTIFICATION-GROUP
NOTIFICATIONS { xAEAlert }
STATUS current
DESCRIPTION
"x-MIB-V2 NOTIFICATION-GROUP."
::= { xGroups 2 }
xAEAlert NOTIFICATION-TYPE
OBJECTS { xAlertSeverity, xAlertType, xAlertSourceObjectId, xAlertActionCode }
STATUS current
DESCRIPTION "x Alert"
::= { x 1 }
END
Don't import DisplayString from RFC1213-MIB. You are mixing SMIv1 and SMIv2. Import DisplayString from SNMPv2-TC instead.
Try adding an intermediate OBJECT IDENTIFIER between you module identity and xAlert. I was able to get the warning for scalar's parent node must be simple node to go away by doing this.
xMibObjects OBJECT IDENTIFIER ::= { x 1 }
xAlert OBJECT IDENTIFIER ::= { xMibObjects 1 }
I don't have the text for your Y-MIB, so I couldn't complete the imports.

Explanation of Oslo error "M2037: SQL Generation Internal Error: Missing generator for variable"?

In Microsoft Oslo SDK CTP 2008 (using Intellipad) the following code compiles fine:
module T {
type A {
Id : Integer32 = AutoNumber();
} where identity Id;
As : A*;
type B {
Id : Integer32 = AutoNumber();
// A : A;
// } where A in As && identity Id;
} where identity Id;
Bs : B*;
type C {
Id : Integer32 = AutoNumber();
B : B;
} where B in Bs && identity Id;
Cs : C*;
}
and results in the following Reach SQL output:
set xact_abort on;
go
begin transaction;
go
set ansi_nulls on;
go
create schema [T];
go
create table [T].[As]
(
[Id] int not null identity,
constraint [PK_As] primary key clustered ([Id])
);
go
create table [T].[Bs]
(
[Id] int not null identity,
constraint [PK_Bs] primary key clustered ([Id])
);
go
create table [T].[Cs]
(
[Id] int not null identity,
[B] int not null,
constraint [PK_Cs] primary key clustered ([Id]),
constraint [FK_Cs_B_T_Bs] foreign key ([B]) references [T].[Bs] ([Id])
);
go
commit transaction;
go
But after changing the commented line in module T as follows
A : A;
} where A in As && identity Id;
// } where identity Id;
the error message "M2037: SQL Generation Internal Error: Missing generator for variable 'A'" is displayed (in Intellipad's Reach SQL Window).
Any Ideas?
Regards, tamberg
I think what you want is:
type A {
Id : Integer32 = AutoNumber();
} where identity Id;
As : A*;
type B {
Id : Integer32 = AutoNumber();
A : A;
} where identity Id;
Bs : (B where value.A in As)*;
type C {
Id : Integer32 = AutoNumber();
B : B;
} where identity Id && B in Bs;
Cs : (C where value.B in Bs)*;
Note that the constraints are on the externs, not the types here. I was able to get similar code when the constraints where on the types but not able to go more than one relationship deep. Moving them to the externs seems correct and generates the expected Reach SQL.
http://social.msdn.microsoft.com/Forums/en-US/oslo/thread/05103bf8-4e0f-4976-bcdd-2c724cb08738/

ELF: How to print the r_info field?

I want to list the name of all relocation entries which have the type R_X86_64_JUMP_SLOT. Here's what I have so far:
char *str = (char *) (mapped_file + dynstr->sh_offset);
Elf64_Rela *reloc_entry = (Elf64_Rela *) (mapped_file + rela_plt->sh_offset);
for (i = 0; i < rela_plt->sh_size / sizeof(Elf64_Rela); ++i)
{
if (ELF64_R_TYPE(reloc_entry[i].r_info) == R_X86_64_JUMP_SLOT)
printf("name: %s\n", str + ELF64_R_SYM(reloc_entry[i].r_info));
}
The ELF64_R_TYPE macro is working fine but I'm having problems retrieving the relocation name with ELF64_R_SYM.
readelf shows the relocations correctly:
Relocation section '.rela.plt' at offset 0x588 contains 3 entries:
Offset Info Type Sym. Value Sym. Name + Addend
000000004018 000200000007 R_X86_64_JUMP_SLO 0000000000000000 puts#GLIBC_2.2.5 + 0
000000004020 000300000007 R_X86_64_JUMP_SLO 0000000000000000 printf#GLIBC_2.2.5 + 0
000000004028 000600000007 R_X86_64_JUMP_SLO 0000000000000000 malloc#GLIBC_2.2.5 + 0
My code for some reason doesn't print the symbol name, instead it prints:
name: ibc.so.6
name: bc.so.6
name: so.6
what am I doing wrong?
r_info contains the symbol index, which is an array index for the symbol table. The array elements are of type Elf32_Sym or Elf64_Sym. The string table index of the symbol name is in the st_name member. This additional indirection is necessary because in general, binding a symbol requires more data than just its name.

Resources