README
This is the OpenIPMI command language, which allows each access to
pretty much everything about OpenIPMI.  It can be used to add an
OpenIPMI command shell into an application to give the user full
access into everything OpenIPMI can do.

The interface is very simple.  You call the command interpreter with a
string.  You pass in two functions, an output handler and a "done"
functions.  If an error occurs, the command interpreter generates some
output and returns an error code.  Otherwise, it will generate output
and call the done function when it is complete.

The command language is hierarchical.  There are several top-level
commands, each of these has sub-commands, and those may have
sub-commands, and so on.

The commands may take parameters.  Some general ones are:

* <domain> - A name of a domain.  Each registered domain in a system
  has a name.
* <entity> - Entity names are in the form: [<domain>[(entity spec)]]
  Notice that the entity spec is optional.  If it is not listed, then
  the operation is done on all entities in the domain.  The whole
  thing is optional, too, if nothing is given then the operation is
  done on every entity in every domain.
  The entity spec is either:
   <entity id>.<entity instance>
  for system-reltive entities, or:
   r<channel>.<IPMB>.<entity id>.<entity instance-0x60>
  for device-relative entities.
* <sensor> - These come in the form [<entity>[.name]] If no name is
  given, the operation is performed on all sensors in the entity.
  If the entity is just a domain, then all sensors in the domain, and
  if the whole thing is empty, then all sensors on all domains.
* <control> - These come in the form [<entity>[.name]] If no name is
  given, the operation is performed on all controls in the entity.
  If the entity is just a domain, then all controls in the domain, and
  if the whole thing is empty, then all controls on all domains.
* <mc> - A management controller.  These come in the form
  [<domain>[(<channel>.<IPMB>)]].  As usual, the optional parts will
  cause defaulting to all things.
* <connection> - A connection number, in the form: <domain>.<num>
* <pet> - A platform event trap id, in the form [<domain>][.<integer>]
* <lanparm> - A LAN parameter id, in the form [<domain>][.<integer>]
* <pef> - A PEF id, in the form [<domain>][.<integer>]
* <guid> - a 16-byte globally unique ID, all globbed together in
  one big hexidecimal thing.

Note that the domain name and sensor/control name may have spaces in
them; the names may be bracketed by quotes (' or ").  A backslash (\)
may be used to add a quote character (or a backslash) into a string.
An empty parameters should be specified as "", although if nothing
comes after the parameter it may just be left empty.



The command hierarchy is:

* help - get general help.  Type the specific command after help to
  get info for that command.

* domain

  * list - List all domains
    Response is:
    Domains
      Name: <domain1>
      Name: <domain2>
      .
      .

  * info <domain> - List information about the given domain
    Response is:
    Domain
      Name: <domain>
      **DOMAIN INFO**

  * new <domain> <options> <parms...> - Open a connection to a new domain
    Parms are either:
     lan <IP> <port> <enc> <auth> <name> <password>"
    or
     smi <smi num>
    <enc> is the authentication type, either "md5", "md2", "straight",
    or "none".  <auth> is the authentication level, either "admin",
    "operator", or "user".  The <port> is generally 623.
    The <smi num> is the driver number, generally 0.
    Options enable and disable various automitic processing and are:
      -[no]all - all automatic handling
      -[no]sdrs - sdr fetching
      -[no]frus - FRU fetching
      -[no]sel - SEL fetching,"
      -[no]ipmbscan - IPMB bus scanning
      -[no]oeminit - special OEM processing (like ATCA)
      -[no]seteventrcvr - setting event receivers
      -wait_til_up - wait until the domain is up before returning
       Note that if you specify this and the domain never comes up,
       you will never get a prompt.

    Note that setting event receivers it not affected by the -all
    option.  By default -all -seteventrcvr is true, which turns
    everything on.
    Response is:
    Domain Created: <domain>

  * fru <domain> <is_logical> <device_address> <device_id> <lun> <private_bus>
    <channel> - dump a fru given all it's insundry information.
    Response is:
    Domain
      Name: <domain>
      FRU
        **FRU INFO**

  * msg <domain> <channel> <ipmb> <LUN> <NetFN> <Cmd> [data...] - Send
    a command to the given IPMB address on the given channel and display the
    response.  Note that this does not require the existance of an
    MC in OpenIPMI.  The response is:
    Response
      Domain: <domain>
      channel: <chan>
      ipmb: <ipmb>
      LUN: <lun>
      NetFN: <netfn>
      command: <cmd>
      Data: <data bytes>

  * scan <domain> <ipmb addr> [ipmb addr] - scan an IPMB to add or remove it.
    If a range is given, then scan all IPMBs in the range.
    Response is:
    Scan done: <domain>

  * presence - Check the presence of entities.
    Response is:
    Presence check started: <domain>

  * close <domain> - close the given domain.
    Response is:
    Domain closed: <domain>

  * sel_rescan_time <domain> <time in seconds> - Set the time between
    SEL rescans for all SELs in the system.  zero disables scans.
    Response is:
    Domain SEL rescan time set: <domain>

  * ipmb_rescan_time <domain> <time in seconds> - Set the time between
    IPMB rescans for this domain.  zero disables scans.
    Response is:
    Domain IPMB rescan time set: <domain>

* entity

  * list <domain> - List all entities.
    Response is:
    Domain
      Name: <domain>
      Entities
        Name: <entity1>
        Name: <entity2>
        .
        .

  * info <entity> - List information about the given entity
    Response is:
    Entity
      Name: <entity>
      **ENTITY INFO**

  * fru <entity> - Dump the FRU information about the given entity.
    Response is:
    Entity
      Name: <entity>
      FRU
        **FRU INFO**

    "FRU" will only be present if the entity can have FRU info.  FRU
    info may be empty.

  * hs - hot-swap control

    * get_act_time <entity> - Get the hot-swap auto-activate time
      Response is:
      Entity
        Name: <entity>
        Auto-Activation Time: <integer>

    * set_act_time <entity> - Set the hot-swap auto-activate time
      Response is:
      Set act time: <entity>

    * get_deact_time <entity> - Get the hot-swap auto-deactivate time
      Response is:
      Entity
        Name: <entity>
        Auto-Deactivation Time: <integer>

    * set_deact_time <entity> - Set the hot-swap auto-deactivate time
      Response is:
      Set deact time: <entity>

    * activation_request <entity> Act like a user requested an
      activation of the entity.  This is generally equivalent to
      closing the handle latch or something like that.
      Response is:
      Activation requested: <entity>

    * activate <entity> - activate the given entity
      Response is:
      Activated: <entity>

    * deactivate <entity> - deactivate the given entity
      Response is:
      Deactivated: <entity>

    * state <entity> - Return the current hot-swap state of the given
      entity.
      Response is:
      Entity
        Name: <entity>
        State: not_present | inactive | activation_requested |
               activation_in_progress | active | deactivation_requested |
               deactivation_in_progress | out_of_con

    * check <entity> - Audit the entities hot-swap state
      Response is:
      Check started: <entity>

* sensor

  * list <entity> - List all sensors
    Response is:
    Entity
      Name: <entity>
      Sensors
        Name: <sensor1>
        Name: <sensor2>
        .
        .

  * info <sensor> 
    Response is:
    Sensor
      Name: <sensor>
      **SENSOR INFO**

  * get <sensor> - Get the sensor's current reading.
    Response is:
    Sensor
      Name: <sensor>
      Event Messages Enabled: true | false
      Sensor Scanning Enabled: true | false
      Initial Update In Progress: true | false

    For sensors of type "threshold", the following exist:
    %Value: <double>
    %Raw Value: <integer>
    Threshold
      Name: lower non critical | lower critical | lower non recoverable
            | upper non critical | upper critical | upper non recoverable
      Out Of Range: true | false
    
    For discrete sensors, the following exist:
    Event
      Offset: <integer>
      %Name: <string name of event offset>
      Set: true | false

  * rearm <sensor> global | <thresholds> | <discrete states> -
    Rearm the sensor.  If global is specified, then rearm
    all events in the sensor.  If it is a threshold sensor, then
    put in a list of thresholds of the form '[ul][ncr][hl][ad]
    where [ul] means upper or lower, [ncr] means non-critical,
    critical, or non-recoverable, [hl] means going high or going
    low, and [ad] means assertion or deassertion.  If it is a
    discrete sensor, then the form is <num>[ad] where the number
    is the offset and [ad] means assertion or deassertion
    Response is:  
    Rearm done: <sensor>

  * get_thresholds <sensor> - Get the sensor's thresholds
    Response is:
    Sensor
      Name: <sensor>
      Threshold     
        Name: lower non critical | lower critical | lower non recoverable
              | upper non critical | upper critical | upper non recoverable
        Value: <double>
     
  * set_thresholds <sensor> <threshold> <value> ... - Set the sensor's
    thresholds to the given values.  If a threshold is not specified,
    it will not be modified.  Thresholds are unc, uc, unr, lnr, lc.
    The u stands for upper, l for lower, nc for non-critical, c for
    critical, and nr for non-recoverable.  The value is floating point.
    Response is:  
    Thresholds set: <sensor>
      
  * get_hysteresis <sensor> - Get the sensor's hysteresis values
    Response is:
    Sensor
      Name: <sensor>
      Positivie Hysteresis: <integer>
      Negative Hysteresis: <integer>

  * set_hysteresis <sensor> <pos hyst> <neg hyst> - Set the sensor's
    hysteresis to the given values.  These are raw integer
    value; hystersis is specified as a raw value and it cannot be
    converted to floating point because the function may be
    non-linear.
    Response is:  
    Hysteresis set: <sensor>

  * get_event_enables <sensor> - Get the sensor's event enable values
    Response is:
    Sensor
      Name: <sensor>
      Event Messages Enabled: true | false
      Sensor Scanning Enabled: true | false
      Busy: true | false

    Threshold sensors report:
    Threshold
      Name: <threshold name>
      Enabled: true | false
     .
     .
    only supported thresholds are listed

    Discrete sensors report:
    Event
      Offset: <integer>
      Name: <event offset name for sensor>
      %Assertion Enabled: true | false
      %Deassertion Enabled: true | false
    only supported offsets are listed.  The assertion and deassertion
    enables are listed only if the offset support them.


  * set_event_enables <sensor> msg|nomsg scan|noscan [<event> [<event> ...]]
    - Set the sensor's event enable values.  This turns sensor messages and
    scanning on and off and will enable all the listed events and
    disable all over events.  The events are in the same format as
    the rearm subcommand and depend on the sensor type.  See the
    rearm command for details.
    Response is:  
    Event enables set: <sensor>

  * enable_events <sensor> msg|nomsg scan|noscan [<event> [<event> ...]]
    - Enable event enable values.  This turns sensor messages and
    scanning on and off and will enable all the listed events.  The
    events are in the same format as the rearm subcommand and depend
    on the sensor type.  See the rearm command for details.  This will
    only enable the given events, the other events will be left alone.
    Response is:  
    Event enables set: <sensor>

  * disable_events <sensor> msg|nomsg scan|noscan [<event> [<event> ...]]
    - Disable event enable values.  This turns sensor messages and
    scanning on and off and will disable all the listed events.  The
    events are in the same format as the rearm subcommand and depend
    on the sensor type.  See the rearm command for details.  This will
    only disable the given events, the other events will be left alone.
    Response is:  
    Event enables set: <sensor>

* control

  * list <entity> - List all controls
    Response is:
    Entity
      Name: <entity>
      Controls
        Name: <control1>
        Name: <control2>
      .
      .

  * info <control>
    Response is:
    Control
      Name: <control>
      **CONTROL INFO**

  * set <control> <values> - Set the value of a control.  The settings
    depend on control type, most take one or more integer values.
    An identifier type takes one or more unsigned characters.  A
    light set with settings take the form 'lc|nolc <color> <on time>
    <off time>.  lc and nolc turn on or of local control, the over
    values should be obvious.  Note all lights support local control,
    you need to see if it supports the value.

  * get <control> - Get the value of a control.  The reponse depends
    on the control type.  The main part is:
    Control
      Name: <control>

    Response for setting lights is:
    Light
      Num: 0
      Local Control: true | false
      %Color: black | white | red | green | blue | yellow | orange
      %On Time: <integer>
      %Off Time: <integer>
     .
     .
    Note that multiple lights may be present if the control supports
    multiple lights.  The options values (marked with %) will not be
    present if local control is set to true.  Local control means that
    the LED takes whatever default function it does on the device
    (like disk activity, ethernet activity, hot-swap LED, etc.).

    Response for id control:
    Data: <byte1> <byte2> ...

    Response for other controls:
    Value
      Num: <integer>
      Value: <integer>
     .
     .
    There will be one Value for each value the control supports.

* mc

  * list <domain> - List all MCs
    Response is:
    Domain
      Name: <domain>
      MCs
        Name: <mc1>
        Name: <mc2>
        .
        .

  * info <mc> 
    Response is:
    MC
      Name: <mc>
      **MC INFO**

  * reset <warm | cold> <mc> - Do a warm or cold reset on the given MC
    Response is:
    Reset done: <mc>

  * msg <mc> <LUN> <NetFN> <Cmd> [data...] - Send the given command"
    to the management controller and display the response.
    Response
      MC: <mc>
      LUN: <lun>
      NetFN: <netfn>
      command: <cmd>
      Data: <data bytes>

  * set_events_enable <mc> <enable | disable> - enables or disables
    events on the MC.
    Response is:
    Events enable done: <mc>

  * get_events_enable <mc> - Prints out if the events are enabled for
    the given MC.
    Response is:
    Events Enable: true | false

  * sdrs <mc> <main | sensor> - list the SDRs for the mc.  Either gets
    the main SDR repository or the sensor SDR repository.
    Response is:
    MC
      Name: <mc>
      SDR
        Record ID: <integer>
        Type: <integer>
        Version: <integer>.<integer>
        Data: <data bytes>
      SDR
        Record ID: <integer>
        Type: <integer>
        Version: <integer>.<integer>
        Data: <data bytes>
      .
      .
     
  * get_sel_time <mc> - Get the time in the SEL for the given MC
    MC
      Name: <mc>
      SEL Time: <integer>

  * sel_info <mc> - Dump information about the MC's SEL.
    Response is:
    SEL Count: <integer>
    SEL Slots Used: <integer>

* sel

  * list <domain> - list the local copy of the system event log
    Response is:
    Domain
      Name: <domain>
      Entries: <integer>
      Slots in use: <integer>
      Event
        **EVENT INFO**
       .
       .

  * delete <mc> <record #> - Delete the given event number from the
    SEL
    Response is:
    Event deleted
      MC: <mc>
      Record: <integer>

  * add <mc> <type> <13 bytes of data> - Add the
    event data to the SEL.
    Response is:
    MC
      Name: <mc>
      Record ID: <integer>

  * clear <domain> - clear the system event log

* con
  * list <domain> - List all the connections in the domain.
    Response is:
    Domain
      Name: <domain>
      Connections
        Name: <connection>
        Name: <connection>
        .
        .

  * info <connection> 
    Response is:
    Connection
      Name: <connection>
      Active: true | false

  * activate <connection> - Activate the given connection
    Response is:
    Connection activated: <connection>

* pet

  * list <domain> - List all the pets in the domain.
    Response is:
    Name: <pet>
    Name: <pet>
      .
      .

  * info <pet> - Dump information about a pet.
    Response is:
    PET
      MC: <mc>
      Channel: <channel>
      IP Address: <ip address>
      MAC Address: <mac address>
      EFT Selector: <eft selector>
      Policy Number: <policy number>
      APT Selector: <apt selector>
      LAN Dest Selector: <lan dest selector>

  * new <domain> <connection> <channel> <ip addr> <mac_addr> <eft selector>
    <policy num> <apt selector> <lan dest selector>
    - Set up the domain to send PET traps from the given connection
    to the given IP/MAC address over the given channel.
    Response is:
    PET Created: <pet>

  * mcnew <mc> <channel> <ip addr> <mac_addr> <eft selector>
    <policy num> <apt selector> <lan dest selector>
    - Set up the domain to send PET traps from the given connection
    to the given IP/MAC address over the given channel.  This takes
    an MC instead of a connection.
    Response is:
    PET Created: <pet>

  * close <pet> - Close the pet.
    PET destroyed: <pet>

* pef - commands dealing with platform even filters.  These are
  basically connections to the PEF configuration parameters in an MC.
  You use a pef to fetch a pef config, which you can then modify and
  write back to the MC.  Note that when you get a pef config, you
  claim a lock on the MC that must be unlocked.

  * list <domain> - List all the pefs that currently exist in the
    domain.
    Response is:
    Name: <pef>
    Name: <pef>
      .
      .

  * info <pef> - Dump info about the pef. 
    Response is:
    PEF
      Name: <pef>
      MC: <mc>

  * new <mc> - Create a pef for the given MC.
    Response is:
    PEF: <pef>

  * unlock_mc <mc> - Unlock the PEF lock on the given MC.
    Response is:
    PEF unlocked: <mc>

  * close <pef> - Free the given pef
    PEF destroyed: <pef>

  * config - commands dealing with PEF configurations.  These
    are the actual PEF data items.

    * list - list all the PEF configs
      Response is:
      PEFs
        Name: <pef config>
        Name: <pef config>
        .
        .

    * info <pef config> - Dump information about the pef config.
      Response is:
      PEF Config
        Name: <pef config>
        ** PEF CONFIG **

    * get <pef> - Fetch the pef data items from the pef
      and create a pef config.
      Response is:
      PEF Config
        Name: <pef config>
        ** PEF CONFIG **

    * update <pef config> <parm> [selector] <value> - Set the given parameter
      in the pef config to the given value.  If the parameter has
      a selector of some type, the selector must be given, otherwise
      no selector should be given.
      Response is:
      PEF config updated: <pef config>

    * set <pef> <pef config> - Write the pef data back
      to the pef.  Note that this must be the same pef used
      to create the config.
      Response is:
      PEF config set: <pef config>

    * unlock <pef> <pef config> - Unlock the lock in the
      MC and mark the pef config as unlocked.
      Response is:
      PEF config unlocked: <pef config>

    * close <pef config> - Free the pef config.
      PEF config destroyed: <pef config>

* lanparm - commands dealing with lanparms.  These are basically
  connections to the LAN configuration parameters in an MC.  You
  use a lanparm to fetch a lanparm config, which you can then
  modify and write back to the MC.  Note that when you get a
  lanparm config, you claim a lock on the MC that must be
  unlocked.

  * list <domain> - List all the lanparms that currently exist in the
    domain.
    Response is:
    Domain
      Name: <domain>
      LANPARMs
        Name: <lanparm>
        Name: <lanparm>
        .
        .

  * info <lanparm> - Dump info about the lanparm. 
    Response is:
    LANPARM
      Name: <lanparm>
      MC: <mc>
      Channel: <integer>

  * new <mc> <channel> - Create a lanparm for the given MC and
    channel.
    Response is:
    LANPARM: <lanparm>

  * unlock_mc <mc> <channel> - Unlock the lanparm lock on the given
    MC and channel.
    Response is:
    LANPARM unlocked: <mc>

  * close <lanparm> - Free the given lanparm
    Response is:
    LANPARM destroyed: <lanparm>

  * config - commands dealing with lanparm configurations.  These
    are the actual lanparm data items.

    * list - list all the lanparm configs
      Response is:
      LANPARMS
        Name: <lanparm config>
        Name: <lanparm config>
        .
        .

    * info <lanparm config> - Dump information about the lanparm config.
      Response is:
      LANPARM Config
        Name: <lanparm config>
        ** LANPARM CONFIG **

    * get <lanparm> - Fetch the lanparm data items from the lanparm
      and create a lanparm config.
      Response is:
      LANPARM Config
        Name: <lanparm config>
        ** LANPARM CONFIG **

    * set <lanparm> <lanparm config> - Write the lanparm data back
      to the lanparm.  Note that this must be the same lanparm used
      to create the config.
      Response is:
      LANPARM config set: <lanparm config>

    * unlock <lanparm> <lanparm config> - Unlock the lock in the
      MC and mark the lanparm config as unlocked.
      Response is:
      LANPARM config unlocked: <lanparm config>

    * close <lanparm config> - Free the lanparm config.
      Response is:
      LANPARM config destroyed: <lanparm config>

* general
  * evinfo true | false - Turn on or off dumping object information
    when an event comes in.  This is false by default.

  * debug <type> on|off - Turn the given debugging type on or off


EVENTS
======

The command language will output events to the console when they
happen.  Events all occur in the format:
  Event
    **EVENT INFO**

The event info varies on the type of events.  The defined events are
listed.

The following event is output when the domain is completely up and
operational and finished all it SDR, FRU, and bus scans:
  EVENT
    Object Type: Domain
    Name: <domain>
    Operation: Domain fully up
    Connection Number: <integer>
    Port Number: <integer>
    Any Connection Up: true | false
    Error: <integer>

The following comes out when domain connection infomration changes:
  EVENT
    Object Type: Domain
    Name: <domain>
    Operation: Connection Change
    
The following comes out when domains are added:
  EVENT
    Object Type: Domain
    Name: <domain>
    Operation: Add
    %**DOMAIN INFO**

The following comes out when domains are destroyed:
  EVENT
    Object Type: Domain
    Name: <domain>
    Operation: Delete

The following comes out when the domain gets an event that does not
have a handler:
  EVENT
    Object Type: Event
    **EVENT INFO**

The following comes out when an entity is added:
  EVENT
    Object Type: Entity
    Name: <entity>
    Operation: Add
    %**ENTITY INFO**

The following comes out when an entity is deleted:
  EVENT
    Object Type: Entity
    Name: <entity>
    Operation: Delete

The following comes out when an entity is changed:
  EVENT
    Object Type: Entity
    Name: <entity>
    Operation: Change
    %**ENTITY INFO**

The following comes out when an entity's FRU is added:
  EVENT
    Object Type: Entity FRU
    Name: <entity>
    Operation: Add
    %**FRU INFO**

The following comes out when an entity's FRU is deleted:
  EVENT
    Object Type: Entity FRU
    Name: <entity>
    Operation: Delete

The following comes out when an entity's FRU is changed:
  EVENT
    Object Type: Entity FRU
    Name: <entity>
    Operation: Change
    %**FRU INFO**

The following comes out when an entity's presence changes:
  EVENT
    Object Type: Entity
    Name: <entity>
    Operation: Presence Change
    Present: true | false
    %Event
      **EVENT INFO**

The following comes out when an entity's hot-swap state changes:
  EVENT
    Object Type: Entity
    Name: <entity>
    Operation: Hot-Swap Change
    Last State: not_present | inactive | activation_requested |
               activation_in_progress | active | deactivation_requested |
               deactivation_in_progress | out_of_con
    State: not_present | inactive | activation_requested |
               activation_in_progress | active | deactivation_requested |
               deactivation_in_progress | out_of_con
    %Event
      **EVENT INFO**

The following comes out when a discrete sensor gets an event:
  EVENT
    Object Type: Sensor
    Name: <sensor>
    Operation: Event
    Offset: <integer>
    Direction: assertion | deassertion
    Severity: <integer>
    Previous Severity: <integer>
    %Event
      **EVENT INFO**
    
The following comes out when a threshold sensor gets an event:
  EVENT
    Object Type: Sensor
    Name: <sensor>
    Operation: Event
    Threshold: lower non critical | lower critical | lower non recoverable
              | upper non critical | upper critical | upper non recoverable
    High/Low: going high | going low
    Direction: assertion | deassertion
    %Value: <double>
    %Raw Value: <integer>
    %Event
      **EVENT INFO**
    
The following comes out when a sensor is added:
  EVENT
    Object Type: Sensor
    Name: <sensor>
    Operation: Add
    %**SENSOR INFO**

The following comes out when a sensor is deleted:
  EVENT
    Object Type: Sensor
    Name: <sensor>
    Operation: Delete

The following comes out when a sensor is changed:
  EVENT
    Object Type: Sensor
    Name: <sensor>
    Operation: Change
    %**SENSOR INFO**

The following comes out when a control gets an event:
  EVENT
    Object Type: Control
    Name: <control>
    Operation: Event
    Value
      Number: <integer>
      Value: <integer>
    %Event
      **EVENT INFO**
    
The following comes out when a control is added:
  EVENT
    Object Type: Control
    Name: <control>
    Operation: Add
    %**CONTROL INFO**

The following comes out when a control is deleted:
  EVENT
    Object Type: Control
    Name: <control>
    Operation: Delete

The following comes out when a control is changed:
  EVENT
    Object Type: Control
    Name: <control>
    Operation: Change
    %**CONTROL INFO**


OBJECT INFO
===========

**EVENT INFO**
  MC: <mc>
  Record ID: <integer>
  Event type: <integer>
  Timestamp: <integer>
  Data: <data bytes>


**DOMAIN INFO**
  Type: <domain type>
  SEL Rescan Time: <time>
  IPMB Rescan Time: <time>


**ENTITY INFO**
  Type: unknown | mc | fru | generic
  Present: true | false
  Presence sensor always there: true | false
  Hot swappable: true | false
  Parents
    Name: <entity>
    Name: <entity>
      .
      .
  Children
    Name: <entity>
    Name: <entity>
      .
      .

Note that Parents and Children fields will not be present if the
entity has no parents or children.  Each entity type except "unknown"
will have its own output info.  These are:

mc:
  Channel: <channel>
  LUN: <lun>
  OEM: <oem field from SDR>
  Slave Address: <ipmb>
  ACPI_system_power_notify_required: true | false
  ACPI_device_power_notify_required: true | false
  controller_logs_init_agent_errors: true | false
  log_init_agent_errors_accessing: true | false
  global_init: true | false
  chassis_device: true | false
  bridge: true | false
  IPMB_event_generator: true | false
  IPMB_event_receiver: true | false
  FRU_inventory_device: true | false
  SEL_device: true | false
  SDR_repository_device: true | false
  sensor_device: true | false

fru:
  Channel: <channel>
  LUN: <lun>
  OEM: <oem field from SDR>
  Slave Address: <ipmb>
  access_address: <ipmb>
  private_bus_id: <integer>
  device_type: <integer>
  device_modifier: <integer>
  is_logical_fru: true | false
  fru_device_id: <integer>

generic:
  Channel: <channel>
  LUN: <lun>
  OEM: <oem field from SDR>
  access_address: <ipmb>
  private_bus_id: <integer>
  device_type: <integer>
  device_modifier: <integer>
  slave_address: <ipmb>
  address_span: <integer>


**MC INFO **
  provides_device_sdrs: true | false
  device_available: true | false
  chassis_support: true | false
  bridge_support: true | false
  ipmb_event_generator: true | false
  ipmb_event_receiver: true | false
  fru_inventory_support: true | false
  sel_device_support: true | false
  sdr_repository_support: true | false
  sensor_device_support: true | false
  device_id: <ipmb>
  device_revision: <integer>
  fw_revision: <integer>.<integer>
  version: <integer>.<integer>
  manufacturer_id: <integer>
  product_id: <integer>
  aux_fw_revision: <integer> <integer> <integer> <integer>


*SENSOR INFO**
  LUN: <integer>
  Number: <integer>
  Event Reading Type: <integer>
  Event Reading Type Name: one of:
           unspecified threshold discrete_usage discrete_state
           discrete_predictive_failure discrete_limit_exceeded
           discrete_performance_met discrete_severity discrete_device_presence
           discrete_device_enable discrete_availability discrete_redundancy
           discrete_acpi_power

  Type: <integer>
  Type Name: <sensor type (a generic string)>
  %Event Support: per state | entire sensor | global
  Init Scanning: true | false
  Init Events: true | false
  Init Thresholds: true | false
  Init Hysteresis: true | false
  Init Type: true | false
  Init Power Up Events: true | false
  Init Power Up Scanning: true | false
  Ignore If No Entity: true | false
  Auto Rearm: true | false
  OEM1: <integer>
  Id: <string>

For sensors of type "threshold", the following exist:
  Threshold Access: none | readable | settable | fixed
  Threshold
    Name: lower non critical | lower critical | lower non recoverable
          | upper non critical | upper critical | upper non recoverable
    Readable: true | false
    Settable: true | false
    Supports: going high assertion | going low assertion
              | going high deassertion | going low deassertion
      .
      .
    .
    .
    Hysteresis Support: none | readable | settable | fixed
    %Nominal Reading: <float>
    %Normal Max: <float>
    %Normal Min: <float>
    %Sensor Max: <float>
    %Sensor Min: <float>
    Base Unit: <integer>
    Base Unit Name: <string>
    %Rate Unit: <integer>
    %Rate Unit Name: <string>
    %Modifier Use: / | *
    %Modifier Unit: <integer>
    %Modifier Unit Name: <string>

For sensors of type not "threshold", the following exist:
  Event
    Offset: <integer>
    Supports: assertion | deassertion
      .
      .
    .
    .

Fields marked with % are optional


**CONTROL INFO**
  Type: <control type>
  Generates Events: true | false
  Settable: true | false
  Readable: true | false
  Num Values: <integer>
  Id: <string>
  
  Controls of type light that are set with settings have the
  following:
  Set with: settings
  Local Control: true | false
  Color: black | white | red | green | blue | yellow | orange
    .
    .
  One color is listed for each supported color

  Controls of type light that are set with transitions have the
  following:
  Light
    Number: <integer>
    Num Values: <integer>
    Value
      Number: <integer>
      Num Transitions: <integer>
      Transition
        Number: <integer>
        Color: black | white | red | green | blue | yellow | orange
        Time: <integer>
        .
        .
      .
      .
    .
    .

  Controls of type identifier have the following:
  Max Length: <integer>


**FRU INFO**
  %Internal area version: <integer>
  %Internal area length: <integer>
  %Internal area data: <data bytes>
  %Chassis info version: <integer>
  %Chassis info type: <integer>
  %Record
    Name: Chassis info part number
    Type: binary | ascii | unicode
    Data: <data in the above format>
  %Record
    Name: Chassis info serial number
    Type: binary | ascii | unicode
    Data: <data in the above format>
  %String Field
    Name: Chassis info
    Number: <integer>
    Type: binary | ascii | unicode
    Data: <data in the above format>
   .
   .
  %Board info version: <integer>
  %Board info lang code: <integer>
  %Board info mfg time: <integer>
  %Record
    Name: Board info board manufacturer
    Type: binary | ascii | unicode
    Data: <data in the above format>
  %Record
    Name: Board info board product name
    Type: binary | ascii | unicode
    Data: <data in the above format>
  %Record
    Name: Board info board serial number
    Type: binary | ascii | unicode
    Data: <data in the above format>
  %Record
    Name: Board info board part number
    Type: binary | ascii | unicode
    Data: <data in the above format>
  %Record
    Name: Board info fru file id
    Type: binary | ascii | unicode
    Data: <data in the above format>
  %String Field
    Name: Board info
    Number: <integer>
    Type: binary | ascii | unicode
    Data: <data in the above format>
   .
   .
  %Product info version: <integer>
  %Product info lang code: <integer>
  %Record
    Name: Product info manufacturer name
    Type: binary | ascii | unicode
    Data: <data in the above format>
  %Record
    Name: Product info product name
    Type: binary | ascii | unicode
    Data: <data in the above format>
  %Record
    Name: Product info product part model number
    Type: binary | ascii | unicode
    Data: <data in the above format>
  %Record
    Name: Product info product version
    Type: binary | ascii | unicode
    Data: <data in the above format>
  %Record
    Name: Product info product serial number
    Type: binary | ascii | unicode
    Data: <data in the above format>
  %Record
    Name: Product info asset tag
    Type: binary | ascii | unicode
    Data: <data in the above format>
  %Record
    Name: Product info fru file id
    Type: binary | ascii | unicode
    Data: <data in the above format>
  %String Field
    Name: Product info
    Number: <integer>
    Type: binary | ascii | unicode
    Data: <data in the above format>
   .
   .
  %Multi-record
    Number: <integer>
    Type: binary | ascii | unicode
    Data: <data in the above format>


** LANPARM CONFIG **
  support_auth_oem: true | false
  support_auth_straight: true | false
  support_auth_md5: true | false
  support_auth_md2: true | false
  support_auth_none: true | false
  ip_addr_source: <integer>
  num_alert_destinations: <integer>
  %ipv4_ttl: <integer>
  %ipv4_flags: <integer>
  %ipv4_precedence: <integer>
  %ipv4_tos: <integer>
  %ip_addr: <ip addr>
  %mac_addr: <mac addr>
  %subnet_mask: <ip addr>
  %primary_rmcp_port <integer>
  %secondary_rmcp_port <integer>
  %bmc_generated_arps: true | false
  %bmc_generated_garps: true | false
  %garp_interval: <integer>
  %default_gateway_ip_addr: <ip addr>
  %default_gateway_mac_addr: <mac addr>
  %backup_gateway_ip_addr: <ip addr>
  %backup_gateway_mac_addr: <mac addr>
  community_string: <string>
  User
    Name: callback
    enable_auth_oem: true | false
    enable_auth_straight: true | false
    enable_auth_md5: true | false
    enable_auth_md2: true | false
    enable_auth_none: true | false
  User
    Name: user
    enable_auth_oem: true | false
    enable_auth_straight: true | false
    enable_auth_md5: true | false
    enable_auth_md2: true | false
    enable_auth_none: true | false
  User
    Name: operator
    enable_auth_oem: true | false
    enable_auth_straight: true | false
    enable_auth_md5: true | false
    enable_auth_md2: true | false
    enable_auth_none: true | false
  User
    Name: admin
    enable_auth_oem: true | false
    enable_auth_straight: true | false
    enable_auth_md5: true | false
    enable_auth_md2: true | false
    enable_auth_none: true | false
  User
    Name: oem
    enable_auth_oem: true | false
    enable_auth_straight: true | false
    enable_auth_md5: true | false
    enable_auth_md2: true | false
    enable_auth_none: true | false
  Alert Destination
    Number: <integer>
    alert_ack: true | false
    dest_type: <integer>
    alert_retry_interval: <integer>
    max_alert_retries: <integer>
    dest_format: <integer>
    gw_to_use: <integer>
    dest_ip_addr: <ip addr>
    dest_mac_addr: <mac addr>
   .
   .
   

** PEF CONFIG **
  alert_startup_delay_enabled: true | false
  startup_delay_enabled: true | false
  event_messages_enabled: true | false
  pef_enabled: true | false
  diagnostic_interrupt_enabled: true | false
  oem_action_enabled: true | false
  power_cycle_enabled: true | false
  reset_enabled: true | false
  power_down_enabled: true | false
  alert_enabled: true | false
  %startup_delay: <integer>
  %alert_startup_delay: <integer>
  guid_enabled: true | false
  guid_val: <guid>
  num_event_filters: <integer>
  num_alert_policies: <integer>
  num_alert_strings: <integer>
  Event Filter
    Number: <integer>
    enable_filter: true | false
    filter_type: <integer>
    diagnostic_interrupt: true | false
    oem_action: true | false
    power_cycle: true | false
    reset: true | false
    power_down: true | false
    alert: true | false
    alert_policy_number: <integer>
    event_severity: <integer>
    generator_id_addr: <integer>
    generator_id_channel_lun: <integer>
    sensor_type: <integer>
    sensor_number: <integer>
    event_trigger: <integer>
    data1_offset_mask: <integer>
    data1_mask: <integer>
    data1_compare1: <integer>
    data1_compare2: <integer>
    data2_mask: <integer>
    data2_compare1: <integer>
    data2_compare2: <integer>
    data3_mask: <integer>
    data3_compare1: <integer>
    data3_compare2: <integer>
   .
   .
  Alert Policy
    Number: <integer>
    policy_num: <integer>
    enabled: true | false
    policy: <integer>
    channel: <integer>
    destination_selector: <integer>
    alert_string_event_specific: true | false
    alert_string_selector: <integer>
   .
   .
  Alert String
    event_filter: <integer>
    alert_string_set: <integer>
    alert_string: <string>
   .
   .

**CONNECTION INFO**
  Active: true | false

**PEF INFO**
  MC: <mc>

**PET INFO**
  MC: <mc>
  Channel: <channel>
  IP Address: <ip address>
  MAC Address: <mac address>
  EFT Selector: <eft selector>
  Policy Number: <policy number>
  APT Selector: <apt selector>
  LAN Dest Selector: <lan dest selector>

**LANPARM INFO**
  MC: <mc>
  Channel: <integer>